diff --git a/front/components/actions/types.ts b/front/components/actions/types.ts index 953c86d46270d..915e6bcb31b97 100644 --- a/front/components/actions/types.ts +++ b/front/components/actions/types.ts @@ -1,7 +1,4 @@ -import type { - ConfigurableAgentActionType, - LightWorkspaceType, -} from "@dust-tt/types"; +import type { AgentActionType, LightWorkspaceType } from "@dust-tt/types"; import { ACTION_RUNNING_LABELS } from "@dust-tt/types"; import { BrowseActionDetails } from "@app/components/actions/browse/BrowseActionDetails"; @@ -12,24 +9,22 @@ import { TablesQueryActionDetails } from "@app/components/actions/tables_query/T import { WebsearchActionDetails } from "@app/components/actions/websearch/WebsearchActionDetails"; export interface ActionDetailsComponentBaseProps< - T extends ConfigurableAgentActionType = ConfigurableAgentActionType, + T extends AgentActionType = AgentActionType, > { action: T; owner: LightWorkspaceType; defaultOpen: boolean; } -interface ActionSpecification { +interface ActionSpecification { runningLabel: string; detailsComponent: React.ComponentType>; } -type ActionType = ConfigurableAgentActionType["type"]; +type ActionType = AgentActionType["type"]; type ActionSpecifications = { - [K in ActionType]: ActionSpecification< - Extract - >; + [K in ActionType]: ActionSpecification>; }; const actionsSpecification: ActionSpecifications = { @@ -57,10 +52,14 @@ const actionsSpecification: ActionSpecifications = { detailsComponent: BrowseActionDetails, runningLabel: ACTION_RUNNING_LABELS.browse_action, }, + jit_list_files_action: { + detailsComponent: () => null, + runningLabel: ACTION_RUNNING_LABELS.jit_list_files_action, + }, }; export function getActionSpecification( actionType: T -): ActionSpecification> { +): ActionSpecification> { return actionsSpecification[actionType]; } diff --git a/sdks/js/src/types.ts b/sdks/js/src/types.ts index b83d876bc563e..3b5086967dc4e 100644 --- a/sdks/js/src/types.ts +++ b/sdks/js/src/types.ts @@ -613,20 +613,20 @@ type TablesQueryActionPublicType = z.infer; const JITFileTypeSchema = z.object({ fileId: z.string(), title: z.string(), - contentType: SupportedContentFragmentTypeSchema, + contentType: z.string(), }); const JITListFilesActionTypeSchema = BaseActionSchema.extend({ - files: z.array(JITFileTypeSchema).nullable(), + files: z.array(JITFileTypeSchema), functionCallId: z.string().nullable(), functionCallName: z.string().nullable(), agentMessageId: ModelIdSchema, step: z.number(), - type: z.literal("tables_query_action"), + type: z.literal("jit_list_files_action"), }); -type JITListFIlesActionPublicType = z.infer< - typeof JITListFilesActionTypeSchema ->; +// type JITListFIlesActionPublicType = z.infer< +// typeof JITListFilesActionTypeSchema +// >; const WhitelistableFeaturesSchema = FlexibleEnumSchema([ "usage_data_api", diff --git a/types/src/front/assistant/conversation.ts b/types/src/front/assistant/conversation.ts index 01869a90271fd..6c4364879af30 100644 --- a/types/src/front/assistant/conversation.ts +++ b/types/src/front/assistant/conversation.ts @@ -129,7 +129,7 @@ export const ACTION_RUNNING_LABELS: Record = { tables_query_action: "Querying tables", websearch_action: "Searching the web", browse_action: "Browsing page", - jit_list_files_action: "Listing files", + jit_list_files_action: "Listing conversation files", }; /**