diff --git a/frontend/src/agents/workflow/components/PromptTextArea.tsx b/frontend/src/agents/workflow/components/PromptTextArea.tsx index b53383f4..cb363e0b 100644 --- a/frontend/src/agents/workflow/components/PromptTextArea.tsx +++ b/frontend/src/agents/workflow/components/PromptTextArea.tsx @@ -62,6 +62,11 @@ const GLOBAL_CONTEXT_VARIABLES: WorkflowVariable[] = [ templatePath: 'system.user_id', section: 'Global context', }, + { + label: 'artifacts.artifact(id)', + templatePath: 'artifacts.artifact(id)', + section: 'Global context', + }, ]; function toAgentTemplatePath(variableName: string): string { @@ -109,6 +114,11 @@ function extractUpstreamVariables( templatePath: 'agent.chat_history', section: 'Workflow input', }, + { + label: 'agent.input_documents', + templatePath: 'agent.input_documents', + section: 'Workflow input', + }, ...GLOBAL_CONTEXT_VARIABLES, ]; const seen = new Set(variables.map((variable) => variable.templatePath)); diff --git a/frontend/src/locale/en.json b/frontend/src/locale/en.json index f0de03e9..2efb9eb0 100644 --- a/frontend/src/locale/en.json +++ b/frontend/src/locale/en.json @@ -932,7 +932,8 @@ "systemTime": "Current time (HH:MM:SS)", "systemTimestamp": "ISO 8601 timestamp", "systemRequestId": "Unique request identifier", - "systemUserId": "Current user ID" + "systemUserId": "Current user ID", + "artifactsLookup": "Artifact metadata by id" }, "learnAboutPrompts": "Learn about Prompts →", "publicPromptEditDisabled": "Public prompts cannot be edited", diff --git a/frontend/src/preferences/PromptsModal.tsx b/frontend/src/preferences/PromptsModal.tsx index efb34a45..0491e188 100644 --- a/frontend/src/preferences/PromptsModal.tsx +++ b/frontend/src/preferences/PromptsModal.tsx @@ -89,6 +89,10 @@ const systemVariableOptionDefinitions = [ labelKey: 'modals.prompts.systemVariableOptions.systemUserId', value: 'system.user_id', }, + { + labelKey: 'modals.prompts.systemVariableOptions.artifactsLookup', + value: 'artifacts.artifact(id)', + }, ]; const buildSystemVariableOptions = (translate: (key: string) => string) =>