- commit
- eadee69
- parent
- 95a1772
- author
- im_wower
- date
- 2026-03-29 02:16:56 +0800 CST
Merge remote-tracking branch 'origin/bug/query-routes-and-ask-timeout'
3 files changed,
+17,
-8
+2,
-0
1@@ -314,6 +314,7 @@ export class ClaudeCodedDaemon {
2 }
3 },
4 resolve: (askResult) => {
5+ clearTimeout(timer as ReturnType<typeof setTimeout>);
6 done = true;
7 if (eventResolve) {
8 eventResolve({ value: undefined as unknown as ClaudeCodedStreamEvent, done: true });
9@@ -322,6 +323,7 @@ export class ClaudeCodedDaemon {
10 resolve(askResult);
11 },
12 reject: (error) => {
13+ clearTimeout(timer as ReturnType<typeof setTimeout>);
14 done = true;
15 if (eventResolve) {
16 eventResolve({ value: undefined as unknown as ClaudeCodedStreamEvent, done: true });
1@@ -6146,15 +6146,16 @@ async function handleArtifactExecutionRead(context: LocalApiRequestContext): Pro
2 async function handleArtifactSessionsList(context: LocalApiRequestContext): Promise<ConductorHttpResponse> {
3 const store = requireArtifactStore(context.artifactStore);
4 const platform = readOptionalQueryString(context.url, "platform");
5+ const conversationId = readOptionalQueryString(context.url, "conversation_id");
6 const limit = readPositiveIntegerQuery(context.url, "limit", ARTIFACT_DEFAULT_SESSION_LIMIT, ARTIFACT_LIST_MAX_LIMIT);
7 const offset = readNonNegativeIntegerQuery(context.url, "offset", 0);
8 const publicBaseUrl = store.getPublicBaseUrl();
9
10- const sessions = await store.listSessions({ platform, limit, offset });
11+ const sessions = await store.listSessions({ platform, conversationId, limit, offset });
12
13 return buildSuccessEnvelope(context.requestId, 200, {
14 count: sessions.length,
15- filters: { platform: platform ?? null, limit, offset },
16+ filters: { platform: platform ?? null, conversation_id: conversationId ?? null, limit, offset },
17 sessions: sessions.map((s) => ({
18 id: s.id,
19 platform: s.platform,
+12,
-6
1@@ -2,7 +2,7 @@
2
3 ## 状态
4
5-- 当前状态:`待开始`
6+- 当前状态:`已完成`
7 - 规模预估:`S`
8 - 依赖任务:无(与 T-BUG-027 可并行)
9 - 建议执行者:`Claude`(需要理解 local-api 查询路由和 daemon ask 生命周期)
10@@ -97,21 +97,27 @@
11
12 ### 开始执行
13
14-- 执行者:
15-- 开始时间:
16+- 执行者:Claude
17+- 开始时间:2026-03-29
18 - 状态变更:`待开始` → `进行中`
19
20 ### 完成摘要
21
22-- 完成时间:
23+- 完成时间:2026-03-29
24 - 状态变更:`进行中` → `已完成`
25 - 修改了哪些文件:
26+ - `apps/conductor-daemon/src/local-api.ts` — sessions 端点补 conversation_id 过滤
27+ - `apps/claude-coded/src/daemon.ts` — askStream resolve/reject 回调补 clearTimeout
28 - 核心实现思路:
29-- 跑了哪些测试:
30+ 1. `handleArtifactSessionsList` 用 `readOptionalQueryString` 读取 `conversation_id`,传给 `store.listSessions()`,并在 filters 对象中返回
31+ 2. `askStream` 的 `pendingAsk.resolve` 和 `pendingAsk.reject` 回调首行加 `clearTimeout(timer)`,确保正常完成或手动 reject 时立即取消超时计时器,避免竞争
32+- 跑了哪些测试:`pnpm build` + `pnpm test`(全部通过)
33
34 ### 执行过程中遇到的问题
35
36-> 记录执行过程中遇到的阻塞、环境问题、临时绕过方案等。合并时由合并者判断是否需要修复或建新任务。
37+无
38
39 ### 剩余风险
40
41+无
42+