Skip to content

Percentage sign fix#34

Merged
tsuz merged 3 commits into
mainfrom
fix/percentage-sign-fix
May 24, 2026
Merged

Percentage sign fix#34
tsuz merged 3 commits into
mainfrom
fix/percentage-sign-fix

Conversation

@tsuz
Copy link
Copy Markdown
Owner

@tsuz tsuz commented May 24, 2026

fixes #23

@tsuz tsuz changed the title Fix/percentage sign fix Percentage sign fix May 24, 2026
@tsuz tsuz requested a review from Copilot May 24, 2026 20:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes issue #23 where a % character in the system prompt caused String.format to throw at runtime. Replaces format-string templating with direct StringBuilder concatenation, and adds a test asserting % is preserved literally.

Changes:

  • Replace SYSTEM_PROMPT_TEMPLATE (format string with %s) with a plain SYSTEM_PROMPT_BASE string.
  • Refactor buildSystemPrompt to concatenate via StringBuilder and add a package-private overload that accepts the base prompt for testability.
  • Add a regression test covering literal % handling in both base prompt and memoir context.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
think/think-consumer/src/main/java/io/flightdeck/think/consumer/ThinkConsumer.java Removes String.format-based prompt template; builds system prompt via StringBuilder and exposes a test overload.
think/think-consumer/src/test/java/io/flightdeck/think/consumer/SystemPromptTest.java Adds regression test ensuring % in prompt and memoir context is preserved literally.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tsuz tsuz merged commit 0e48f63 into main May 24, 2026
2 checks passed
@tsuz tsuz deleted the fix/percentage-sign-fix branch May 24, 2026 21:19
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.

Handle percentage sign in system prompt

2 participants