Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat(web): Contains sys.files in the default template. (#21476)

-LAN-0f5417ab8490
diff --git a/web/app/components/workflow-app/hooks/use-workflow-template.ts b/web/app/components/workflow-app/hooks/use-workflow-template.ts
index 9f47b981dc2..2bab08f2051 100644
--- a/web/app/components/workflow-app/hooks/use-workflow-template.ts
+++ b/web/app/components/workflow-app/hooks/use-workflow-template.ts
@@ -22,7 +22,7 @@ export const useWorkflowTemplate = () => {
...nodesInitialData.llm,
memory: {
window: { enabled: false, size: 10 },
- query_prompt_template: '{{#sys.query#}}',
+ query_prompt_template: '{{#sys.query#}}\n\n{{#sys.files#}}',
},
selected: true,
},
diff --git a/web/app/components/workflow/nodes/_base/components/memory-config.tsx b/web/app/components/workflow/nodes/_base/components/memory-config.tsx
index 446fcfa8ae2..168ad656b68 100644
--- a/web/app/components/workflow/nodes/_base/components/memory-config.tsx
+++ b/web/app/components/workflow/nodes/_base/components/memory-config.tsx
@@ -53,7 +53,7 @@ type Props = {
const MEMORY_DEFAULT: Memory = {
window: { enabled: false, size: WINDOW_SIZE_DEFAULT },
- query_prompt_template: '{{#sys.query#}}',
+ query_prompt_template: '{{#sys.query#}}\n\n{{#sys.files#}}',
}
const MemoryConfig: FC<Props> = ({