Skip to content

fix(prompt): raise template token limit to 8192 and fix stream decode drop - #2

Merged
gaffercode merged 1 commit into
mainfrom
fix/template-token-limit-and-stream-decode
Dec 2, 2026
Merged

gaffercode merged 1 commit into
mainfrom
fix/template-token-limit-and-stream-decode

Conversation

@gaffercode

@gaffercode gaffercode commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Raise PROMPT_TEMPLATE_MAX_TOKENS from 4096 to 8192 so complex Indonesian Metaprompt templates complete without truncation.
  • Distinguish truncated unclosed <Instructions> blocks from completely missing <Instructions> blocks with actionable error text.
  • Flush buffered scramble/decode chunks before clearing state in desktop/renderer/renderer.ts so streamed prefixes are never dropped.
  • Remove raw partial XML stream lines when TEMPLATE_INCOMPLETE fires.

Verification

  • Full Vitest suite: 28 files / 245 tests passed
  • TypeScript (tsc --noEmit & tsconfig.desktop.json): 0 errors
  • ESLint on touched files: 0 errors
  • Desktop build (node --run desktop:build): passed

Devin Review

@gaffercode
gaffercode merged commit a9e09e9 into main Dec 2, 2026
1 check passed
@gaffercode
gaffercode deleted the fix/template-token-limit-and-stream-decode branch December 2, 2026 06:38

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant