@fses/workbench-app 0.3.1 → 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.
Files changed (26) hide show
  1. package/WORKBENCH-CLOSURE.json +12 -12
  2. package/dist/{WorkbenchCardCenterDrawer-CNSq1coL.js → WorkbenchCardCenterDrawer-DMo5dpdg.js} +2 -2
  3. package/dist/{WorkbenchDiagnosticsFooter-DlRWlL9q.js → WorkbenchDiagnosticsFooter-DsZcWn7r.js} +1 -1
  4. package/dist/{WorkbenchDiagnosticsPage-CeXZkp9k.js → WorkbenchDiagnosticsPage-o-S-VCI4.js} +1 -1
  5. package/dist/{Workspace-562qQHC3.js → Workspace-D9n6dCC6.js} +8975 -8966
  6. package/dist/{customCardCatalog-DhntP1Sk.js → customCardCatalog-CSmqz_Lg.js} +1 -1
  7. package/dist/fses-workbench-app.js +2 -2
  8. package/dist/{index-p9gr-rM0.js → index-B_FhbxRB.js} +5 -5
  9. package/dist/internal/personal-workbench/components/workbench/WorkbenchStudio.vue.d.ts +4 -2
  10. package/dist/internal/personal-workbench/lib/deepAgentApi.d.ts +1 -0
  11. package/dist/internal/personal-workbench/lib/deepAgentQueueState.d.ts +8 -0
  12. package/dist/internal/personal-workbench/vue-types/workbenchRuntime.d.ts +2 -1
  13. package/dist/runtime/conversation/workbenchChatStop.d.ts +37 -0
  14. package/dist/runtime/index.js +1 -1
  15. package/dist/style.css +1 -1
  16. package/dist/{useWorkbenchRuntime-DJujrl4a.js → useWorkbenchRuntime-BDVKnPln.js} +7546 -7419
  17. package/dist/version.d.ts +1 -1
  18. package/node_modules/@fses/ai-chat/dist/fses-ai-chat.js +4632 -4540
  19. package/node_modules/@fses/ai-chat/dist/fses-ai-chat.umd.cjs +19 -16
  20. package/node_modules/@fses/ai-chat/dist/style.css +1 -1
  21. package/node_modules/@fses/ai-chat/package.json +3 -3
  22. package/node_modules/@fses/workbench-card/dist/fses-workbench-card-renderers.js +3082 -3055
  23. package/node_modules/@fses/workbench-card/package.json +1 -1
  24. package/node_modules/@fses/workbench-card/src/renderers/chart/useEchart.ts +44 -5
  25. package/node_modules/@fses/workbench-card/src/renderers/useWorkbenchBlockRendererBindings.ts +9 -0
  26. package/package.json +3 -3
@@ -4,7 +4,7 @@ import "@fses/workbench-card";
4
4
  import "@fses/workbench-card/registry";
5
5
  import { WorkbenchBlockRenderer as se } from "@fses/workbench-card/renderers";
6
6
  import { s as ne, e as de } from "./normalizeWorkbenchExtensions-Ccv3n3fC.js";
7
- import { _ as ce } from "./index-p9gr-rM0.js";
7
+ import { _ as ce } from "./index-B_FhbxRB.js";
8
8
  import { X as ue, AlertCircle as pe, Check as me } from "lucide-vue-next";
9
9
  import { clsx as be } from "clsx";
10
10
  import { twMerge as fe } from "tailwind-merge";
@@ -1,8 +1,8 @@
1
- import { D as s, F as o, G as r, H as t, I as n, A as c, J as l, K as i, L as p, B as A, M as C, N as d, O as m, P as E, Q as u, R as g, S as h, T as R, U as W, V as _, X as k, Y as P, Z as S, $ as b, a0 as T, C as v, p as f, y as M, r as L, e as y, h as O, i as N, s as D, g as I, a1 as B, u as H, w as x } from "./index-p9gr-rM0.js";
1
+ import { D as s, F as o, G as r, H as t, I as n, A as c, J as l, K as i, L as p, B as A, M as C, N as d, O as m, P as E, Q as u, R as g, S as h, T as R, U as W, V as _, X as k, Y as P, Z as S, $ as b, a0 as T, C as v, p as f, y as M, r as L, e as y, h as O, i as N, s as D, g as I, a1 as B, u as H, w as x } from "./index-B_FhbxRB.js";
2
2
  import { WORKBENCH_APP_I18N_PROJECTS as K, resolveWorkbenchI18nProjects as F } from "./i18n/index.js";
