@parallelworks/code 0.4.0 → 0.5.0

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.
Files changed (77) hide show
  1. package/README.md +39 -12
  2. package/dist/agentSwitcher.d.ts +13 -2
  3. package/dist/agentSwitcher.js +28 -6
  4. package/dist/ago.d.ts +1 -3
  5. package/dist/ago.js +1 -3
  6. package/dist/api.d.ts +200 -0
  7. package/dist/chatStrings.d.ts +1 -0
  8. package/dist/chatStrings.js +2 -1
  9. package/dist/claudeAccounts.d.ts +20 -2
  10. package/dist/claudeAccounts.js +51 -7
  11. package/dist/claudeApi.d.ts +2 -1
  12. package/dist/claudeApi.js +49 -3
  13. package/dist/command.d.ts +5 -1
  14. package/dist/command.js +6 -1
  15. package/dist/createPwCodeApi.d.ts +70 -1
  16. package/dist/createPwCodeApi.js +4 -2
  17. package/dist/index.d.ts +5 -4
  18. package/dist/index.js +5 -4
  19. package/dist/locales/en/agentTranscript.js +2 -1
  20. package/dist/locales/en/agents.js +16 -3
  21. package/dist/locales/en.d.ts +13 -0
  22. package/dist/locales/es/agentTranscript.js +2 -1
  23. package/dist/locales/es/agents.js +16 -3
  24. package/dist/locales/ja/agentTranscript.js +2 -1
  25. package/dist/locales/ja/agents.js +16 -3
  26. package/dist/locales/ko/agentTranscript.js +2 -1
  27. package/dist/locales/ko/agents.js +16 -3
  28. package/dist/locales/zh/agentTranscript.js +2 -1
  29. package/dist/locales/zh/agents.js +16 -3
  30. package/dist/notices.d.ts +2 -0
  31. package/dist/notices.js +20 -13
  32. package/dist/query.d.ts +4 -1
  33. package/dist/query.js +9 -3
  34. package/dist/session.d.ts +6 -0
  35. package/dist/session.js +5 -1
  36. package/dist/sessionEvents.d.ts +29 -2
  37. package/dist/sessionEvents.js +187 -73
  38. package/dist/sessionGroups.d.ts +3 -3
  39. package/dist/sessionGroups.js +3 -3
  40. package/dist/sessionHeader.js +6 -2
  41. package/dist/sessionList.d.ts +13 -8
  42. package/dist/sessionList.js +20 -10
  43. package/dist/sessionScreen.d.ts +5 -1
  44. package/dist/sessionScreen.js +12 -7
  45. package/dist/sessionsApi.d.ts +19 -3
  46. package/dist/sessionsApi.js +100 -12
  47. package/dist/sessionsFeed.d.ts +22 -0
  48. package/dist/sessionsFeed.js +125 -0
  49. package/dist/todos.d.ts +42 -0
  50. package/dist/todos.js +104 -0
  51. package/dist/transcript.d.ts +1 -2
  52. package/dist/transcript.js +63 -102
  53. package/dist/transcriptRead.d.ts +56 -0
  54. package/dist/transcriptRead.js +121 -0
  55. package/dist/useComposer.d.ts +14 -5
  56. package/dist/useComposer.js +20 -7
  57. package/dist/useComposerImages.js +3 -4
  58. package/dist/useComposerPastes.js +3 -8
  59. package/dist/useConversation.d.ts +6 -0
  60. package/dist/useConversation.js +72 -5
  61. package/dist/useMounted.d.ts +3 -0
  62. package/dist/useMounted.js +14 -0
  63. package/dist/useSubagent.d.ts +2 -0
  64. package/dist/useSubagent.js +2 -0
  65. package/dist/wording.d.ts +5 -2
  66. package/dist/wording.js +6 -4
  67. package/locales/en/agentTranscript.json +2 -1
  68. package/locales/en/agents.json +14 -2
  69. package/locales/es/agentTranscript.json +2 -1
  70. package/locales/es/agents.json +14 -2
  71. package/locales/ja/agentTranscript.json +2 -1
  72. package/locales/ja/agents.json +14 -2
  73. package/locales/ko/agentTranscript.json +2 -1
  74. package/locales/ko/agents.json +14 -2
  75. package/locales/zh/agentTranscript.json +2 -1
  76. package/locales/zh/agents.json +14 -2
  77. package/package.json +2 -2
