Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
philipperolet committed Oct 4, 2023
1 parent 79d125d commit 0363e2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { AssistantBuilderDataSourceConfiguration } from "@app/components/assista
import {
CONNECTOR_PROVIDER_TO_RESOURCE_NAME,
FILTERING_MODE_TO_LABEL,
TIME_FRAME_UNIT_TO_LABEL,
FilteringMode,
TIME_FRAME_UNIT_TO_LABEL,
} from "@app/components/assistant_builder/shared";
import { CONNECTOR_CONFIGURATIONS } from "@app/lib/connector_providers";
import { classNames } from "@app/lib/utils";
Expand Down
10 changes: 5 additions & 5 deletions front/pages/w/[wId]/builder/assistants/[aId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,18 @@ export default function EditAssistant({
const selectedDataSource =
agentConfiguration.action?.type === "retrieval_configuration";

let timeFrameMode: AssistantBuilderInitialState["filteringMode"] = null;
let filteringMode: AssistantBuilderInitialState["filteringMode"] = null;
let timeFrame: AssistantBuilderInitialState["timeFrame"] = null;
if (selectedDataSource && agentConfiguration.action?.relativeTimeFrame) {
switch (agentConfiguration.action.relativeTimeFrame) {
case "auto":
timeFrameMode = "AUTO";
filteringMode = "SEARCH";
break;
case "none":
timeFrameMode = "ALL_TIME";
filteringMode = "SEARCH";
break;
default:
timeFrameMode = "CUSTOM";
filteringMode = "TIMEFRAME";
timeFrame = {
value: agentConfiguration.action.relativeTimeFrame.duration,
unit: agentConfiguration.action.relativeTimeFrame.unit,
Expand All @@ -158,7 +158,7 @@ export default function EditAssistant({
dataSources={Object.values(dataSources)}
initialBuilderState={{
dataSourceMode: selectedDataSource ? "SELECTED" : "GENERIC",
filteringMode: timeFrameMode,
filteringMode: filteringMode,
timeFrame,
dataSourceConfigurations, // TODO
handle: agentConfiguration.name,
Expand Down

0 comments on commit 0363e2d

Please sign in to comment.