3
3
  import { D as U, L as V, S as Y, j, k as z, a as X, m as q, n as J, o as Q, h as Z, g as $, f as ee, p as ae, q as se, s as oe, t as re, l as te, u as ne, v as ce, w as le, x as ie, y as pe, r as Ae, z as Ce } from "./cardFactory-D5dyYSC3.js";
4
4
  import { c as me } from "./canvasFacade-ZFqB_i7z.js";
5
- import { D as ue, i as ge, j as he, k as Re, l as We, m as _e, n as ke, o as Pe, c as Se, a as be, p as Te, q as ve, e as fe, s as Me, t as Le, v as ye, w as Oe, x as Ne, y as De, z as Ie, A as Be, B as He, C as xe, E as we, F as Ke, G as Fe, H as Ge, I as Ue, J as Ve, K as Ye, L as je, M as ze, N as Xe, O as qe, P as Je, u as Qe, b as Ze, Q as $e, R as ea } from "./useWorkbenchRuntime-DJujrl4a.js";
5
+ import { D as ue, i as ge, j as he, k as Re, l as We, m as _e, n as ke, o as Pe, c as Se, a as be, p as Te, q as ve, e as fe, s as Me, t as Le, v as ye, w as Oe, x as Ne, y as De, z as Ie, A as Be, B as He, C as xe, E as we, F as Ke, G as Fe, H as Ge, I as Ue, J as Ve, K as Ye, L as je, M as ze, N as Xe, O as qe, P as Je, u as Qe, b as Ze, Q as $e, R as ea } from "./useWorkbenchRuntime-BDVKnPln.js";
6
6
  import { W as sa, a as oa, b as ra, c as ta, d as na } from "./normalizeWorkbenchExtensions-Ccv3n3fC.js";
7
7
  export {
8
8
  ue as DEEP_AGENT_TOOL_DISPLAY_NAMES,
@@ -4,10 +4,10 @@ import { d as u, f as Ae, g as _e, h as Re, i as Ve } from "./cardFactory-D5dyYS
4
4
  import { n as Ge, w as ze } from "./normalizeWorkbenchExtensions-Ccv3n3fC.js";
5
5
  import { W as Ce, a as Qe, c as je } from "./index-DkGYPLLJ.js";
6
6
  import { fetchEventSource as Ye } from "@microsoft/fetch-event-source";
7
- import { r as Je, e as Xe, d as Ze, f as et, g as tt, c as rt, a as nt, W as ot, h as st } from "./useWorkbenchRuntime-DJujrl4a.js";
7
+ import { r as Je, e as Xe, d as Ze, f as et, g as tt, c as rt, a as nt, W as ot, h as st } from "./useWorkbenchRuntime-BDVKnPln.js";
8
8
  import "./canvasFacade-ZFqB_i7z.js";
9
9
  import { useRoute as at } from "vue-router";
10
- const it = "0.3.1", ce = "workbench-app-version";
10
+ const it = "0.3.3", ce = "workbench-app-version";
11
11
  function ct() {
12
12
  if (typeof document > "u" || document.querySelector(`meta[name="${ce}"]`)) return !1;
13
13
  const e = document.createElement("meta");
@@ -303,7 +303,7 @@ const F = /* @__PURE__ */ M({
303
303
  }, 8, ["adapters", "config", "extensions"]));
304
304
  }
305
305
  }), Ct = "workbench.builtin.card-center", Wt = "workbench.card-center", le = "workbench.card-center.drawer", vt = "workbench.card-center.open", dn = "workbench.card-center.insert-system-card", ln = "workbench.card-center.insert-custom-card", un = "workbench.card-center.config-dialog-change", St = Q(
306
- () => import("./WorkbenchCardCenterDrawer-CNSq1coL.js")
306
+ () => import("./WorkbenchCardCenterDrawer-DMo5dpdg.js")
307
307
  );
