You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Honor explicit image actions from the first step and separate captions - #221
Explicit image commands could receive prose instead of a tool call, and generated-image captions exposed the optimized technical prompt.
The message router now records explicit image intent before inference and places it at the beginning of the first dynamic user packet. The pending action selects the native image function from the first step. A text-only response is rejected and repaired; exhausted repairs never publish a false promise. Actual failed tool attempts remain reportable, and newer messages from the initiator replace or cancel the pending action. Earlier calls cannot fulfill a newer request, and canonical-history deduplication preserves the inbox intent. Other participants cannot replace the initiator's action.
draw_image and draw_api now accept a separate optional readable caption. Without one, the runtime uses the original source request. Scheduled generation preserves the technical prompt and visible caption in their existing separate fields; the direct API path uses the same bounded HTML caption builder. Old serialized tool calls and checkpoints remain readable.
Validation: cargo fmt --all; git diff --check; cargo test --workspace --all-targets (2462 passed, 10 ignored); cargo clippy --workspace --all-targets -- -D warnings. Regression coverage checks first-packet intent and stable system prefix, native tool choice, rejected prose and exhausted repairs, actual tool failure, scheduling caption separation, direct API photo captions, and positive/negative command recognition. No schema migration.
Prompt changes are intentional. The system/user role markers and the cached-prefix/dynamic-first-packet layout are preserved. Explicit action intent now appears at the start of the first dynamic packet, before history. The new regression checks that this dynamic intent does not change the rendered system prefix. Tool contracts now distinguish generation instructions from readable captions; old serialized calls and checkpoints default the optional fields. All workspace tests, fmt, and Clippy passed at the current head.
When an injected message from the same user arrives, requested_tool is unconditionally cleared instead of being replaced with the newer message's own requested_tool. A user who sends a follow-up explicit command (e.g. "!draw cat") while a draw session is already pending will have the new intent silently discarded, so the forced required_tool never applies for that request. Consider copying meta.requested_tool from the newer message rather than clearing.
if params.user_id == active_params.user_id{
tool_context.message_meta.requested_tool.clear();}
Fixed the newer-command finding. The initiator's newer intent now replaces the prior intent; a plain follow-up clears it. Calls before that message no longer fulfill the new request. The inbox metadata is also applied when canonical history already observed the same message, so the deduplication boundary cannot discard the explicit intent. Other participants cannot replace the initiator's intent. The persisted call offset defaults to zero for older checkpoints. Regression coverage exercises all three sender/intent cases through both inbox-only and history-before-inbox paths. All workspace tests, fmt, and Clippy passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explicit image commands could receive prose instead of a tool call, and generated-image captions exposed the optimized technical prompt.
The message router now records explicit image intent before inference and places it at the beginning of the first dynamic user packet. The pending action selects the native image function from the first step. A text-only response is rejected and repaired; exhausted repairs never publish a false promise. Actual failed tool attempts remain reportable, and newer messages from the initiator replace or cancel the pending action. Earlier calls cannot fulfill a newer request, and canonical-history deduplication preserves the inbox intent. Other participants cannot replace the initiator's action.
draw_imageanddraw_apinow accept a separate optional readablecaption. Without one, the runtime uses the original source request. Scheduled generation preserves the technical prompt and visible caption in their existing separate fields; the direct API path uses the same bounded HTML caption builder. Old serialized tool calls and checkpoints remain readable.Validation:
cargo fmt --all;git diff --check;cargo test --workspace --all-targets(2462 passed, 10 ignored);cargo clippy --workspace --all-targets -- -D warnings. Regression coverage checks first-packet intent and stable system prefix, native tool choice, rejected prose and exhausted repairs, actual tool failure, scheduling caption separation, direct API photo captions, and positive/negative command recognition. No schema migration.