fix: hopefully fixed a2ui confusion by the model

This commit is contained in:
Georg Bauer
2026-07-28 22:36:16 +02:00
parent 39c4181ae2
commit d8b29fb1d1
2 changed files with 3 additions and 9 deletions

View File

@@ -538,16 +538,10 @@ impl App {
let assistant_reasoning = effective.turn.reasoning_mode != ReasoningMode::Direct;
#[cfg(target_os = "macos")]
let model_prompt = if self.config.a2ui_enabled {
let mut prompt = format!(
format!(
"{prompt}\n\nA2UI client metadata:\n{}",
self.a2ui.client_metadata()
);
if self.a2ui.active_surface().is_none() {
prompt.push_str(
"\n\nThere is no active A2UI surface. If this response presents UI, its first A2UI message must be createSurface with a new surfaceId and a complete root component tree. Do not update any surfaceId found only in earlier chat history.",
);
}
prompt
)
} else {
prompt.clone()
};