308
308
  function Pt() {
309
309
  return {
@@ -331,7 +331,7 @@ function Pt() {
331
331
  version: "1.0.0"
332
332
  };
333
333
  }
334
- const Tt = "workbench.optional.diagnostics", Nt = "workbench.diagnostics.route", Ot = "workbench.diagnostics.refresh", Dt = "workbench.diagnostics.refreshed", ue = Q(() => import("./WorkbenchDiagnosticsPage-CeXZkp9k.js")), Mt = Q(() => import("./WorkbenchDiagnosticsFooter-DlRWlL9q.js"));
334
+ const Tt = "workbench.optional.diagnostics", Nt = "workbench.diagnostics.route", Ot = "workbench.diagnostics.refresh", Dt = "workbench.diagnostics.refreshed", ue = Q(() => import("./WorkbenchDiagnosticsPage-o-S-VCI4.js")), Mt = Q(() => import("./WorkbenchDiagnosticsFooter-DsZcWn7r.js"));
335
335
  function Bt() {
336
336
  return {
337
337
  id: Tt,
@@ -1047,7 +1047,7 @@ const hn = /* @__PURE__ */ M({
1047
1047
  });
1048
1048
  const o = ze(r.extensions);
1049
1049
  Ve(t.adapters, t.config, o);
1050
- const s = Q(() => import("./Workspace-562qQHC3.js"));
1050
+ const s = Q(() => import("./Workspace-D9n6dCC6.js"));
1051
1051
  return (a, i) => (k(), V(J(s), {
1052
1052
  "embed-in-portal": t.embedInPortal
1053
1053
  }, {
@@ -1,4 +1,5 @@
1
1
  import { type WorkbenchCardStyleConfig } from "@workbench-internal/lib/cardStyleConfig";
2
+ import { type WorkbenchTaskStopRequest } from '../../../../runtime/conversation/workbenchChatStop';
2
3
  import { type WorkbenchChatHistoryMessage } from "@workbench-internal/lib/workbenchChatHistory";
3
4
  import type { RestoredConversationTurn } from "@workbench-internal/lib/vueRuntimeAdapters";
4
5
  import { type MetricWorkbenchCardSpec } from "@workbench-internal/lib/aiMetricCardSpec";
@@ -31,6 +32,7 @@ export interface WorkbenchChatSendPayload {
31
32
  quickEntry?: FsesAiChatQuickEntry;
32
33
  selectedBlockId?: string;
33
34
  selectedSystemCard?: SystemCardWorkbenchPromptParams | null;
35
+ signal?: AbortSignal;
34
36
  }
35
37
  type __VLS_Props = {
36
38
  input: string;
@@ -127,7 +129,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
127
129
  pasteCardPrompt: (selection: SystemCardPromptSelection) => any;
128
130
  inputChange: (value: string) => any;
129
131
  send: (payload?: WorkbenchChatSendPayload) => any;
130
- stop: (turnId?: string) => any;
132
+ stop: (request: WorkbenchTaskStopRequest) => any;
131
133
  composerIntentSelect: (intent: WorkbenchIntentChannel) => any;
132
134
  toggleTurnCollapse: (turnId: string) => any;
133
135
  confirmLayoutDraft: (turnId: string) => any;
@@ -196,7 +198,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
196
198
  onPasteCardPrompt?: (selection: SystemCardPromptSelection) => any;
197
199
  onInputChange?: (value: string) => any;
198
200
  onSend?: (payload?: WorkbenchChatSendPayload) => any;
199
- onStop?: (turnId?: string) => any;
201
+ onStop?: (request: WorkbenchTaskStopRequest) => any;
200
202
  onComposerIntentSelect?: (intent: WorkbenchIntentChannel) => any;
201
203
  onToggleTurnCollapse?: (turnId: string) => any;
202
204
  onConfirmLayoutDraft?: (turnId: string) => any;
@@ -29,6 +29,7 @@ export interface DeepAgentRunView {
29
29
  runId: string;
30
30
  threadId: string;
31
31
  status: string;
32
+ queueVersion?: string;
32
33
  resumeId?: string;
33
34
  eventsUrl?: string;
34
35
  currentInterrupt?: DeepAgentPublicInterrupt;
@@ -6,6 +6,7 @@
6
6
  export type DeepAgentSubmissionStatus = 'submitting' | 'pending' | 'active' | 'retry_waiting' | 'accepted';
7
7
  export interface DeepAgentSubmissionState {
8
8
  idempotencyKey: string;
9
+ queueVersion?: string;
9
10
  runId?: string;
10
11
  threadId?: string;
11
12
  queuePosition?: number;
@@ -101,6 +102,13 @@ export declare function submissionForPrompt(prompt: string, originalPrompt: stri
101
102
  * @returns 已剥离附件正文与 clientContext 的轻量快照。
102
103
  */
103
104
  export declare function recoverableDeepAgentTurnSnapshot(turn: RecoverableTurnInput): RecoverableDeepAgentTurnSnapshot;
105
+ /**
106
+ * 判断队列快照是否不早于当前提交被服务端接受时的版本。
107
+ * @param submission - 当前 turn 的提交版本。
108
+ * @param snapshot - 待应用的服务端队列快照。
109
+ * @returns 可安全用于当前 submission 状态收敛时返回 true。
110
+ */
111
+ export declare function isQueueSnapshotEligibleForSubmission(submission: Pick<DeepAgentSubmissionState, 'queueVersion'>, snapshot: VersionedDeepAgentQueueSnapshot): boolean;
104
112
  /**
105
113
  * 单调合并轮询快照,避免慢响应覆盖更新的 owner 或队列位置。
106
114
  * @param current - 当前已应用快照。
@@ -3,6 +3,7 @@ import type { BusinessGroupContext, CardRecommendationItem } from '@fses/workben
3
3
  import type { ChartCardSpec } from '@fses/workbench-app/types';
4
4
  import type { MetricWorkbenchCardSpec } from '@workbench-internal/lib/aiMetricCardSpec';
5
5
  import type { WorkbenchChatHistoryMessage } from '@workbench-internal/lib/workbenchChatHistory';
6
+ import type { WorkbenchTaskStopRequest } from '../../../runtime/conversation/workbenchChatStop';
6
7
  import type { WorkbenchDataBindingQueryResult, WorkbenchContext, WorkbenchUpdateInfoPayload } from '@workbench-internal/lib/workbenchApi';
7
8
  import type { SystemCardWorkbenchPromptParams } from '@workbench-internal/lib/workbenchSystemCardPrompt';
8
9
  import type { AssistantPersonaKey, BlockLayout, ConversationTurn, LayoutConfig, MaterializedBlock, PlanResponse, RoleId, WorkbenchLayoutV4, WorkbenchSnapshot, WorkbenchTemplate } from '@fses/workbench-app/types';
@@ -118,7 +119,7 @@ export interface WorkbenchRuntimeActions {
118
119
  loadSnapshot: () => Promise<void>;
119
120
  runPrompt: (input: string, selectedBlockIdOrOptions?: string | null | WorkbenchRuntimeRunPromptOptions, assistantPersona?: AssistantPersonaKey) => Promise<string | void>;
120
121
  applyCardPatchPrompt: (input: string, options?: Pick<WorkbenchRuntimeRunPromptOptions, 'selectedBlockId' | 'selectedNestedBlock' | 'assistantPersona' | 'chatThreadId' | 'clientDraftId' | 'chatMessages'>) => Promise<void>;
121
- stopCurrentTask: () => void;
122
+ stopCurrentTask: (request?: WorkbenchTaskStopRequest) => Promise<void>;
122
123
  confirmLayoutDraft: (turnId: string) => Promise<void>;
123
124
  confirmCardMutation: (turnId: string) => Promise<void>;
124
125
  cancelCardMutation: (turnId: string) => Promise<void>;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @fileoverview 工作台聊天停止合同 - 区分用户停止与前端空闲超时并收口 transport
3
+ * @author seadon
4
+ * @created 2026-09-03
5
+ */
6
+ export type WorkbenchTaskStopReason = 'idle_timeout' | 'user_cancelled';
7
+ export declare const WORKBENCH_CHAT_IDLE_TIMEOUT_MESSAGE_ID = "FWA.6b9f1788443000000";
8
+ export interface WorkbenchTaskStopRequest {
9
+ message?: string;
10
+ reason: WorkbenchTaskStopReason;
11
+ turnId?: string;
12
+ }
13
+ export interface WorkbenchChatIdleTimeoutMessage {
14
+ content: string;
15
+ error: string;
16
+ id: string;
17
+ loading: false;
18
+ removeThinking: true;
19
+ role: 'status';
20
+ }
21
+ export interface SettleWorkbenchChatIdleTimeoutInput {
22
+ abortRequest: () => void;
23
+ isPending: () => boolean;
24
+ isTurnFinished: () => boolean;
25
+ message: string;
26
+ reject: (error: Error) => void;
27
+ removePending: () => void;
28
+ showError: (message: WorkbenchChatIdleTimeoutMessage) => void;
29
+ stop: (request: WorkbenchTaskStopRequest) => void;
30
+ turnId?: string;
31
+ }
32
+ /**
33
+ * 收口仍有效的工作台聊天空闲超时。
34
+ * @param input - pending 校验、清理、停止通知与 transport reject 回调
35
+ * @returns 本次是否实际处理了超时
36
+ */
37
+ export declare function settleWorkbenchChatIdleTimeout(input: SettleWorkbenchChatIdleTimeoutInput): boolean;
@@ -1,4 +1,4 @@
1
- import { W as o, c as r, a as t, u as a, b as c } from "../useWorkbenchRuntime-DJujrl4a.js";
1
+ import { W as o, c as r, a as t, u as a, b as c } from "../useWorkbenchRuntime-BDVKnPln.js";
2
2
  export {
3
3
  o as WORKBENCH_RUNTIME_STORE_DEFINITION_KEY,
4
4
  r as createWorkbenchRuntimeScope,