mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
Add Codex multi-agent timeline support (#588)
* checkpoint codex multiagent UI state * fix codex multiagent event scoping * fix: stabilize codex subagent timeline * chore: remove codex subagent nesting prompt * test(web): stabilize tool result rendering tests * fix: collapse codex agent trace rows by default * fix(web): keep chat scrolled to bottom * fix(web): backfill agent-run-heavy message loads * fix(codex): fail stuck subagent spawns * fix(codex): preserve wrapped child event scope * fix(codex): surface agent tool completions
This commit is contained in:
@@ -12,17 +12,25 @@ import { logger } from "@/ui/logger";
|
||||
import { ApiSessionClient } from "@/api/apiSession";
|
||||
import { randomUUID } from "node:crypto";
|
||||
|
||||
export async function startHappyServer(client: ApiSessionClient) {
|
||||
type StartHappyServerOptions = {
|
||||
emitTitleSummary?: boolean;
|
||||
};
|
||||
|
||||
export async function startHappyServer(client: ApiSessionClient, options: StartHappyServerOptions = {}) {
|
||||
const emitTitleSummary = options.emitTitleSummary ?? true;
|
||||
|
||||
// Handler that sends title updates via the client
|
||||
const handler = async (title: string) => {
|
||||
logger.debug('[hapiMCP] Changing title to:', title);
|
||||
try {
|
||||
// Send title as a summary message, similar to title generator
|
||||
client.sendClaudeSessionMessage({
|
||||
type: 'summary',
|
||||
summary: title,
|
||||
leafUuid: randomUUID()
|
||||
});
|
||||
if (emitTitleSummary) {
|
||||
// Send title as a summary message, similar to title generator.
|
||||
client.sendClaudeSessionMessage({
|
||||
type: 'summary',
|
||||
summary: title,
|
||||
leafUuid: randomUUID()
|
||||
});
|
||||
}
|
||||
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user