Clarify that IM file delivery requires dsh_im_return_file (4.9.1-ops.22).

Strengthen tool and system-prompt copy so models do not treat a pasted workspace path as delivery.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-05 19:25:07 +08:00
parent a92080e490
commit 385bc1edf5
4 changed files with 16 additions and 6 deletions

View file

@ -576,7 +576,11 @@ export function createOutboundArtifactTool({ registry = outboundArtifactRegistry
};
const definition = Object.freeze({
name: OUTBOUND_ARTIFACT_TOOL,
description: 'Send a readable file or generated image to the user through the current conversation. Existing and newly created files are both valid.',
description: [
'Deliver a readable file or generated image to the user in this IM chat as a real attachment.',
'Call this after the file exists on disk. Pasting a workspace path in the reply text does not send the file.',
'Existing and newly created files are both valid.',
].join(' '),
parameters: {
type: 'object',
additionalProperties: false,
@ -654,7 +658,11 @@ export function installOutboundArtifactTool(ctx, { registry = outboundArtifactRe
ctx.systemPrompt.section({
name: 'dsh-im:return-file',
order: 115,
text: `When the user asks to receive a file or generated image, call ${OUTBOUND_ARTIFACT_TOOL} with its path. Existing files can be sent directly; do not recreate or rename a file solely for delivery.`,
text: [
`When the user asks to receive a file or generated image in this IM chat, you MUST call ${OUTBOUND_ARTIFACT_TOOL} with the file path so the channel can attach it.`,
'Writing or pasting a local/workspace path in the reply text does not deliver the file to the user.',
'Create or locate the file first, then call the tool. Do not recreate or rename a file solely for delivery.',
].join(' '),
});
return true;
}