Skip to content

v1.19.0 #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function PlaygroundSearch() {
}, [projectId, question]);


return <div className="grid overflow-hidden grid-cols-2 h-[calc(100vh-200px)]">
return <div className="grid overflow-hidden grid-cols-2 h-[calc(100vh-150px)]">
<div className="flex flex-col gap-y-2 m-3 h-full">
<div className="flex items-center">
<span className="mr-3">Embedding</span>
Expand Down Expand Up @@ -153,7 +153,7 @@ export function PlaygroundSearch() {
/>
</div>
{!loading && !searchResults && <div className="text-sm inline-block font-normal text-gray-500 italic mx-3">Start by searching for records.</div>}
{!loading && searchResults && (searchResults.length > 0 ? <div className="relative ml-2 font-dmMono text-xs whitespace-pre-line h-[calc(100vh-200px)] overflow-y-auto">
{!loading && searchResults && (searchResults.length > 0 ? <div className="relative ml-2 font-dmMono text-xs whitespace-pre-line h-[calc(100vh-175px)] pb-5 overflow-y-auto">
{searchResults.map((result, index) => <div key={index} className="flex flex-col gap-x-3 bg-white rounded-md border border-gray-300 py-2 px-3 m-2">
<div className="absolute right-4 text-gray-500 text-xs">{result?.score.toFixed(3)}</div>
<RecordDisplay record={result} attributes={attributes} />
Expand Down
5 changes: 4 additions & 1 deletion src/components/shared/logs/ContainerLogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export default function ContainerLogs(props: ContainerLogsProps) {
/>
) : (
<Tooltip content='No runs to copy' color="invert" placement="top" className="cursor-auto">
<IconClipboardOff className="text-gray-400 h-5 w-5 mx-1" />
<IconButton
icon={IconClipboardOff}
disabled
/>
</Tooltip>)}


Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export default function Sidebar() {
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.VERSION_OVERVIEW}>
<div onClick={requestVersionOverview} id="refineryVersion"
className="z-50 tooltip tooltip-right cursor-pointer select-none text-white flex items-center mr-1">
v1.18.0
v1.19.0
{hasUpdates && <Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.NEWER_VERSION_AVAILABLE} >
<IconAlertCircle className="h-5 w-5 text-yellow-700" />
</Tooltip>}
Expand Down
28 changes: 23 additions & 5 deletions src/pages/projects/[projectId]/upload-records/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,34 @@
import UploadRecords from "@/src/components/projects/projectId/upload-records/UploadRecords";
import { setCurrentPage, setDisplayIconComments } from "@/src/reduxStore/states/general";
import { CurrentPage } from "@/submodules/react-components/hooks/web-socket/constants";
import { useEffect } from "react";
import { useDispatch } from "react-redux"
import { selectOrganizationId, setCurrentPage, setDisplayIconComments } from "@/src/reduxStore/states/general";
import { selectProjectId, setActiveProject } from "@/src/reduxStore/states/project";
import { getProjectByProjectId } from "@/src/services/base/project";
import { Application, CurrentPage, CurrentPageSubKey } from "@/submodules/react-components/hooks/web-socket/constants";
import { useWebsocket } from "@/submodules/react-components/hooks/web-socket/useWebsocket";
import { useCallback, useEffect } from "react";
import { useDispatch, useSelector } from "react-redux"

export default function UploadRecordsPage() {
const dispatch = useDispatch();
const projectId = useSelector(selectProjectId);
const orgId = useSelector(selectOrganizationId);

useEffect(() => {
dispatch(setCurrentPage(CurrentPage.UPLOAD_RECORDS));
dispatch(setDisplayIconComments(false));
}, []);

return (<UploadRecords></UploadRecords>)

const handleWebsocketNotification = useCallback((msgParts: string[]) => {
if (!projectId) return;
if (msgParts[1] == 'project_update' && msgParts[2] == projectId) {
getProjectByProjectId(projectId, (res) => {
dispatch(setActiveProject(res));
})
}

}, [projectId]);

useWebsocket(orgId, Application.REFINERY, CurrentPage.PROJECT_SETTINGS, handleWebsocketNotification, undefined, CurrentPageSubKey.FILE_UPLOAD);

return <UploadRecords />
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function buildExpectedEmbeddingName(data: any): string {
function buildEmbeddingNameWithApiToken(data: any) {
if (data.apiToken == null) return "";
if (data.platform == PlatformType.AZURE) data.model = data.engine;
const platformStr = "-" + data + "-";
const platformStr = "-" + data.platform + "-";
const apiTokenCut = data.apiToken.substring(0, 3) + "..." + data.apiToken.substring(data.apiToken.length - 4, data.apiToken.length);
if (data.platform == PlatformType.OPEN_AI || data.platform == PlatformType.AZURE) return platformStr + data.model + "-" + apiTokenCut;
else return platformStr + apiTokenCut;
Expand All @@ -93,12 +93,7 @@ function buildEmbeddingNameWithApiToken(data: any) {
export function checkDuplicates(embeddings: any, data: any): boolean {
const currentName = buildExpectedEmbeddingName(data);
if (currentName.slice(-1) == "-") return false;
else {
for (const embedding of embeddings) {
if (embedding.name == currentName) return false;
}
}
return true;
else return !embeddings.some((e) => e.name == currentName);
}

export function checkIfCreateEmbeddingIsDisabled(props: EmbeddingCreationEnabledProps) {
Expand Down