DiffusionGemma: disable tools, enable artifacts canvas by default (#6255)
DiffusionGemma serves via the visual runner, which streams per-step canvas frames so the answer resolves live in the bubble. The agentic tool loop (generate_chat_completion_with_tools) does not forward those frames, so whenever a tool pill (Search/Code) was on the live canvas silently vanished while text still streamed. DiffusionGemma is not a tool-calling target anyway, so report supports_tools=False for it: the chat always takes the frame-forwarding path, and the Search/Code pills disable themselves (a local model has no builtin web search either). Also turn the artifacts canvas on by default for DiffusionGemma so a full-HTML answer (e.g. a playable game) renders as an interactive sandboxed card without the user flipping the global artifacts toggle.
This commit is contained in:
parent
587e59ca83
commit
756265e3fd
2 changed files with 10 additions and 3 deletions
|
|
@ -1042,6 +1042,10 @@ class LlamaCppBackend:
|
|||
|
||||
@property
|
||||
def supports_tools(self) -> bool:
|
||||
# DiffusionGemma serves via the visual runner, whose live per-step canvas
|
||||
# frames are dropped by the agentic tool loop; never route it through tools.
|
||||
if self._is_diffusion:
|
||||
return False
|
||||
return self._supports_tools
|
||||
|
||||
@property
|
||||
|
|
|
|||
|
|
@ -286,11 +286,14 @@ function CodeBlockActions({
|
|||
}
|
||||
|
||||
// DiffusionGemma renders its denoising live in the bubble (see DiffusionCanvas in
|
||||
// thread.tsx), so it no longer forces HTML into an iframe artifact; it follows the
|
||||
// same artifact rules as every other model.
|
||||
// thread.tsx) and has the artifacts canvas on by default, so a full-HTML answer
|
||||
// (e.g. a playable game) renders as an interactive card without the global toggle.
|
||||
function StreamdownBlock(props: BlockProps) {
|
||||
const shouldCollapseHtmlArtifacts = useChatRuntimeStore(
|
||||
(state) => state.artifactsEnabled || state.collapseHtmlArtifacts,
|
||||
(state) =>
|
||||
state.artifactsEnabled ||
|
||||
state.collapseHtmlArtifacts ||
|
||||
state.loadedIsDiffusion,
|
||||
);
|
||||
const messageHasRenderableRenderHtmlTool = useAuiState(({ message }) =>
|
||||
message.parts.some(isRenderableRenderHtmlToolPart),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue