feat: chat rendering toolcalls, footer overview
This commit is contained in:
@@ -9,7 +9,10 @@
|
||||
* @module pygienium/commands
|
||||
*/
|
||||
|
||||
import type { ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
|
||||
import type {
|
||||
AgentSessionEvent,
|
||||
ExtensionCommandContext,
|
||||
} from "@earendil-works/pi-coding-agent";
|
||||
import { resolve } from "node:path";
|
||||
import {
|
||||
getAllChecks,
|
||||
@@ -49,6 +52,11 @@ export type PygieniumCtx = Pick<
|
||||
> & {
|
||||
/** Optional callback to post messages to the chat window. */
|
||||
sendChatMessage?: SendChatMessage;
|
||||
/** Optional callback forwarding raw sub-agent events to the chat stream. */
|
||||
onAgentEvent?: (phase: string, event: AgentSessionEvent) => void;
|
||||
/** Optional callback to emit synthetic progress lines (verify/cleanup/
|
||||
* recon phases that don't run agents) into the chat stream. */
|
||||
sendPhaseLine?: (phase: string, text: string) => void;
|
||||
};
|
||||
|
||||
function print(ctx: PygieniumCtx, line: string): void {
|
||||
@@ -169,6 +177,8 @@ export async function handleCheckCommand(
|
||||
ui: ctx.ui,
|
||||
hasUI: ctx.hasUI,
|
||||
sendChatMessage: ctx.sendChatMessage,
|
||||
onAgentEvent: ctx.onAgentEvent,
|
||||
sendPhaseLine: ctx.sendPhaseLine,
|
||||
gitignore: !noGitignore,
|
||||
});
|
||||
|
||||
@@ -206,6 +216,8 @@ export async function handleAllCommand(
|
||||
ui: ctx.ui,
|
||||
hasUI: ctx.hasUI,
|
||||
sendChatMessage: ctx.sendChatMessage,
|
||||
onAgentEvent: ctx.onAgentEvent,
|
||||
sendPhaseLine: ctx.sendPhaseLine,
|
||||
});
|
||||
const giNote = outcome.gitignoreAppended
|
||||
? " · .pygienium/ added to .gitignore"
|
||||
@@ -293,6 +305,8 @@ export async function handleResumeCommand(
|
||||
hasUI: ctx.hasUI,
|
||||
existingState: state,
|
||||
sendChatMessage: ctx.sendChatMessage,
|
||||
onAgentEvent: ctx.onAgentEvent,
|
||||
sendPhaseLine: ctx.sendPhaseLine,
|
||||
gitignore,
|
||||
});
|
||||
state = outcome.state;
|
||||
|
||||
Reference in New Issue
Block a user