dsh-monkeyai-sessions 0.1.4 → 0.1.5

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.4.tgz
64
+ dsh plugin --profile web add ./dsh-monkeyai-sessions-0.1.5.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.4.tgz
31
+ dsh plugin --profile web add ./dsh-monkeyai-sessions-0.1.5.tgz
32
32
  ```
33
33
 
34
34
  已在真实的 DSH `0.2.2-rc.1` web profile 与在线 MonkeyAI runtime 上端到端验证:授权、完整历史加载、指令下发、模型切换、回合取消均正常工作。
package/client.js CHANGED
@@ -1080,6 +1080,7 @@ window.__ModuleLoader__.load({
1080
1080
  historyLoadedRef.current = true;
1081
1081
  setStatus("\u5386\u53F2\u5DF2\u52A0\u8F7D");
1082
1082
  setHistoryLoading(false);
1083
+ setSessionStatus((current) => current || "idle");
1083
1084
  if (frame.model) setCurrentModel(frame.model);
1084
1085
  }
1085
1086
  if (frame.type === "history_incomplete") {
@@ -1075,6 +1075,7 @@ function RemoteSessionPage({ api }) {
1075
1075
  historyLoadedRef.current = true;
1076
1076
  setStatus("\u5386\u53F2\u5DF2\u52A0\u8F7D");
1077
1077
  setHistoryLoading(false);
1078
+ setSessionStatus((current) => current || "idle");
1078
1079
  if (frame.model) setCurrentModel(frame.model);
1079
1080
  }
1080
1081
  if (frame.type === "history_incomplete") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-monkeyai-sessions",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "在 DeepSeek Harness 中读取和继续 MonkeyAI 会话:查看完整对话历史、下发新指令,无缝接续之前在 MonkeyAI 客户端上的工作",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -560,6 +560,7 @@ function RemoteSessionPage({ api }) {
560
560
  historyLoadedRef.current = true
561
561
  setStatus('历史已加载')
562
562
  setHistoryLoading(false)
563
+ setSessionStatus(current => current || 'idle')
563
564
  if (frame.model) setCurrentModel(frame.model)
564
565
  }
565
566
  if (frame.type === 'history_incomplete') {
@@ -971,24 +971,24 @@ export class MonkeyAIRemoteService extends TypertRemoteService {
971
971
  if (httpHistoryComplete) {
972
972
  historyRefreshPromise = historyRefreshPromise.then(() => refreshPersistedHistory())
973
973
  await historyRefreshPromise
974
- // The desktop client tracks turn state via _monkeyai/session/state
975
- // notifications. Seed the panel with the current status so a turn
976
- // already running when the panel opens is shown as 进行中.
977
- try {
978
- const state = await readSessionState({ httpBase: ticketHttpBase, ticket: ticketValue, sessionId: selectedSession, signal })
979
- const status = state?.state?.status
980
- if (typeof status === 'string' && ['running', 'idle', 'error', 'interrupted'].includes(status)) {
981
- emit({
982
- type: 'notification',
983
- sessionId: selectedSession,
984
- method: '_monkeyai/session/state',
985
- data: { sessionId: selectedSession, state: { status }, eventSeq: state.eventSeq },
986
- })
987
- }
988
- } catch {
989
- // Older runtimes may not expose the state read; live notifications
990
- // still drive the status once the next turn starts.
974
+ }
975
+ // The desktop client tracks turn state via _monkeyai/session/state
976
+ // notifications. Seed the panel with the current status so a turn
977
+ // already running when the panel opens is shown as 进行中.
978
+ try {
979
+ const state = await readSessionState({ httpBase: ticketHttpBase, ticket: ticketValue, sessionId: selectedSession, signal })
980
+ const status = state?.state?.status
981
+ if (typeof status === 'string' && ['running', 'idle', 'error', 'interrupted'].includes(status)) {
982
+ emit({
983
+ type: 'notification',
984
+ sessionId: selectedSession,
985
+ method: '_monkeyai/session/state',
986
+ data: { sessionId: selectedSession, state: { status }, eventSeq: state.eventSeq },
987
+ })
991
988
  }
989
+ } catch {
990
+ // Older runtimes may not expose the state read; live notifications
991
+ // still drive the status once the next turn starts.
992
992
  }
993
993
  } catch (error) {
994
994
  if (signal?.aborted) throw error