dsh-monkeyai-sessions 0.1.14 → 0.1.15

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 CHANGED
@@ -61,7 +61,7 @@ From a checkout:
61
61
  npm install
62
62
  npm run build
63
63
  npm pack
64
- dsh plugin --profile web add ./dsh-monkeyai-sessions-0.1.14.tgz
64
+ dsh plugin --profile web add ./dsh-monkeyai-sessions-0.1.15.tgz
65
65
  ```
66
66
 
67
67
  Verified against a real DSH `0.2.2-rc.1` web profile and a live MonkeyAI runtime: authorization, full history loading, prompt delivery, model switching, and turn cancellation all work end to end.
package/README.zh.md CHANGED
@@ -28,7 +28,7 @@ https://artenx.github.io/dsh-monkeyai-sessions/index.json
28
28
  npm install
29
29
  npm run build
30
30
  npm pack
31
- dsh plugin --profile web add ./dsh-monkeyai-sessions-0.1.14.tgz
31
+ dsh plugin --profile web add ./dsh-monkeyai-sessions-0.1.15.tgz
32
32
  ```
33
33
 
34
34
  已在真实的 DSH `0.2.2-rc.1` web profile 与在线 MonkeyAI runtime 上端到端验证:授权、完整历史加载、指令下发、模型切换、回合取消均正常工作。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-monkeyai-sessions",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "在 DeepSeek Harness 中读取和继续 MonkeyAI 会话:查看完整对话历史、下发新指令,无缝接续之前在 MonkeyAI 客户端上的工作",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1075,15 +1075,19 @@ export class MonkeyAIRemoteService extends TypertRemoteService {
1075
1075
  // Load the full history over the runtime's HTTP read channel before the
1076
1076
  // ACP connection starts. The ACP session/load replay only streams a
1077
1077
  // small recent window and the socket is closed mid-replay; the HTTP
1078
- // endpoint paginates the complete message log by cursor instead.
1078
+ // endpoint paginates the complete message log by cursor instead. Yield
1079
+ // the completed history before ACP session/load so a slow runtime mount
1080
+ // cannot keep the panel's history spinner active.
1079
1081
  try {
1082
+ const historyFrames = []
1080
1083
  const history = await fetchFullSessionHistory({
1081
1084
  httpBase: ticket.httpBase,
1082
1085
  ticket: ticketValue,
1083
1086
  sessionId: selectedSession,
1084
1087
  signal,
1085
- onFrame: async frame => { await emit(frame) },
1088
+ onFrame: frame => { historyFrames.push(frame) },
1086
1089
  })
1090
+ for (const frame of historyFrames) yield frame
1087
1091
  for (const id of history.messageIds) httpHistoryMessageIds.add(id)
1088
1092
  if (history.count > 0) {
1089
1093
  httpHistoryComplete = true
@@ -1091,7 +1095,12 @@ export class MonkeyAIRemoteService extends TypertRemoteService {
1091
1095
  // The runtime's session/load response omits the current model; the
1092
1096
  // history channel's session object carries it, so surface it with
1093
1097
  // history_loaded to preselect the right entry in the model picker.
1094
- emitHistoryLoaded(history.sessionModel)
1098
+ historyLoadedEmitted = true
1099
+ yield {
1100
+ type: 'history_loaded',
1101
+ sessionId: selectedSession,
1102
+ ...(history.sessionModel === undefined ? {} : { data: { model: history.sessionModel } }),
1103
+ }
1095
1104
  }
1096
1105
  } catch (historyError) {
1097
1106
  if (signal?.aborted) throw historyError