feat(app): find text throughout chat history

Discover candidate transcript locations on the daemon, then reuse prompt navigation to load history and verify rendered occurrences on the client. Keep search state inside its own modules without changing timeline or task presentation contracts.
This commit is contained in:
Mohamed Boudra
2026-09-12 12:08:23 +02:00
parent db8c22e135
commit 2bb62bb8e4
30 changed files with 1448 additions and 68 deletions
+20
View File
@@ -576,6 +576,11 @@ export interface FetchAgentTimelineOptions {
timeout?: number;
}
export type AgentTimelineSearchPayload = Extract<
SessionOutboundMessage,
{ type: "agent.timeline.search.response" }
>["payload"];
export type AgentTimelinePromptIndexPayload = Extract<
SessionOutboundMessage,
{ type: "agent.timeline.list_prompts.response" }
@@ -2968,6 +2973,21 @@ export class DaemonClient {
return { seq: payload.seq, epoch: payload.epoch };
}
async searchAgentTimeline(
agentId: string,
query: string,
cursor?: number,
): Promise<AgentTimelineSearchPayload> {
const requestId = this.createRequestId();
const payload = await this.sendCorrelatedSessionRequest({
requestId,
message: { type: "agent.timeline.search.request", requestId, agentId, query, cursor },
responseType: "agent.timeline.search.response",
});
if (payload.error) throw new Error(payload.error);
return payload;
}
async listAgentTimelinePrompts(
agentId: string,
options: { requestId?: string; timeout?: number } = {},