dsh-side-chat-plus 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +326 -326
- package/README.zh.md +268 -268
- package/dsh.plugin.json +1 -1
- package/lib/client-registry.js +125 -125
- package/lib/client-registry.js.map +1 -1
- package/lib/client.js +125 -125
- package/lib/client.js.map +1 -1
- package/lib/index.js +7 -2
- package/package.json +1 -1
- package/src/client/attachments/AttachmentRail.module.css +89 -89
- package/src/client/attachments/AttachmentRail.tsx +173 -173
- package/src/client/attachments/DropOverlay.module.css +38 -38
- package/src/client/attachments/DropOverlay.tsx +62 -62
- package/src/client/attachments/ImageLightbox.module.css +44 -44
- package/src/client/attachments/ImageLightbox.tsx +58 -58
- package/src/client/attachments/MessageImage.module.css +61 -61
- package/src/client/attachments/MessageImage.tsx +120 -120
- package/src/client/attachments/index.ts +19 -19
- package/src/client/client.module.css +1032 -1032
- package/src/client/index.tsx +1966 -1966
- package/src/client/locales.ts +173 -173
- package/src/context-types.ts +384 -384
- package/src/index.ts +14 -6
package/src/index.ts
CHANGED
|
@@ -472,14 +472,22 @@ function buildApi(ctx: Context, sideChats: Map<string, SidechatRecord>, getSetti
|
|
|
472
472
|
const items: Array<{ childId: string; running: boolean; runningSince?: number }> = []
|
|
473
473
|
for (const record of sideChats.values()) {
|
|
474
474
|
if (record.parentSessionId !== parentSessionId) continue
|
|
475
|
-
|
|
476
|
-
//
|
|
477
|
-
//
|
|
478
|
-
//
|
|
479
|
-
|
|
475
|
+
const agent = record.handle.agent
|
|
476
|
+
// "Running" follows the agent's live lifecycle status — the dominant
|
|
477
|
+
// signal the main conversation uses — so the composer flips to the stop
|
|
478
|
+
// button the moment the driver wakes for thinking/streaming, instead of
|
|
479
|
+
// waiting for a durable turn/start to land in the log. A settled driver
|
|
480
|
+
// is always 'idle' again, so a finished turn can never leave the panel
|
|
481
|
+
// stuck on "thinking". Hosts that do not surface the status getter fall
|
|
482
|
+
// back to the open-turn event scan.
|
|
483
|
+
const status = (agent as { status?: string }).status
|
|
484
|
+
const statusRunning = status === 'running'
|
|
485
|
+
const eventRunningSince = openTurnStart(agent.session.events ?? [])
|
|
486
|
+
const running = statusRunning || (status === undefined && eventRunningSince !== undefined)
|
|
487
|
+
const runningSince = running ? (eventRunningSince ?? Date.now()) : undefined
|
|
480
488
|
items.push({
|
|
481
489
|
childId: record.childId,
|
|
482
|
-
running
|
|
490
|
+
running,
|
|
483
491
|
...(runningSince !== undefined ? { runningSince } : {}),
|
|
484
492
|
})
|
|
485
493
|
}
|