Skip to content

Commit 7db4c02

Browse files
author
wisedev
committed
fix: adjust coding agent prompt
1 parent a9eaab9 commit 7db4c02

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

backend/MaIN.Docs.Api/Services/DocsAgentOrchestrator.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -843,10 +843,11 @@ private static ToolsConfiguration BuildCodeTools(string docsPath) =>
843843
FileTools.Show)
844844
.AddTool<ArtifactTools.ProposeArgs>(
845845
"propose_artifact_generation",
846-
"Signals the UI to offer a downloadable ZIP of the files you just showed via show_file. " +
847-
"Call AFTER all show_file calls are done. At most once per response. " +
848-
"Only call when the solution is complete and runnable. " +
849-
"Always pass the 'kind' arg matching the project shape (api/console/desktop).",
846+
"REQUIRED: call this after every response that used show_file. " +
847+
"Signals the UI to offer a downloadable ZIP of the files already shown. " +
848+
"Call ONCE, after all show_file calls are done, before ending your turn. " +
849+
"Skipping this after calling show_file is a bug — always pair them. " +
850+
"Pass the 'kind' arg matching the project shape (api/console/desktop).",
850851
new
851852
{
852853
type = "object",
@@ -1339,9 +1340,10 @@ that text directly into agent.ProcessAsync($"...the user's request...\n\n{extrac
13391340
1. Call show_file once for EVERY file in the solution — minimum .csproj + Program.cs.
13401341
This is the ONLY way the user sees your code. Do NOT write fenced code blocks in your
13411342
text. Do NOT combine files or skip any file.
1342-
2. After all show_file calls, write 1-2 sentences in your text describing what you built.
1343-
3. Call propose_artifact_generation to offer the download. Only call when the solution
1344-
is complete and runnable (has .csproj + Program.cs, runs with 'dotnet run').
1343+
2. After ALL show_file calls are done, write 1-2 sentences in your text describing what you built.
1344+
3. Call propose_artifact_generation IMMEDIATELY after step 2 — this is NOT optional.
1345+
Every response that called show_file MUST end with propose_artifact_generation.
1346+
If you showed files but skipped this call, your response is incomplete.
13451347
4. The UI packages the shown files into a ZIP when the user clicks download — you do NOT
13461348
need to call any generate tool. Never confirm or mention downloading in your text.
13471349

0 commit comments

Comments
 (0)