Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

Commit ecc0aba

Browse files
authored
fix(agent): link uploaded artifacts in final responses
Generated-By: PostHog Code Task-Id: 842d598b-48cc-4059-8fed-18a9965a71c4
1 parent 71fd26f commit ecc0aba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/agent/src/server/agent-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3627,7 +3627,7 @@ Optimize for the fewest shell round trips.
36273627

36283628
const artifactInstructions = `
36293629
## Delivering non-code files (artifacts)
3630-
When you create a non-code deliverable the user should be able to download (a report, chart, image, data file, rendered canvas), call the \`upload_artifact\` tool with its path before your final reply, then mention it. Files left in the workspace don't reach the user; uploaded ones show up in their artifact panel. Don't upload source code or repository changesthose belong in a commit or PR.`;
3630+
When you create a non-code file the user should be able to download (such as a report, chart, image, archive, or data file), call the \`upload_artifact\` tool with its path before your final reply. In your final reply, link to the download URL returned by the tool—never link to the file's local workspace path. Files left in the workspace don't reach the user. Don't upload source code or repository changesthose belong in a commit or PR.`;
36313631

36323632
const whyContextInstruction = ` - Add a brief **Why** to the body — one or two sentences capturing the reason the user asked for this change (the motivation, not a restatement of the diff). Keep it short.`;
36333633
const publicRepoSafetyInstruction = ` - **Public-repo safety.** Treat the target repository as public-readable unless you have verified otherwise. The PR title, description, and commit messages must not contain private operational scale (exact event counts, internal row volumes, customer-usage percentages), customer names / emails / companies, references to internal tickets or incidents, the contents of Slack threads (do not quote or paraphrase what was said), or unreleased roadmap details. Linking to the originating Slack thread is fine and encouraged — Slack links are auth-gated and useful as context — as are channel references like "raised in #team-foo". Describe findings qualitatively ("present on nearly all X events, absent from Y") rather than with quantitative figures pulled from analytics queries — the reasoning that uses those numbers can stay in the thread; the PR copy cannot.`;

0 commit comments

Comments
 (0)