@@ -46,6 +46,7 @@ export declare function usePwCodeConversation({ api, machine, sessionId, session
46
46
  /** The session, as `api.useSessionDetail` reads it. */
47
47
  detail: {
48
48
  data: SessionDetail | undefined;
49
+ preview?: SessionDetail | undefined;
49
50
  mutate: () => Promise<unknown>;
50
51
  };
51
52
  /** Words a refusal or failure for the reader. */
@@ -91,6 +92,8 @@ export declare function usePwCodeConversation({ api, machine, sessionId, session
91
92
  status: "idle" | "running" | "awaiting_approval" | "live_elsewhere";
92
93
  turnStartedAt?: string;
93
94
  updatedAt: string;
95
+ usageLimitResumeAt?: string;
96
+ waitingForUsageLimit?: boolean;
94
97
  workspace: string;
95
98
  } | undefined;
96
99
  detail: {
@@ -141,6 +144,8 @@ export declare function usePwCodeConversation({ api, machine, sessionId, session
141
144
  allowedDirs: import("./types.js").PwCodeAllowedDirectory[] | null | undefined;
142
145
  refetch: () => Promise<unknown>;
143
146
  transcript: TranscriptState | null;
147
+ /** Only the end of the conversation is drawn: the rest of its transcript is still arriving. */
148
+ endOnly: boolean;
144
149
  sending: boolean;
145
150
  /** Hands each frame of the session's feed to the transcript and the subagent views. */
146
151
  onEvent: (ev: StreamEvent) => void;
@@ -193,6 +198,7 @@ export declare function usePwCodeConversation({ api, machine, sessionId, session
193
198
  refreshSubagents: () => void;
194
199
  stopSubagent: (id: string) => Promise<void>;
195
200
  stopAllSubagents: () => Promise<void>;
201
+ dismissSubagent: (id: string) => Promise<boolean>;
196
202
  mainState: PwCodeConversationState;
197
203
  };
198
204
  export type PwCodeConversation = ReturnType<typeof usePwCodeConversation>;
@@ -6,9 +6,9 @@ import { useCompactionNotice, useRecapNotice, useTranscriptWords } from "./notic
6
6
  import { isSession, sharedStoreCopy } from "./session.js";
7
7
  import { changesSubagents } from "./sessionEvents.js";
8
8
  import { pasteRefs, patchSessionNames } from "./sessionsApi.js";
9
- import { pendingApprovals, pendingMessages } from "./transcript.js";
9
+ import { initialTranscript, pendingApprovals, pendingMessages } from "./transcript.js";
10
10
  import { usePwCodeTranscript } from "./useTranscript.js";
11
- import { useCallback, useEffect, useRef, useState } from "react";
11
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
12
12
  // src/useConversation.ts
13
13
  /** A transcript's messages as a view draws them: those it holds, then the one
14
14
  * streaming, then those still waiting to be taken. */
@@ -55,6 +55,41 @@ function mainTurnAfter(ev) {
55
55
  if (ev.type === "user_message" || ev.type === "turn_start") return true;
56
56
  if (ev.turnId && (ev.type === "done" || ev.type === "error")) return false;
57
57
  }
58
+ /** The end of a conversation, drawn while the rest of its transcript is still
59
+ * arriving: nothing is live until the whole of it has. It stays until the
60
+ * whole is drawn in its place, a render after it arrives. */
61
+ function useConversationEnd(transcript, preview, { goalNotice, ...notices }) {
62
+ const [held, setHeld] = useState(preview);
63
+ if (preview && preview !== held) setHeld(preview);
64
+ const end = transcript ? void 0 : preview ?? held;
65
+ const { compactionNotice, recapNotice, words, imageUrl } = notices;
66
+ return useMemo(() => {
67
+ if (!end) return null;
68
+ const state = initialTranscript({
69
+ ...end,
70
+ approvals: []
71
+ }, {
72
+ ...goalNotice ? { goalNotice } : {},
73
+ compactionNotice,
74
+ recapNotice,
75
+ words,
76
+ imageUrl
77
+ });
78
+ const messages = state.streaming ? [...state.messages, state.streaming] : state.messages;
79
+ return {
80
+ messages,
81
+ queued: [],
82
+ all: messages
83
+ };
84
+ }, [
85
+ end,
86
+ goalNotice,
87
+ compactionNotice,
88
+ recapNotice,
89
+ words,
90
+ imageUrl
91
+ ]);
92
+ }
58
93
  /** An open session's conversation: its live transcript, sends routed to the
59
94
  * machine, approvals, the notice above the composer, and its subagents. The
60
95
  * host reads the listing and the session (`api.useSessions`,
@@ -63,7 +98,9 @@ function mainTurnAfter(ev) {
63
98
  function usePwCodeConversation({ api, machine, sessionId, sessions, detail: read, describeError, notify, onCleared, onMoved, goalNotice }) {
64
99
  const t = usePwCodeTranslations("agents");
65
100
  const { data: list, mutate: mutateSessions } = sessions;
66
- const { data: detail, mutate } = read;
101
+ const listNow = useRef(list);
102
+ listNow.current = list;
103
+ const { data: detail, mutate, preview } = read;
67
104
  const session = list?.sessions?.find((s) => isSession(s, machine, sessionId)) ?? detail;
68
105
  const moved = sharedStoreCopy(list, machine, sessionId);
69
106
  const onMovedRef = useRef(onMoved);
@@ -104,7 +141,11 @@ function usePwCodeConversation({ api, machine, sessionId, sessions, detail: read
104
141
  name: effect.state.name ?? "",
105
142
  autoName: effect.state.autoName ?? ""
106
143
  };
107
- mutateSessions((current) => patchSessionNames(current, machine, sessionId, names), { revalidate: false });
144
+ const renamed = patchSessionNames(listNow.current, machine, sessionId, names);
145
+ if (renamed !== listNow.current) {
146
+ listNow.current = renamed;
147
+ mutateSessions((current) => patchSessionNames(current, machine, sessionId, names), { revalidate: false });
148
+ }
108
149
  break;
109
150
  }
110
151
  case "notice": setNotice({
@@ -263,6 +304,22 @@ function usePwCodeConversation({ api, machine, sessionId, sessions, detail: read
263
304
  sessionId,
264
305
  showError
265
306
  ]);
307
+ /** Resolves to whether the machine took the subagent off the list. */
308
+ const dismissSubagent = useCallback(async (id) => {
309
+ const refusal = await api.dismissSubagent(machine, sessionId, id);
310
+ if (refusal) {
311
+ showError(refusal);
312
+ return false;
313
+ }
314
+ refreshSubagents();
315
+ return true;
316
+ }, [
317
+ api,
318
+ machine,
319
+ sessionId,
320
+ showError,
321
+ refreshSubagents
322
+ ]);
266
323
  const goal = liveState ? liveState.goal : detail?.goal;
267
324
  const addDirs = liveState ? liveState.addDirs : detail?.addDirs;
268
325
  const allowedDirs = liveState ? liveState.allowedDirs : detail?.allowedDirs;
@@ -270,6 +327,13 @@ function usePwCodeConversation({ api, machine, sessionId, sessions, detail: read
270
327
  const mainWaits = !!transcript && pendingApprovals(transcript).some((p) => !p.agent);
271
328
  const mainRuns = mainTurn ?? !!detail?.turnId;
272
329
  const mainState = mainWaits ? "approval" : mainRuns ? "running" : "idle";
330
+ const early = useConversationEnd(transcript, preview, {
331
+ goalNotice,
332
+ compactionNotice,
333
+ recapNotice,
334
+ words,
335
+ imageUrl
336
+ });
273
337
  return {
274
338
  /** The session as the listing has it, or as its fetch does until then. */
275
339
  session,
@@ -281,7 +345,9 @@ function usePwCodeConversation({ api, machine, sessionId, sessions, detail: read
281
345
  allowedDirs,
282
346
  refetch: mutate,
283
347
  transcript,
284
- ...transcriptMessages(transcript),
348
+ ...early ?? transcriptMessages(transcript),
349
+ /** Only the end of the conversation is drawn: the rest of its transcript is still arriving. */
350
+ endOnly: early !== null,
285
351
  sending,
286
352
  /** Hands each frame of the session's feed to the transcript and the subagent views. */
287
353
  onEvent,
@@ -308,6 +374,7 @@ function usePwCodeConversation({ api, machine, sessionId, sessions, detail: read
308
374
  refreshSubagents,
309
375
  stopSubagent,
310
376
  stopAllSubagents,
377
+ dismissSubagent,
311
378
  mainState
312
379
  };
313
380
  }
@@ -0,0 +1,3 @@
1
+ import { type RefObject } from 'react';
2
+ /** Whether the caller is still mounted, for work that finishes after it may have gone. */
3
+ export declare function useMounted(): RefObject<boolean>;
@@ -0,0 +1,14 @@
1
+ import { useEffect, useRef } from "react";
2
+ // src/useMounted.ts
3
+ /** Whether the caller is still mounted, for work that finishes after it may have gone. */
4
+ function useMounted() {
5
+ const mounted = useRef(false);
6
+ useEffect(() => {
7
+ mounted.current = true;
8
+ return () => {
9
+ mounted.current = false;
10
+ };
11
+ }, []);
12
+ return mounted;
13
+ }
14
+ export { useMounted };
@@ -46,6 +46,8 @@ export declare function usePwCodeSubagent({ api, machine, sessionId, subId, suba
46
46
  agent: PwCodeSwitcherAgent | undefined;
47
47
  /** The composer's draft key, under its session's and apart from the main conversation's. */
48
48
  draftKey: string;
49
+ /** The `id` its `promptHistory` takes, so ↑ in its composer recalls only what was sent to it. */
50
+ historyId: string;
49
51
  /** The model it runs on; empty until it is read, or when it names none. */
50
52
  model: string;
51
53
  /** That model's name as the session gives it, or its id without the provider. */
@@ -166,6 +166,8 @@ function usePwCodeSubagent({ api, machine, sessionId, subId, subagent, listed, u
166
166
  agent,
167
167
  /** The composer's draft key, under its session's and apart from the main conversation's. */
168
168
  draftKey: `${sessionDraftKey(sessionId, void 0)}:${subId}`,
169
+ /** The `id` its `promptHistory` takes, so ↑ in its composer recalls only what was sent to it. */
170
+ historyId: `${sessionId}:${subId}`,
169
171
  /** The model it runs on; empty until it is read, or when it names none. */
170
172
  model,
171
173
  /** That model's name as the session gives it, or its id without the provider. */
package/dist/wording.d.ts CHANGED
@@ -10,13 +10,16 @@ export declare const IMAGE_PLACEHOLDER: RegExp;
10
10
  export declare function rememberSentPrompt(machine: string, id: string, text: string): void;
11
11
  /** The id is never a label: it is a timestamp the reader did not choose. */
12
12
  export declare function sessionLabel(s: Pick<PwCodeSession, 'machineId' | 'id' | 'name' | 'autoName' | 'preview'>, t: Translate): string;
13
+ /** `resumeClock` writes when a usage limit resets, which is left out without it. */
13
14
  export declare function sessionStatusText(s: {
14
15
  status: PwCodeSessionStatus;
15
16
  liveHost?: string | undefined;
16
17
  approvals?: PwCodePendingApprovals;
17
- }, t: Translate): string;
18
+ waitingForUsageLimit?: boolean | undefined;
19
+ usageLimitResumeAt?: string | undefined;
20
+ }, t: Translate, resumeClock?: (at: string) => string): string;
18
21
  /** A dropped machine outranks the session's own state. */
19
- export declare function sessionStateText(s: Parameters<typeof sessionStatusText>[0], machine: Pick<PwCodeMachine, 'status'> | undefined, t: Translate): string;
22
+ export declare function sessionStateText(s: Parameters<typeof sessionStatusText>[0], machine: Pick<PwCodeMachine, 'status'> | undefined, t: Translate, resumeClock?: (at: string) => string): string;
20
23
  export declare function machineHint(machine: Pick<PwCodeMachine, 'status' | 'error' | 'agentVersion'>, t: Translate): {
21
24
  text: string;
22
25
  detail?: string;
package/dist/wording.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { isMachineDown } from "./machine.js";
2
- import { sessionKey, waitsOnAnswer } from "./session.js";
2
+ import { sessionKey, waitsOnAnswer, waitsOnUsageLimit } from "./session.js";
3
3
  import { nameToEmoji } from "gemoji";
4
4
  // src/wording.ts
5
5
  /** How a prompt refers to an image sent with it: `[Image #1]`. */
@@ -22,8 +22,10 @@ function sessionLabel(s, t) {
22
22
  return Object.hasOwn(nameToEmoji, key) ? nameToEmoji[key] ?? match : match;
23
23
  });
24
24
  }
25
- function sessionStatusText(s, t) {
25
+ /** `resumeClock` writes when a usage limit resets, which is left out without it. */
26
+ function sessionStatusText(s, t, resumeClock) {
26
27
  if (s.status === "awaiting_approval" && waitsOnAnswer(s.approvals)) return t("status.awaiting_answer");
28
+ if (waitsOnUsageLimit(s)) return s.usageLimitResumeAt && resumeClock ? t("status.usage_limit_until", { time: resumeClock(s.usageLimitResumeAt) }) : t("status.usage_limit");
27
29
  return t(`status.${s.status}`, { host: s.liveHost ?? "" });
28
30
  }
29
31
  var DOWN_STATUSES = [
@@ -36,8 +38,8 @@ function isDownStatus(status) {
36
38
  return DOWN_STATUSES.includes(status);
37
39
  }
38
40
  /** A dropped machine outranks the session's own state. */
39
- function sessionStateText(s, machine, t) {
40
- if (!isMachineDown(machine)) return sessionStatusText(s, t);
41
+ function sessionStateText(s, machine, t, resumeClock) {
42
+ if (!isMachineDown(machine)) return sessionStatusText(s, t, resumeClock);
41
43
  return t(`machine.${isDownStatus(machine.status) ? machine.status : "unreachable"}`);
42
44
  }
43
45
  function machineHint(machine, t) {
@@ -150,7 +150,8 @@
150
150
  },
151
151
  "input": {
152
152
  "stopGenerating": "Stop generating (Escape)",
153
- "loadingCommands": "Loading commands…"
153
+ "loadingCommands": "Loading commands…",
154
+ "emoji": "Emoji"
154
155
  },
155
156
  "thread": {
156
157
  "jumpToPrompt": "Go to message: {text}"
@@ -131,7 +131,9 @@
131
131
  "running": "running",
132
132
  "awaiting_approval": "approval needed",
133
133
  "awaiting_answer": "answer needed",
134
- "live_elsewhere": "live on {host}"
134
+ "live_elsewhere": "live on {host}",
135
+ "usage_limit": "usage limit reached",
136
+ "usage_limit_until": "limit resets {time}"
135
137
  },
136
138
  "machine": {
137
139
  "connected": "connected",
@@ -299,6 +301,7 @@
299
301
  "hideEarlier": "{count, plural, one {Hide # earlier agent} other {Hide # earlier agents}}",
300
302
  "agentName": "{type}: {description}",
301
303
  "stop": "Stop {name}",
304
+ "dismiss": "Remove {name} from the list",
302
305
  "stopThis": "Stop",
303
306
  "back": "Back to main",
304
307
  "tokens": "{tokens} tokens",
@@ -313,6 +316,12 @@
313
316
  "commandsOnMain": "Commands and ! run in the main conversation. Go back to main to use them.",
314
317
  "transcriptLabel": "Agent transcript"
315
318
  },
319
+ "tasks": {
320
+ "progress": "{done} of {total} done",
321
+ "more": "+{count} more",
322
+ "moreCompleted": "+{count} completed",
323
+ "fewer": "Show fewer"
324
+ },
316
325
  "effort": {
317
326
  "label": "Effort",
318
327
  "named": "Effort: {level}",
@@ -409,7 +418,10 @@
409
418
  "expired": "Sign-in expired. Try again."
410
419
  },
411
420
  "useAccount": "Use",
412
- "accountActions": "Actions for {account}"
421
+ "accountActions": "Actions for {account}",
422
+ "continueOnAnother": "Continue on another account",
423
+ "moveOthers": "{count, plural, one {Also move # other session on {account}} other {Also move # other sessions on {account}}}",
424
+ "movedOthers": "{count, plural, =0 {No other session moved to {account}} one {Moved # other session to {account}} other {Moved # other sessions to {account}}}"
413
425
  },
414
426
  "terminal": {
415
427
  "title": "Continue in a terminal",
@@ -150,7 +150,8 @@
150
150
  },
151
151
  "input": {
152
152
  "stopGenerating": "Detener generación (Escape)",
153
- "loadingCommands": "Cargando comandos..."
153
+ "loadingCommands": "Cargando comandos...",
154
+ "emoji": "Emojis"
154
155
  },
155
156
  "thread": {
156
157
  "jumpToPrompt": "Ir al mensaje: {text}"
@@ -131,7 +131,9 @@
131
131
  "running": "en ejecución",
132
132
  "awaiting_approval": "aprobación necesaria",
133
133
  "awaiting_answer": "respuesta necesaria",
134
- "live_elsewhere": "activa en {host}"
134
+ "live_elsewhere": "activa en {host}",
135
+ "usage_limit": "límite de uso alcanzado",
136
+ "usage_limit_until": "límite hasta {time}"
135
137
  },
136
138
  "machine": {
137
139
  "connected": "conectada",
@@ -299,6 +301,7 @@
299
301
  "hideEarlier": "{count, plural, one {Ocultar # agente anterior} other {Ocultar # agentes anteriores}}",
300
302
  "agentName": "{type}: {description}",
301
303
  "stop": "Detener {name}",
304
+ "dismiss": "Quitar {name} de la lista",
302
305
  "stopThis": "Detener",
303
306
  "back": "Volver a la principal",
304
307
  "tokens": "{tokens} tokens",
@@ -313,6 +316,12 @@
313
316
  "commandsOnMain": "Los comandos y ! se ejecutan en la conversación principal. Vuelve a ella para usarlos.",
314
317
  "transcriptLabel": "Transcripción del agente"
315
318
  },
319
+ "tasks": {
320
+ "progress": "{done} de {total} hechas",
321
+ "more": "+{count} más",
322
+ "moreCompleted": "+{count} completadas",
323
+ "fewer": "Mostrar menos"
324
+ },
316
325
  "effort": {
317
326
  "label": "Esfuerzo",
318
327
  "named": "Esfuerzo: {level}",
@@ -409,7 +418,10 @@
409
418
  "expired": "El inicio de sesión ha caducado. Vuelve a intentarlo."
410
419
  },
411
420
  "useAccount": "Usar",
412
- "accountActions": "Acciones de {account}"
421
+ "accountActions": "Acciones de {account}",
422
+ "continueOnAnother": "Continuar en otra cuenta",
423
+ "moveOthers": "{count, plural, one {Mover también # sesión más de {account}} other {Mover también # sesiones más de {account}}}",
424
+ "movedOthers": "{count, plural, =0 {Ninguna otra sesión se movió a {account}} one {Se movió # sesión más a {account}} other {Se movieron # sesiones más a {account}}}"
413
425
  },
414
426
  "terminal": {
415
427
  "title": "Continuar en una terminal",
@@ -150,7 +150,8 @@
150
150
  },
151
151
  "input": {
152
152
  "stopGenerating": "生成を停止 (Escape)",
153
- "loadingCommands": "コマンドを読み込み中..."
153
+ "loadingCommands": "コマンドを読み込み中...",
154
+ "emoji": "絵文字"
154
155
  },
155
156
  "thread": {
156
157
  "jumpToPrompt": "メッセージへ移動: {text}"
@@ -131,7 +131,9 @@
131
131
  "running": "実行中",
132
132
  "awaiting_approval": "承認が必要",
133
133
  "awaiting_answer": "回答が必要",
134
- "live_elsewhere": "{host} で稼働中"
134
+ "live_elsewhere": "{host} で稼働中",
135
+ "usage_limit": "使用量の上限に到達",
136
+ "usage_limit_until": "上限は {time} にリセット"
135
137
  },
136
138
  "machine": {
137
139
  "connected": "接続済み",
@@ -299,6 +301,7 @@
299
301
  "hideEarlier": "以前のエージェント{count}件を隠す",
300
302
  "agentName": "{type}: {description}",
301
303
  "stop": "{name} を停止",
304
+ "dismiss": "{name} を一覧から外す",
302
305
  "stopThis": "停止",
303
306
  "back": "メインに戻る",
304
307
  "tokens": "{tokens} トークン",
@@ -313,6 +316,12 @@
313
316
  "commandsOnMain": "コマンドと ! はメインの会話で実行されます。使うにはメインに戻ってください。",
314
317
  "transcriptLabel": "エージェントのトランスクリプト"
315
318
  },
319
+ "tasks": {
320
+ "progress": "{total} 件中 {done} 件完了",
321
+ "more": "ほか {count} 件",
322
+ "moreCompleted": "ほか {count} 件完了",
323
+ "fewer": "表示を減らす"
324
+ },
316
325
  "effort": {
317
326
  "label": "推論の強度",
318
327
  "named": "推論の強度:{level}",
@@ -409,7 +418,10 @@
409
418
  "expired": "ログインの有効期限が切れました。再試行してください。"
410
419
  },
411
420
  "useAccount": "使用する",
412
- "accountActions": "{account} の操作"
421
+ "accountActions": "{account} の操作",
422
+ "continueOnAnother": "別のアカウントで続行",
423
+ "moveOthers": "{count, plural, other {{account} の他の # 件のセッションも移動}}",
424
+ "movedOthers": "{count, plural, =0 {{account} に移動した他のセッションはありません} other {他の # 件のセッションを {account} に移動しました}}"
413
425
  },
414
426
  "terminal": {
415
427
  "title": "ターミナルで続ける",
@@ -150,7 +150,8 @@
150
150
  },
151
151
  "input": {
152
152
  "stopGenerating": "생성 중지 (Escape)",
153
- "loadingCommands": "명령 불러오는 중..."
153
+ "loadingCommands": "명령 불러오는 중...",
154
+ "emoji": "이모지"
154
155
  },
155
156
  "thread": {
156
157
  "jumpToPrompt": "메시지로 이동: {text}"
@@ -131,7 +131,9 @@
131
131
  "running": "실행 중",
132
132
  "awaiting_approval": "승인 필요",
133
133
  "awaiting_answer": "답변 필요",
134
- "live_elsewhere": "{host}에서 실행 중"
134
+ "live_elsewhere": "{host}에서 실행 중",
135
+ "usage_limit": "사용량 한도 도달",
136
+ "usage_limit_until": "한도 {time}에 초기화"
135
137
  },
136
138
  "machine": {
137
139
  "connected": "연결됨",
@@ -299,6 +301,7 @@
299
301
  "hideEarlier": "이전 에이전트 {count}개 숨기기",
300
302
  "agentName": "{type}: {description}",
301
303
  "stop": "{name} 중지",
304
+ "dismiss": "목록에서 {name} 제거",
302
305
  "stopThis": "중지",
303
306
  "back": "메인으로 돌아가기",
304
307
  "tokens": "{tokens} 토큰",
@@ -313,6 +316,12 @@
313
316
  "commandsOnMain": "명령과 ! 는 메인 대화에서 실행됩니다. 사용하려면 메인으로 돌아가세요.",
314
317
  "transcriptLabel": "에이전트 기록"
315
318
  },
319
+ "tasks": {
320
+ "progress": "{total}개 중 {done}개 완료",
321
+ "more": "+{count}개 더",
322
+ "moreCompleted": "+{count}개 완료",
323
+ "fewer": "간단히 보기"
324
+ },
316
325
  "effort": {
317
326
  "label": "추론 강도",
318
327
  "named": "추론 강도: {level}",
@@ -409,7 +418,10 @@
409
418
  "expired": "로그인이 만료되었습니다. 다시 시도하세요."
410
419
  },
411
420
  "useAccount": "사용",
412
- "accountActions": "{account} 작업"
421
+ "accountActions": "{account} 작업",
422
+ "continueOnAnother": "다른 계정으로 계속",
423
+ "moveOthers": "{count, plural, other {{account}의 다른 세션 #개도 이동}}",
424
+ "movedOthers": "{count, plural, =0 {{account}(으)로 이동한 다른 세션이 없습니다} other {다른 세션 #개를 {account}(으)로 이동했습니다}}"
413
425
  },
414
426
  "terminal": {
415
427
  "title": "터미널에서 계속하기",
@@ -150,7 +150,8 @@
150
150
  },
151
151
  "input": {
152
152
  "stopGenerating": "停止生成 (Escape)",
153
- "loadingCommands": "正在加载命令..."
153
+ "loadingCommands": "正在加载命令...",
154
+ "emoji": "表情符号"
154
155
  },
155
156
  "thread": {
156
157
  "jumpToPrompt": "跳到消息:{text}"
@@ -131,7 +131,9 @@
131
131
  "running": "运行中",
132
132
  "awaiting_approval": "需要批准",
133
133
  "awaiting_answer": "需要回答",
134
- "live_elsewhere": "在 {host} 上运行"
134
+ "live_elsewhere": "在 {host} 上运行",
135
+ "usage_limit": "已达用量上限",
136
+ "usage_limit_until": "上限于 {time} 重置"
135
137
  },
136
138
  "machine": {
137
139
  "connected": "已连接",
@@ -299,6 +301,7 @@
299
301
  "hideEarlier": "隐藏 {count} 个较早的代理",
300
302
  "agentName": "{type}: {description}",
301
303
  "stop": "停止 {name}",
304
+ "dismiss": "从列表中移除 {name}",
302
305
  "stopThis": "停止",
303
306
  "back": "返回主对话",
304
307
  "tokens": "{tokens} 个令牌",
@@ -313,6 +316,12 @@
313
316
  "commandsOnMain": "命令和 ! 在主对话中运行。请返回主对话后使用。",
314
317
  "transcriptLabel": "代理记录"
315
318
  },
319
+ "tasks": {
320
+ "progress": "已完成 {done}/{total}",
321
+ "more": "另外 {count} 项",
322
+ "moreCompleted": "另外 {count} 项已完成",
323
+ "fewer": "收起"
324
+ },
316
325
  "effort": {
317
326
  "label": "推理强度",
318
327
  "named": "推理强度:{level}",
@@ -409,7 +418,10 @@
409
418
  "expired": "登录已过期。请重试。"
410
419
  },
411
420
  "useAccount": "使用",
412
- "accountActions": "{account} 的操作"
421
+ "accountActions": "{account} 的操作",
422
+ "continueOnAnother": "改用其他账户继续",
423
+ "moveOthers": "{count, plural, other {同时移动 {account} 上的其他 # 个会话}}",
424
+ "movedOthers": "{count, plural, =0 {没有其他会话移至 {account}} other {已将其他 # 个会话移至 {account}}}"
413
425
  },
414
426
  "terminal": {
415
427
  "title": "在终端中继续",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parallelworks/code",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Shared client logic for pw code sessions on Parallel Works ACTIVATE: the session wire types, the transcript a session's history and event stream reduce to, and the words a session is shown in",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Parallel Works <support@parallelworks.com>",
@@ -34,7 +34,7 @@
34
34
  "@arethetypeswrong/cli": "^0.18.5",
35
35
  "@parallelworks/i18n": "^0.3.0",
36
36
  "@parallelworks/problem": "^0.6.1",
37
- "@parallelworks/ui": "^0.140.0",
37
+ "@parallelworks/ui": "^0.145.1",
38
38
  "@testing-library/dom": "^10.4.2",
39
39
  "@testing-library/react": "^16.3.3",
40
40
  "@types/luxon": "^3.7.6",