cody icon indicating copy to clipboard operation
cody copied to clipboard

feat(chat): Remove thinking XML tags and add thinking content part

Open abeatrix opened this issue 11 months ago • 0 comments

This commit introduces the following changes:

  • Removes the XML tags from the thinking text in CompletionsResponseBuilder.ts.
  • Adds a ThinkingContentPart type to lib/shared/src/sourcegraph-api/completions/types.ts to represent the thinking content.
  • Updates lib/shared/src/sourcegraph-api/completions/parse.ts to handle the delta_thinking event and add the thinking content to the content array.
  • Updates vscode/src/prompt-builder/sanitize.ts to remove content between <think> tags from the first human message.

These changes allow the client to handle the thinking content separately from the completion text, and remove the need for XML tags.

Test plan

x

abeatrix avatar Mar 26 '25 04:03 abeatrix