fix(agents): skip thinking tags in code spans
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { AgentEvent } from "@mariozechner/pi-agent-core";
|
||||
|
||||
import { emitAgentEvent } from "../infra/agent-events.js";
|
||||
import { createInlineCodeState } from "../markdown/code-spans.js";
|
||||
import type { EmbeddedPiSubscribeContext } from "./pi-embedded-subscribe.handlers.types.js";
|
||||
|
||||
export function handleAgentStart(ctx: EmbeddedPiSubscribeContext) {
|
||||
@@ -75,6 +76,7 @@ export function handleAgentEnd(ctx: EmbeddedPiSubscribeContext) {
|
||||
|
||||
ctx.state.blockState.thinking = false;
|
||||
ctx.state.blockState.final = false;
|
||||
ctx.state.blockState.inlineCode = createInlineCodeState();
|
||||
|
||||
if (ctx.state.pendingCompactionRetry > 0) {
|
||||
ctx.resolveCompactionRetry();
|
||||
|
||||
Reference in New Issue
Block a user