@tutti-os/agent-gui 0.0.28 → 0.0.30

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 (47) hide show
  1. package/dist/{AgentMentionSearchController-2Vjvmzh3.d.ts → AgentMentionSearchController-D5ks45fN.d.ts} +1 -0
  2. package/dist/{AgentMessageMarkdown-CZaG-QW3.d.ts → AgentMessageMarkdown-Cp70W-Z2.d.ts} +20 -2
  3. package/dist/agent-conversation/index.d.ts +4 -4
  4. package/dist/agent-conversation/index.js +6 -6
  5. package/dist/agent-message-center/index.d.ts +2 -2
  6. package/dist/agent-message-center/index.js +5 -5
  7. package/dist/{agentConversationVM-BvlmCNOm.d.ts → agentConversationVM-BElW2LNR.d.ts} +1 -1
  8. package/dist/app/renderer/agentactivity.css +40 -9
  9. package/dist/{chunk-IBQO76IY.js → chunk-AFTAFV2C.js} +3 -3
  10. package/dist/{chunk-XAQQN6MP.js → chunk-FG66NW5M.js} +2 -2
  11. package/dist/{chunk-LKT3EFGR.js → chunk-J2DMJREM.js} +127 -46
  12. package/dist/chunk-J2DMJREM.js.map +1 -0
  13. package/dist/{chunk-ILBFIZCI.js → chunk-MFWZKYZ4.js} +31 -40
  14. package/dist/chunk-MFWZKYZ4.js.map +1 -0
  15. package/dist/{chunk-B7DTDZVT.js → chunk-OOQIJXCA.js} +114 -12
  16. package/dist/chunk-OOQIJXCA.js.map +1 -0
  17. package/dist/{chunk-LHN26OIP.js → chunk-RDCBACWR.js} +5 -5
  18. package/dist/{chunk-GLDKFIWM.js → chunk-RQ3HEF42.js} +7 -7
  19. package/dist/chunk-RQ3HEF42.js.map +1 -0
  20. package/dist/{chunk-EWWAG26H.js → chunk-SGQ4C7JE.js} +1 -1
  21. package/dist/chunk-SGQ4C7JE.js.map +1 -0
  22. package/dist/{chunk-F7XLV7M3.js → chunk-WPWZKKKV.js} +2 -2
  23. package/dist/chunk-Y35GDLP2.js +88 -0
  24. package/dist/chunk-Y35GDLP2.js.map +1 -0
  25. package/dist/context-mention-palette/index.d.ts +4 -3
  26. package/dist/context-mention-palette/index.js +7 -7
  27. package/dist/i18n/index.d.ts +6 -6
  28. package/dist/i18n/index.js +1 -1
  29. package/dist/index.d.ts +9 -8
  30. package/dist/index.js +557 -79
  31. package/dist/index.js.map +1 -1
  32. package/dist/plan-decision-ops.d.ts +2 -2
  33. package/dist/workspace-agent-generated-files.d.ts +1 -1
  34. package/dist/workspace-agent-generated-files.js +3 -3
  35. package/dist/{workspaceAgentActivityListViewModel-jRF8cP37.d.ts → workspaceAgentActivityListViewModel-DwpbJGDx.d.ts} +4 -1
  36. package/package.json +12 -12
  37. package/dist/chunk-B7DTDZVT.js.map +0 -1
  38. package/dist/chunk-EWWAG26H.js.map +0 -1
  39. package/dist/chunk-GLDKFIWM.js.map +0 -1
  40. package/dist/chunk-ILBFIZCI.js.map +0 -1
  41. package/dist/chunk-LKT3EFGR.js.map +0 -1
  42. package/dist/chunk-XJ34OIEQ.js +0 -18
  43. package/dist/chunk-XJ34OIEQ.js.map +0 -1
  44. /package/dist/{chunk-IBQO76IY.js.map → chunk-AFTAFV2C.js.map} +0 -0
  45. /package/dist/{chunk-XAQQN6MP.js.map → chunk-FG66NW5M.js.map} +0 -0
  46. /package/dist/{chunk-LHN26OIP.js.map → chunk-RDCBACWR.js.map} +0 -0
  47. /package/dist/{chunk-F7XLV7M3.js.map → chunk-WPWZKKKV.js.map} +0 -0
@@ -193,4 +193,4 @@ export {
193
193
  useOptionalAgentHostApi,
194
194
  getOptionalAgentHostApi
195
195
  };
196
- //# sourceMappingURL=chunk-EWWAG26H.js.map
196
+ //# sourceMappingURL=chunk-SGQ4C7JE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../agentActivityRuntime.tsx","../agentActivityHost.tsx","../host/agentHostApi.ts"],"sourcesContent":["import {\n createContext,\n useContext,\n useSyncExternalStore,\n type JSX,\n type PropsWithChildren\n} from \"react\";\nimport type {\n AgentActivityCancelSessionInput,\n AgentActivityCancelSessionResult,\n AgentActivityCreateSessionInput,\n AgentActivityDeleteSessionInput,\n AgentActivityDeleteSessionResult,\n AgentActivityMessageOrder,\n AgentActivityMessagePage,\n AgentActivitySendInput,\n AgentActivitySendInputResult,\n AgentActivitySession,\n AgentActivitySnapshot,\n AgentActivitySnapshotListener,\n AgentActivitySubmitInteractiveInput\n} from \"@tutti-os/agent-activity-core\";\nimport type {\n AgentHostAgentSessionComposerSettings,\n AgentHostActivateAgentSessionResult,\n AgentHostRuntimeOpenclawGatewayWarmupResult,\n AgentHostUpdateAgentSessionSettingsResult,\n AgentHostUnactivateAgentSessionResult,\n AgentHostAgentSessionState\n} from \"./shared/contracts/dto\";\n\nexport interface AgentActivityRuntimeListSessionMessagesInput {\n afterVersion?: number;\n beforeVersion?: number;\n agentSessionId: string;\n limit?: number;\n order?: AgentActivityMessageOrder;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListGeneratedFilesInput {\n limit?: number;\n query?: string;\n sessionCwd?: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeGeneratedFile {\n label: string;\n path: string;\n}\n\nexport interface AgentActivityRuntimeGeneratedFileList {\n entries: AgentActivityRuntimeGeneratedFile[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeEnsureSessionSynchronizedInput {\n afterVersion?: number;\n agentSessionId: string;\n onError?: (error: unknown) => void;\n workspaceId: string;\n}\n\nexport type AgentActivityRuntimeRetainSessionEventsInput =\n AgentActivityRuntimeEnsureSessionSynchronizedInput;\n\nexport interface AgentActivityRuntimeSetSessionPinnedInput {\n agentSessionId: string;\n pinned: boolean;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeTrackSettingsProjectChangeInput {\n action: \"clear\" | \"create_new\" | \"select_existing\";\n agentSessionId: string;\n provider?: string | null;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeGetSessionControlStateInput {\n agentSessionId: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeGetComposerOptionsInput {\n cwd?: string | null;\n force?: boolean;\n provider?: string;\n settings?: AgentHostAgentSessionComposerSettings | null;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUpdateSessionSettingsInput {\n agentSessionId: string;\n settings: AgentHostAgentSessionComposerSettings;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeTrackDraftComposerSettingsChangeInput {\n nextSettings: AgentHostAgentSessionComposerSettings;\n previousSettings: AgentHostAgentSessionComposerSettings;\n provider: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeWarmupOpenclawGatewayInput {\n workspaceId?: string | null;\n}\n\nexport interface AgentActivityRuntimeDiagnosticInput {\n details?: Record<string, unknown>;\n event: string;\n level?: \"debug\" | \"info\" | \"warn\" | \"error\";\n source?: string;\n workspaceId?: string | null;\n}\n\nexport interface AgentActivityRuntimeActivateSessionInput {\n agentSessionId: string;\n cwd?: string;\n initialContent?: AgentActivitySendInput[\"content\"];\n /** 仅展示用首轮文本(bundle 折叠成一个 chip);initialContent 仍带展开后的文件。 */\n initialDisplayPrompt?: string | null;\n metadata?: Record<string, unknown>;\n mode: \"existing\" | \"new\";\n openclawGatewayReady?: boolean;\n provider?: string;\n settings?: AgentHostAgentSessionComposerSettings;\n title?: string;\n visible?: boolean;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUnactivateSessionInput {\n agentSessionId: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeReadSessionAttachmentInput {\n agentSessionId: string;\n attachmentId: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeReadPromptAssetInput {\n agentSessionId?: string | null;\n assetId?: string | null;\n hostPath?: string | null;\n kind?: string | null;\n mimeType: string;\n name?: string | null;\n path?: string | null;\n sha256?: string | null;\n uploadStatus?: string | null;\n uri?: string | null;\n workspaceId: string;\n}\n\nexport type AgentActivityRuntimePromptContentBlock =\n AgentActivitySendInput[\"content\"][number] & {\n assetId?: string;\n hostPath?: string;\n kind?: string;\n path?: string;\n sizeBytes?: number;\n uploadStatus?: string;\n uri?: string;\n };\n\nexport interface AgentActivityRuntimeUploadPromptContentInput {\n content: AgentActivityRuntimePromptContentBlock[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUploadPromptContentResult {\n content: AgentActivityRuntimePromptContentBlock[];\n}\n\nexport interface AgentActivityRuntimeSessionAttachment {\n attachmentId: string;\n mimeType: string;\n name?: string;\n data: string;\n}\n\nexport interface AgentActivityRuntimePromptAsset {\n assetId?: string;\n hostPath?: string;\n kind?: string;\n mimeType: string;\n name?: string;\n path: string;\n uploadStatus?: string;\n uri?: string;\n data: string;\n}\n\nexport interface AgentActivityRuntime {\n cancelSession(\n input: AgentActivityCancelSessionInput\n ): Promise<AgentActivityCancelSessionResult>;\n createSession(\n input: AgentActivityCreateSessionInput\n ): Promise<AgentActivitySession>;\n deleteSession(\n input: AgentActivityDeleteSessionInput\n ): Promise<AgentActivityDeleteSessionResult>;\n activateSession(\n input: AgentActivityRuntimeActivateSessionInput\n ): Promise<AgentHostActivateAgentSessionResult>;\n getSession(\n workspaceId: string,\n agentSessionId: string\n ): Promise<AgentActivitySession>;\n getComposerOptions(\n input: AgentActivityRuntimeGetComposerOptionsInput\n ): Promise<unknown>;\n updateSessionSettings(\n input: AgentActivityRuntimeUpdateSessionSettingsInput\n ): Promise<AgentHostUpdateAgentSessionSettingsResult>;\n warmupOpenclawGateway?(\n input?: AgentActivityRuntimeWarmupOpenclawGatewayInput\n ): Promise<AgentHostRuntimeOpenclawGatewayWarmupResult>;\n getSessionControlState(\n input: AgentActivityRuntimeGetSessionControlStateInput\n ): Promise<AgentHostAgentSessionState>;\n getSnapshot(workspaceId: string): AgentActivitySnapshot;\n listSessionMessages(\n input: AgentActivityRuntimeListSessionMessagesInput\n ): Promise<AgentActivityMessagePage>;\n listAgentGeneratedFiles?(\n input: AgentActivityRuntimeListGeneratedFilesInput\n ): Promise<AgentActivityRuntimeGeneratedFileList>;\n load(\n workspaceId: string,\n signal?: AbortSignal\n ): Promise<AgentActivitySnapshot>;\n ensureSessionSynchronized?(\n input: AgentActivityRuntimeEnsureSessionSynchronizedInput\n ): () => void;\n /** @deprecated Use ensureSessionSynchronized. */\n retainSessionEvents(\n input: AgentActivityRuntimeRetainSessionEventsInput\n ): () => void;\n sendInput(\n input: AgentActivitySendInput\n ): Promise<AgentActivitySendInputResult>;\n uploadPromptContent?(\n input: AgentActivityRuntimeUploadPromptContentInput\n ): Promise<AgentActivityRuntimeUploadPromptContentResult>;\n readSessionAttachment?(\n input: AgentActivityRuntimeReadSessionAttachmentInput\n ): Promise<AgentActivityRuntimeSessionAttachment>;\n readPromptAsset?(\n input: AgentActivityRuntimeReadPromptAssetInput\n ): Promise<AgentActivityRuntimePromptAsset>;\n setSessionPinned(\n input: AgentActivityRuntimeSetSessionPinnedInput\n ): Promise<AgentActivitySession>;\n trackSettingsProjectChange?(\n input: AgentActivityRuntimeTrackSettingsProjectChangeInput\n ): Promise<void>;\n trackDraftComposerSettingsChange?(\n input: AgentActivityRuntimeTrackDraftComposerSettingsChangeInput\n ): Promise<void>;\n reportDiagnostic?(\n input: AgentActivityRuntimeDiagnosticInput\n ): Promise<void> | void;\n unactivateSession(\n input: AgentActivityRuntimeUnactivateSessionInput\n ): Promise<AgentHostUnactivateAgentSessionResult>;\n submitInteractive(\n input: AgentActivitySubmitInteractiveInput\n ): Promise<unknown>;\n subscribeSessionEvents(\n workspaceId: string,\n listener: (event: unknown) => void\n ): () => void;\n subscribe(\n workspaceId: string,\n listener: AgentActivitySnapshotListener\n ): () => void;\n}\n\nconst AgentActivityRuntimeContext = createContext<AgentActivityRuntime | null>(\n null\n);\n\nlet currentAgentActivityRuntime: AgentActivityRuntime | null = null;\n\nexport interface AgentActivityRuntimeProviderProps extends PropsWithChildren {\n runtime?: AgentActivityRuntime | null;\n}\n\nexport function AgentActivityRuntimeProvider({\n children,\n runtime\n}: AgentActivityRuntimeProviderProps): JSX.Element {\n currentAgentActivityRuntime = runtime ?? null;\n return (\n <AgentActivityRuntimeContext.Provider value={runtime ?? null}>\n {children}\n </AgentActivityRuntimeContext.Provider>\n );\n}\n\nexport function useAgentActivityRuntime(): AgentActivityRuntime {\n const runtime =\n useContext(AgentActivityRuntimeContext) ?? getTestAgentActivityRuntime();\n if (!runtime) {\n throw new Error(\n \"AgentActivityRuntimeProvider is missing an AgentActivityRuntime instance.\"\n );\n }\n return runtime;\n}\n\nexport function useOptionalAgentActivityRuntime(): AgentActivityRuntime | null {\n return (\n useContext(AgentActivityRuntimeContext) ?? getTestAgentActivityRuntime()\n );\n}\n\nexport function useAgentActivitySnapshot(\n workspaceId: string\n): AgentActivitySnapshot {\n const runtime = useAgentActivityRuntime();\n const normalizedWorkspaceId = workspaceId.trim();\n return useSyncExternalStore(\n (listener) => runtime.subscribe(normalizedWorkspaceId, listener),\n () => runtime.getSnapshot(normalizedWorkspaceId),\n () => runtime.getSnapshot(normalizedWorkspaceId)\n );\n}\n\nexport function getAgentActivityRuntime(): AgentActivityRuntime {\n const runtime =\n getExplicitWindowTestAgentActivityRuntime() ??\n currentAgentActivityRuntime ??\n getTestAgentActivityRuntime();\n if (!runtime) {\n throw new Error(\n \"AgentActivityRuntimeProvider is missing an AgentActivityRuntime instance.\"\n );\n }\n return runtime;\n}\n\nexport function getOptionalAgentActivityRuntime(): AgentActivityRuntime | null {\n return (\n getExplicitWindowTestAgentActivityRuntime() ??\n currentAgentActivityRuntime ??\n getTestAgentActivityRuntime()\n );\n}\n\nexport function resetAgentActivityRuntimeForTests(): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentActivityRuntime = null;\n }\n}\n\nexport function setAgentActivityRuntimeForTests(\n runtime: AgentActivityRuntime | null\n): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentActivityRuntime = runtime;\n }\n}\n\nfunction getTestAgentActivityRuntime(): AgentActivityRuntime | null {\n if (process.env.NODE_ENV !== \"test\") {\n return null;\n }\n if (typeof window === \"undefined\") {\n return null;\n }\n const explicitRuntime = getExplicitWindowTestAgentActivityRuntime();\n if (explicitRuntime) {\n return explicitRuntime;\n }\n if (currentAgentActivityRuntime) {\n return currentAgentActivityRuntime;\n }\n const testRuntime = (\n window as unknown as Window & {\n agentActivityRuntime?: AgentActivityRuntime;\n }\n ).agentActivityRuntime;\n return testRuntime ?? null;\n}\n\nfunction getExplicitWindowTestAgentActivityRuntime(): AgentActivityRuntime | null {\n if (process.env.NODE_ENV !== \"test\" || typeof window === \"undefined\") {\n return null;\n }\n const testDescriptor = Object.getOwnPropertyDescriptor(\n window,\n \"agentActivityRuntime\"\n );\n if (!testDescriptor || !(\"value\" in testDescriptor)) {\n return null;\n }\n return (testDescriptor.value as AgentActivityRuntime | undefined) ?? null;\n}\n","import {\n createContext,\n useContext,\n useMemo,\n type JSX,\n type PropsWithChildren\n} from \"react\";\nimport {\n toAgentHostRuntimeApi,\n type AgentHostInputApi,\n type AgentHostRuntimeApi\n} from \"./host/agentHostApi\";\nimport {\n AgentActivityRuntimeProvider,\n type AgentActivityRuntime\n} from \"./agentActivityRuntime\";\n\nconst AgentActivityHostContext = createContext<AgentHostRuntimeApi | null>(\n null\n);\n\nlet currentAgentHostApi: AgentHostRuntimeApi | null = null;\n\nexport interface AgentActivityHostProviderProps extends PropsWithChildren {\n agentActivityRuntime?: AgentActivityRuntime | null;\n agentHostApi?: AgentHostInputApi | null;\n}\n\nexport function AgentActivityHostProvider({\n agentActivityRuntime,\n agentHostApi,\n children\n}: AgentActivityHostProviderProps): JSX.Element {\n const resolvedAgentHostApi = useMemo(\n () => (agentHostApi ? toAgentHostRuntimeApi(agentHostApi) : null),\n [agentHostApi]\n );\n currentAgentHostApi = resolvedAgentHostApi;\n return (\n <AgentActivityRuntimeProvider runtime={agentActivityRuntime}>\n <AgentActivityHostContext.Provider value={resolvedAgentHostApi}>\n {children}\n </AgentActivityHostContext.Provider>\n </AgentActivityRuntimeProvider>\n );\n}\n\nexport function useAgentHostApi(): AgentHostRuntimeApi {\n const agentHostApi =\n useContext(AgentActivityHostContext) ?? getTestAgentHostApi();\n if (!agentHostApi) {\n throw new Error(\n \"AgentActivityHostProvider is missing an agentHostApi instance.\"\n );\n }\n return agentHostApi;\n}\n\nexport function useOptionalAgentHostApi(): AgentHostRuntimeApi | null {\n return useContext(AgentActivityHostContext) ?? getTestAgentHostApi();\n}\n\nexport function getAgentHostApi(): AgentHostRuntimeApi {\n const agentHostApi =\n getExplicitWindowTestAgentHostApi() ??\n currentAgentHostApi ??\n getTestAgentHostApi();\n if (!agentHostApi) {\n throw new Error(\n \"AgentActivityHostProvider is missing an agentHostApi instance.\"\n );\n }\n return agentHostApi;\n}\n\nexport function getOptionalAgentHostApi(): AgentHostRuntimeApi | null {\n return (\n getExplicitWindowTestAgentHostApi() ??\n currentAgentHostApi ??\n getTestAgentHostApi()\n );\n}\n\nexport function resetAgentHostApiForTests(): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentHostApi = null;\n }\n}\n\nexport function setAgentHostApiForTests(\n agentHostApi: AgentHostInputApi | AgentHostRuntimeApi | null\n): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentHostApi = agentHostApi\n ? toAgentHostRuntimeApi(agentHostApi)\n : null;\n }\n}\n\nfunction getTestAgentHostApi(): AgentHostRuntimeApi | null {\n if (process.env.NODE_ENV !== \"test\") {\n return null;\n }\n if (typeof window === \"undefined\") {\n return null;\n }\n const explicitAgentHostApi = getExplicitWindowTestAgentHostApi();\n if (explicitAgentHostApi) {\n return explicitAgentHostApi;\n }\n if (currentAgentHostApi) {\n return currentAgentHostApi;\n }\n const testAgentHostApi = (\n window as unknown as Window & {\n agentHostApi?: AgentHostInputApi | AgentHostRuntimeApi;\n }\n ).agentHostApi;\n return testAgentHostApi ? toAgentHostRuntimeApi(testAgentHostApi) : null;\n}\n\nfunction getExplicitWindowTestAgentHostApi(): AgentHostRuntimeApi | null {\n if (process.env.NODE_ENV !== \"test\" || typeof window === \"undefined\") {\n return null;\n }\n const testDescriptor = Object.getOwnPropertyDescriptor(\n window,\n \"agentHostApi\"\n );\n if (!testDescriptor || !(\"value\" in testDescriptor)) {\n return null;\n }\n const testAgentHostApi = testDescriptor.value as\n | AgentHostInputApi\n | AgentHostRuntimeApi\n | undefined;\n return testAgentHostApi ? toAgentHostRuntimeApi(testAgentHostApi) : null;\n}\n","import type {\n AgentHostBatchUserInfoInput,\n AgentHostBatchUserInfoResult,\n AgentHostDeleteWorkspaceAgentSessionInput,\n AgentHostWorkspaceAgentListInput as AgentHostListWorkspaceAgentsInput,\n AgentHostListWorkspaceAgentProbesInput,\n AgentHostWorkspaceAgentSessionMessages,\n AgentHostWorkspaceAgentSessionMessagesInput,\n AgentHostWorkspaceAgentSessionSummary,\n AgentHostWorkspaceAgentSessionSummaryInput,\n AgentHostWorkspaceAgentProbesResult,\n AgentHostWorkspaceAgentSnapshot,\n ReadWorkspaceFileResult as AgentHostReadWorkspaceFileResult\n} from \"../shared/contracts/dto\";\nimport type { WorkspaceUserProjectService } from \"@tutti-os/workspace-user-project/contracts\";\n\ntype AgentHostAsyncResult<T = any> = Promise<T>;\ntype AgentHostRecord = Record<string, unknown>;\ntype AgentHostUnsubscribe = () => void;\ntype AgentHostWorkspaceScopedInput<\n T extends {\n workspaceId?: string | null;\n }\n> = Omit<T, \"workspaceId\"> & {\n workspaceId: string;\n};\ntype AgentHostWorkspaceAgentsListInput =\n AgentHostWorkspaceScopedInput<AgentHostListWorkspaceAgentsInput>;\ntype AgentHostWorkspaceAgentSessionMessagesRuntimeInput =\n AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentSessionMessagesInput>;\ntype AgentHostWorkspaceAgentSessionSummaryRuntimeInput =\n AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentSessionSummaryInput>;\ntype AgentHostDeleteWorkspaceAgentSessionRuntimeInput =\n AgentHostWorkspaceScopedInput<AgentHostDeleteWorkspaceAgentSessionInput>;\n\nexport type AgentHostClipboardApi = {\n writeText: (text: string) => AgentHostAsyncResult<void>;\n};\n\nexport type AgentHostDebugApi = {\n logRuntimeDiagnostics: (\n payload: unknown\n ) => AgentHostAsyncResult<void> | void;\n logTerminalDiagnostics?: (\n payload: unknown\n ) => AgentHostAsyncResult<void> | void;\n};\n\nexport type AgentHostFilesystemApi = AgentHostRecord & {\n readFileText: (payload: {\n path?: string;\n uri?: string;\n }) => AgentHostAsyncResult<{\n content: string;\n name?: string;\n path?: string;\n }>;\n};\n\nexport type AgentHostMetaApi = AgentHostRecord & {\n appVersion?: string | null;\n isPackaged?: boolean;\n isTest?: boolean;\n mainPid?: number | null;\n platform?: string;\n workspaceId?: string;\n};\n\nexport type AgentHostEnvironmentApi = AgentHostRecord & {\n getBaseUrl?: () => AgentHostAsyncResult<string>;\n warmupOpenclawGateway?: (input?: unknown) => AgentHostAsyncResult<unknown>;\n};\n\nexport interface AgentHostSelectedFile {\n name?: string;\n path: string;\n}\n\nexport interface AgentHostSelectFilesInput {\n allowDirectories?: boolean;\n}\n\nexport type AgentHostWorkspaceApi = AgentHostRecord & {\n copyPath?: (input: { path: string }) => AgentHostAsyncResult<void>;\n ensureDirectory: (input: { path: string }) => AgentHostAsyncResult<void>;\n getPathForFile: (file: File) => string;\n readFile: (input: {\n path: string;\n }) => AgentHostAsyncResult<AgentHostReadWorkspaceFileResult>;\n selectContextEntries?: () => AgentHostAsyncResult<{ entries: unknown[] }>;\n selectDirectory: () => AgentHostAsyncResult<{ path: string } | null>;\n selectFiles: (\n input?: AgentHostSelectFilesInput\n ) => AgentHostAsyncResult<AgentHostSelectedFile[]>;\n writeFileText: (input: {\n content: string;\n path: string;\n }) => AgentHostAsyncResult<unknown>;\n};\n\nexport interface AgentHostInputApi {\n account?: AgentHostAccountApi;\n agentGuiBatch?: AgentHostAgentGuiBatchApi;\n agentSessions?: AgentHostAgentSessionsApi;\n clipboard: AgentHostClipboardApi;\n debug?: AgentHostDebugApi;\n filesystem: AgentHostFilesystemApi;\n meta?: AgentHostMetaApi;\n onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n runtime?: AgentHostEnvironmentApi;\n userProjects?: AgentHostUserProjectsApi;\n workspace: AgentHostWorkspaceApi;\n workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;\n workspaceAgents?: AgentHostWorkspaceAgentsApi;\n}\n\nexport type AgentHostApi = AgentHostInputApi;\n\nexport type AgentHostAccountApi = AgentHostRecord & {\n batchGetUserInfo: (\n input: AgentHostBatchUserInfoInput\n ) => AgentHostAsyncResult<AgentHostBatchUserInfoResult>;\n ensureProfiles?: (input: any) => AgentHostAsyncResult<any>;\n};\n\nexport type AgentHostAgentGuiBatchApi = AgentHostRecord & {\n exportRun: (input: any) => AgentHostAsyncResult<any>;\n};\n\nexport type AgentHostWorkspaceAgentProbesApi = AgentHostRecord & {\n list: (\n input: AgentHostListWorkspaceAgentProbesInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentProbesResult>;\n};\n\nexport type AgentProviderProbeListInput =\n AgentHostListWorkspaceAgentProbesInput;\nexport type AgentProviderProbeListResult = AgentHostWorkspaceAgentProbesResult;\n\nexport interface AgentHostUserProject {\n id: string;\n path: string;\n label: string;\n createdAtUnixMs?: number;\n updatedAtUnixMs?: number;\n lastUsedAtUnixMs?: number;\n}\n\nexport type AgentHostUserProjectsApi = AgentHostRecord & {\n service?: WorkspaceUserProjectService;\n checkPath?: (input: { path: string }) => AgentHostAsyncResult<{\n exists: boolean;\n isDirectory: boolean;\n path: string;\n }>;\n create?: (input: {\n name: string;\n }) => AgentHostAsyncResult<AgentHostUserProject>;\n getDefaultSelection?: () => AgentHostAsyncResult<{\n path: string | null;\n } | null>;\n list: () => AgentHostAsyncResult<{\n projects: AgentHostUserProject[];\n }>;\n subscribe?: (listener: () => void) => AgentHostUnsubscribe;\n prepareSelection?: (input: {\n projectLocked: boolean;\n selectedPath: string | null;\n }) => AgentHostAsyncResult<{\n isSelectedPathMissing: boolean;\n projects: AgentHostUserProject[];\n selection:\n | {\n kind: \"clear\";\n suppressedPath: string;\n }\n | {\n kind: \"none\";\n }\n | {\n kind: \"select\";\n path: string;\n };\n }>;\n remove?: (input: { path: string }) => AgentHostAsyncResult<void>;\n isNoProjectPath?: (input: { path: string }) => boolean;\n rememberDefaultSelection?: (input: {\n path: string | null;\n }) => AgentHostAsyncResult<void>;\n use: (input: { path: string }) => AgentHostAsyncResult<AgentHostUserProject>;\n};\n\nexport type AgentHostAgentSessionsApi = AgentHostRecord & {\n activate: (input: any) => AgentHostAsyncResult<any>;\n /**\n * @deprecated AgentGUI production writes must use AgentActivityRuntime.cancelSession.\n */\n cancel: (input: any) => AgentHostAsyncResult<any>;\n /**\n * @deprecated AgentGUI production writes must use AgentActivityRuntime.sendInput.\n */\n exec: (input: any) => AgentHostAsyncResult<any>;\n getComposerOptions?: (input: any) => AgentHostAsyncResult<any>;\n getState: (input: any) => AgentHostAsyncResult<any>;\n onEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n /**\n * @deprecated AgentGUI production writes must use AgentActivityRuntime.setSessionPinned.\n */\n pinSession?: (input: any) => AgentHostAsyncResult<any>;\n /**\n * @deprecated AgentGUI production sync must use AgentActivityRuntime.ensureSessionSynchronized.\n */\n releaseEventStream?: (input?: any) => AgentHostAsyncResult;\n /**\n * @deprecated AgentGUI production sync must use AgentActivityRuntime.ensureSessionSynchronized.\n */\n retainEventStream?: (input: any) => AgentHostAsyncResult;\n /**\n * @deprecated AgentGUI production writes must use AgentActivityRuntime.submitInteractive.\n */\n submitInteractive: (input: any) => AgentHostAsyncResult<any>;\n /**\n * @deprecated AgentGUI production UI must derive events from AgentActivityRuntime snapshots.\n */\n trackSettingsProjectChange?: (input: {\n action: \"clear\" | \"create_new\" | \"select_existing\";\n agentSessionId: string;\n provider?: string | null;\n }) => AgentHostAsyncResult<void>;\n subscribeEvents: (\n input: any,\n listener: (event: any) => void\n ) => AgentHostUnsubscribe;\n unactivate: (input: any) => AgentHostAsyncResult<any>;\n updateSettings: (input: any) => AgentHostAsyncResult<any>;\n};\n\n/**\n * @deprecated Legacy host DTO projection. AgentGUI production reads and writes\n * must use AgentActivityRuntime and AgentActivity* models.\n */\nexport type AgentHostWorkspaceAgentsApi = AgentHostRecord & {\n /**\n * @deprecated Use AgentActivityRuntime.deleteSession.\n */\n deleteSession: (\n input: AgentHostDeleteWorkspaceAgentSessionRuntimeInput\n ) => AgentHostAsyncResult<any>;\n /**\n * @deprecated Derive summaries from AgentActivitySnapshot/session messages.\n */\n getSessionSummary: (\n input: AgentHostWorkspaceAgentSessionSummaryRuntimeInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentSessionSummary>;\n /**\n * @deprecated Use AgentActivityRuntime.load/getSnapshot.\n */\n list: (\n input: string | AgentHostWorkspaceAgentsListInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentSnapshot>;\n /**\n * @deprecated Use AgentActivityRuntime.listSessionMessages.\n */\n listSessionMessages: (\n input: AgentHostWorkspaceAgentSessionMessagesRuntimeInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentSessionMessages>;\n};\n\nexport interface AgentHostRuntimeApi {\n account?: AgentHostAccountApi;\n agentGuiBatch: AgentHostAgentGuiBatchApi;\n clipboard: AgentHostClipboardApi;\n debug?: AgentHostDebugApi;\n filesystem: AgentHostFilesystemApi;\n meta?: AgentHostMetaApi;\n onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n runtime?: AgentHostEnvironmentApi;\n userProjects?: AgentHostUserProjectsApi;\n workspace: AgentHostWorkspaceApi;\n workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;\n}\n\nexport function toAgentHostRuntimeApi(\n hostApi: AgentHostInputApi | AgentHostRuntimeApi\n): AgentHostRuntimeApi {\n return {\n account: hostApi.account,\n agentGuiBatch: hostApi.agentGuiBatch ?? ({} as AgentHostAgentGuiBatchApi),\n clipboard: hostApi.clipboard,\n debug: hostApi.debug,\n filesystem: hostApi.filesystem,\n meta: hostApi.meta,\n onHostEvent: hostApi.onHostEvent,\n runtime: hostApi.runtime,\n userProjects: hostApi.userProjects,\n workspace: hostApi.workspace,\n workspaceAgentProbes: hostApi.workspaceAgentProbes\n };\n}\n"],"mappings":"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","names":["createContext","useContext","jsx","createContext","useContext"]}
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-MTFSQWZ6.js";
15
15
  import {
16
16
  translate
17
- } from "./chunk-GLDKFIWM.js";
17
+ } from "./chunk-RQ3HEF42.js";
18
18
 
19
19
  // shared/managedAgentProviders.ts
20
20
  function normalizeManagedAgentProvider(provider) {
@@ -113,4 +113,4 @@ export {
113
113
  userAvatarPlaceholderUrl,
114
114
  workspaceAgentActivityStatusLabel
115
115
  };
116
- //# sourceMappingURL=chunk-F7XLV7M3.js.map
116
+ //# sourceMappingURL=chunk-WPWZKKKV.js.map
@@ -0,0 +1,88 @@
1
+ // shared/workspaceAgentFileChangePayload.ts
2
+ function fileChangeEntriesFromChanges(value) {
3
+ if (Array.isArray(value)) {
4
+ return value.flatMap((item, index) => {
5
+ const change = recordValue(item);
6
+ const path = firstString(
7
+ stringValue(change?.path),
8
+ stringValue(change?.filePath),
9
+ stringValue(change?.file_path)
10
+ );
11
+ if (!change || !path) {
12
+ return [];
13
+ }
14
+ return [{ path, change, index }];
15
+ });
16
+ }
17
+ const changes = recordValue(value);
18
+ if (!changes) {
19
+ return [];
20
+ }
21
+ return Object.entries(changes).flatMap(([path, rawChange], index) => {
22
+ const change = recordValue(rawChange);
23
+ const normalizedPath = path.trim();
24
+ if (!change || !normalizedPath) {
25
+ return [];
26
+ }
27
+ return [{ path: normalizedPath, change, index }];
28
+ });
29
+ }
30
+ function fileChangePathsFromChanges(value) {
31
+ if (Array.isArray(value)) {
32
+ return fileChangeEntriesFromChanges(value).map((entry) => entry.path);
33
+ }
34
+ const changes = recordValue(value);
35
+ if (!changes) {
36
+ return [];
37
+ }
38
+ return Object.keys(changes).map((path) => path.trim()).filter((path) => path.length > 0);
39
+ }
40
+ function fileChangeCountFromChanges(value) {
41
+ return new Set(fileChangePathsFromChanges(value)).size;
42
+ }
43
+ function fileChangeTypeValue(change) {
44
+ const kind = recordValue(change.kind);
45
+ return firstString(
46
+ stringValue(change.type),
47
+ stringValue(change.change),
48
+ stringValue(change.kind),
49
+ stringValue(kind?.type)
50
+ );
51
+ }
52
+ function recordValue(value) {
53
+ return value && typeof value === "object" && !Array.isArray(value) ? value : null;
54
+ }
55
+ function stringValue(value) {
56
+ return typeof value === "string" && value.trim() ? value.trim() : null;
57
+ }
58
+ function firstString(...values) {
59
+ for (const value of values) {
60
+ if (typeof value === "string" && value.trim()) {
61
+ return value.trim();
62
+ }
63
+ }
64
+ return null;
65
+ }
66
+
67
+ // shared/workspaceAgentSyntheticMessages.ts
68
+ function isWorkspaceAgentSyntheticControlMessage(text) {
69
+ const normalized = text?.trim().toLowerCase() ?? "";
70
+ switch (normalized) {
71
+ case "[request interrupted by user]":
72
+ case "request interrupted by user":
73
+ case "[request interrupted by user for tool use]":
74
+ case "request interrupted by user for tool use":
75
+ return true;
76
+ default:
77
+ return false;
78
+ }
79
+ }
80
+
81
+ export {
82
+ fileChangeEntriesFromChanges,
83
+ fileChangePathsFromChanges,
84
+ fileChangeCountFromChanges,
85
+ fileChangeTypeValue,
86
+ isWorkspaceAgentSyntheticControlMessage
87
+ };
88
+ //# sourceMappingURL=chunk-Y35GDLP2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../shared/workspaceAgentFileChangePayload.ts","../shared/workspaceAgentSyntheticMessages.ts"],"sourcesContent":["export interface WorkspaceAgentFileChangePayloadEntry {\n path: string;\n change: Record<string, unknown>;\n index: number;\n}\n\nexport function fileChangeEntriesFromChanges(\n value: unknown\n): WorkspaceAgentFileChangePayloadEntry[] {\n if (Array.isArray(value)) {\n return value.flatMap((item, index) => {\n const change = recordValue(item);\n const path = firstString(\n stringValue(change?.path),\n stringValue(change?.filePath),\n stringValue(change?.file_path)\n );\n if (!change || !path) {\n return [];\n }\n return [{ path, change, index }];\n });\n }\n\n const changes = recordValue(value);\n if (!changes) {\n return [];\n }\n return Object.entries(changes).flatMap(([path, rawChange], index) => {\n const change = recordValue(rawChange);\n const normalizedPath = path.trim();\n if (!change || !normalizedPath) {\n return [];\n }\n return [{ path: normalizedPath, change, index }];\n });\n}\n\nexport function fileChangePathsFromChanges(value: unknown): string[] {\n if (Array.isArray(value)) {\n return fileChangeEntriesFromChanges(value).map((entry) => entry.path);\n }\n\n const changes = recordValue(value);\n if (!changes) {\n return [];\n }\n return Object.keys(changes)\n .map((path) => path.trim())\n .filter((path) => path.length > 0);\n}\n\nexport function fileChangeCountFromChanges(value: unknown): number {\n return new Set(fileChangePathsFromChanges(value)).size;\n}\n\nexport function fileChangeTypeValue(\n change: Record<string, unknown>\n): string | null {\n const kind = recordValue(change.kind);\n return firstString(\n stringValue(change.type),\n stringValue(change.change),\n stringValue(change.kind),\n stringValue(kind?.type)\n );\n}\n\nfunction recordValue(value: unknown): Record<string, unknown> | null {\n return value && typeof value === \"object\" && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : null;\n}\n\nfunction stringValue(value: unknown): string | null {\n return typeof value === \"string\" && value.trim() ? value.trim() : null;\n}\n\nfunction firstString(\n ...values: Array<string | null | undefined>\n): string | null {\n for (const value of values) {\n if (typeof value === \"string\" && value.trim()) {\n return value.trim();\n }\n }\n return null;\n}\n","export function isWorkspaceAgentSyntheticControlMessage(\n text: string | undefined | null\n): boolean {\n const normalized = text?.trim().toLowerCase() ?? \"\";\n switch (normalized) {\n case \"[request interrupted by user]\":\n case \"request interrupted by user\":\n case \"[request interrupted by user for tool use]\":\n case \"request interrupted by user for tool use\":\n return true;\n default:\n return false;\n }\n}\n"],"mappings":";AAMO,SAAS,6BACd,OACwC;AACxC,MAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,WAAO,MAAM,QAAQ,CAAC,MAAM,UAAU;AACpC,YAAM,SAAS,YAAY,IAAI;AAC/B,YAAM,OAAO;AAAA,QACX,YAAY,QAAQ,IAAI;AAAA,QACxB,YAAY,QAAQ,QAAQ;AAAA,QAC5B,YAAY,QAAQ,SAAS;AAAA,MAC/B;AACA,UAAI,CAAC,UAAU,CAAC,MAAM;AACpB,eAAO,CAAC;AAAA,MACV;AACA,aAAO,CAAC,EAAE,MAAM,QAAQ,MAAM,CAAC;AAAA,IACjC,CAAC;AAAA,EACH;AAEA,QAAM,UAAU,YAAY,KAAK;AACjC,MAAI,CAAC,SAAS;AACZ,WAAO,CAAC;AAAA,EACV;AACA,SAAO,OAAO,QAAQ,OAAO,EAAE,QAAQ,CAAC,CAAC,MAAM,SAAS,GAAG,UAAU;AACnE,UAAM,SAAS,YAAY,SAAS;AACpC,UAAM,iBAAiB,KAAK,KAAK;AACjC,QAAI,CAAC,UAAU,CAAC,gBAAgB;AAC9B,aAAO,CAAC;AAAA,IACV;AACA,WAAO,CAAC,EAAE,MAAM,gBAAgB,QAAQ,MAAM,CAAC;AAAA,EACjD,CAAC;AACH;AAEO,SAAS,2BAA2B,OAA0B;AACnE,MAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,WAAO,6BAA6B,KAAK,EAAE,IAAI,CAAC,UAAU,MAAM,IAAI;AAAA,EACtE;AAEA,QAAM,UAAU,YAAY,KAAK;AACjC,MAAI,CAAC,SAAS;AACZ,WAAO,CAAC;AAAA,EACV;AACA,SAAO,OAAO,KAAK,OAAO,EACvB,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,EACzB,OAAO,CAAC,SAAS,KAAK,SAAS,CAAC;AACrC;AAEO,SAAS,2BAA2B,OAAwB;AACjE,SAAO,IAAI,IAAI,2BAA2B,KAAK,CAAC,EAAE;AACpD;AAEO,SAAS,oBACd,QACe;AACf,QAAM,OAAO,YAAY,OAAO,IAAI;AACpC,SAAO;AAAA,IACL,YAAY,OAAO,IAAI;AAAA,IACvB,YAAY,OAAO,MAAM;AAAA,IACzB,YAAY,OAAO,IAAI;AAAA,IACvB,YAAY,MAAM,IAAI;AAAA,EACxB;AACF;AAEA,SAAS,YAAY,OAAgD;AACnE,SAAO,SAAS,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IAC5D,QACD;AACN;AAEA,SAAS,YAAY,OAA+B;AAClD,SAAO,OAAO,UAAU,YAAY,MAAM,KAAK,IAAI,MAAM,KAAK,IAAI;AACpE;AAEA,SAAS,eACJ,QACY;AACf,aAAW,SAAS,QAAQ;AAC1B,QAAI,OAAO,UAAU,YAAY,MAAM,KAAK,GAAG;AAC7C,aAAO,MAAM,KAAK;AAAA,IACpB;AAAA,EACF;AACA,SAAO;AACT;;;ACvFO,SAAS,wCACd,MACS;AACT,QAAM,aAAa,MAAM,KAAK,EAAE,YAAY,KAAK;AACjD,UAAQ,YAAY;AAAA,IAClB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;","names":[]}
@@ -1,5 +1,5 @@
1
- import { f as AgentMentionSearchState, A as AgentContextMentionItem, a as AgentMentionBrowseCategory, b as AgentMentionFilterId, d as AgentMentionGroupId } from '../AgentMentionSearchController-2Vjvmzh3.js';
2
- export { c as AgentMentionGroup, e as AgentMentionSearchController } from '../AgentMentionSearchController-2Vjvmzh3.js';
1
+ import { f as AgentMentionSearchState, A as AgentContextMentionItem, a as AgentMentionBrowseCategory, b as AgentMentionFilterId, d as AgentMentionGroupId } from '../AgentMentionSearchController-D5ks45fN.js';
2
+ export { c as AgentMentionGroup, e as AgentMentionSearchController } from '../AgentMentionSearchController-D5ks45fN.js';
3
3
  export { AGENT_CONTEXT_MENTION_PROVIDER_IDS, AgentContextMentionInsertResult, AgentContextMentionProvider, AgentContextMentionProviderId, AgentContextMentionQueryInput } from '../context-mention-provider.js';
4
4
  import '@tutti-os/ui-rich-text/at-panel';
5
5
  import '@tutti-os/ui-rich-text/types';
@@ -27,6 +27,7 @@ interface AgentFileMentionPaletteProps {
27
27
  onSelectCategory: (categoryId: AgentMentionBrowseCategory["id"]) => void;
28
28
  onSelectFilter: (filter: AgentMentionFilterId) => void;
29
29
  onExpandGroup: (groupId: AgentMentionGroupId) => void;
30
+ onNavigateHierarchy?: (delta: 1 | -1) => void;
30
31
  /**
31
32
  * 可选:点击 issue / app 行末尾的「查看产物文件」图标时回调(打开引用 picker 并定位)。
32
33
  * 仅 workspace-issue / workspace-app 行渲染该入口。
@@ -35,7 +36,7 @@ interface AgentFileMentionPaletteProps {
35
36
  }
36
37
  declare function flattenAgentMentionPaletteEntries(state: AgentMentionSearchState): AgentMentionPaletteEntry[];
37
38
  declare function groupStartKeys(state: AgentMentionSearchState): string[];
38
- declare function AgentFileMentionPalette({ state, highlightedKey, label, loadingLabel, emptyLabel, errorLabel, tabHintLabel, maxHeightPx, shouldCenterHighlightedItem, onHighlightChange, onSelectItem, onSelectCategory, onSelectFilter, onExpandGroup, onOpenReferences }: AgentFileMentionPaletteProps): React.JSX.Element;
39
+ declare function AgentFileMentionPalette({ state, highlightedKey, label, loadingLabel, emptyLabel, errorLabel, tabHintLabel, maxHeightPx, shouldCenterHighlightedItem, onHighlightChange, onSelectItem, onSelectCategory, onSelectFilter, onExpandGroup, onNavigateHierarchy, onOpenReferences }: AgentFileMentionPaletteProps): React.JSX.Element;
39
40
  declare const AgentContextMentionPalette: typeof AgentFileMentionPalette;
40
41
  type AgentContextMentionPaletteProps = AgentFileMentionPaletteProps;
41
42
 
@@ -4,20 +4,20 @@ import {
4
4
  AgentMentionSearchController,
5
5
  flattenAgentMentionPaletteEntries,
6
6
  groupStartKeys
7
- } from "../chunk-ILBFIZCI.js";
8
- import "../chunk-B7DTDZVT.js";
9
- import "../chunk-F7XLV7M3.js";
7
+ } from "../chunk-MFWZKYZ4.js";
8
+ import "../chunk-OOQIJXCA.js";
9
+ import "../chunk-WPWZKKKV.js";
10
10
  import "../chunk-MTFSQWZ6.js";
11
11
  import "../chunk-IBIMGLCD.js";
12
- import "../chunk-XAQQN6MP.js";
13
- import "../chunk-XJ34OIEQ.js";
14
- import "../chunk-EWWAG26H.js";
12
+ import "../chunk-FG66NW5M.js";
13
+ import "../chunk-Y35GDLP2.js";
14
+ import "../chunk-SGQ4C7JE.js";
15
15
  import "../chunk-TYGL25EL.js";
16
16
  import {
17
17
  AGENT_CONTEXT_MENTION_PROVIDER_IDS
18
18
  } from "../chunk-JM24HADP.js";
19
19
  import "../chunk-GCBDIQDX.js";
20
- import "../chunk-GLDKFIWM.js";
20
+ import "../chunk-RQ3HEF42.js";
21
21
  import "../chunk-LUGELG5V.js";
22
22
  import "../chunk-PJP5BUU6.js";
23
23
  export {
@@ -606,7 +606,6 @@ declare const agentGuiI18nResources: {
606
606
  readonly conversationUnavailable: "Session unavailable.";
607
607
  readonly contextPickerBrowseHint: "Search workspace files based on your input";
608
608
  readonly contextPickerBrowseFileHint: "No opened or Agent-generated files yet. Type a file name to search your computer.";
609
- readonly mentionFileSearchMoreHint: "Type a file name to search for more files on your computer";
610
609
  readonly contextPickerBrowseAppHint: "Type to search apps";
611
610
  readonly contextPickerBrowseSessionHint: "Type to search agent sessions that I started";
612
611
  readonly contextPickerBrowseCollabHint: "Type to search teammate and agent sessions";
@@ -765,7 +764,7 @@ declare const agentGuiI18nResources: {
765
764
  readonly fileMentionLoading: "Searching...";
766
765
  readonly fileMentionEmpty: "Search workspace files based on your input";
767
766
  readonly fileMentionError: "Unable to search Files.";
768
- readonly fileMentionTabHint: "Tab switch category | Arrow keys switch selection";
767
+ readonly fileMentionTabHint: "Tab switch category | ←→ enter/leave folder | ↑↓ switch selection";
769
768
  readonly addReference: "Add reference";
770
769
  readonly referenceWorkspaceFiles: "Reference workspace files";
771
770
  readonly referencePicker: {
@@ -808,6 +807,7 @@ declare const agentGuiI18nResources: {
808
807
  readonly projectLocked: "Project cannot be changed after the session starts";
809
808
  readonly projectMissingDescription: "This conversation's working directory no longer exists";
810
809
  readonly fileMentionSwitchCategory: "Switch category";
810
+ readonly fileMentionNavigateHierarchy: "Enter/leave folder";
811
811
  readonly fileMentionSwitchSelection: "Switch selection";
812
812
  readonly mentionFilterFile: "Files";
813
813
  readonly mentionFilterApp: "Apps";
@@ -833,7 +833,7 @@ declare const agentGuiI18nResources: {
833
833
  readonly mentionEmptyDockFiles: "No open files in the dock yet. Type to search workspace files.";
834
834
  readonly mentionEmptyAgentGeneratedFiles: "No files generated by Agent yet";
835
835
  readonly mentionAgentGeneratedFolderBack: "Back";
836
- readonly mentionAgentGeneratedFolderFileCount: "{{count}} files";
836
+ readonly mentionAgentGeneratedFolderFileCount: "Contains {{count}} files";
837
837
  readonly mentionNoMatchingFiles: "No matching files";
838
838
  readonly mentionOpenReferences: "View output files";
839
839
  readonly issueRunPrompt: {
@@ -2983,7 +2983,6 @@ declare const agentGuiI18nResources: {
2983
2983
  readonly conversationUnavailable: "会话不可用。";
2984
2984
  readonly contextPickerBrowseHint: "根据你输入的内容搜索工作区文件";
2985
2985
  readonly contextPickerBrowseFileHint: "暂无已打开或 Agent 生成的文件,继续输入文件名可搜索本机文件";
2986
- readonly mentionFileSearchMoreHint: "继续输入文件名可搜索更多本机文件";
2987
2986
  readonly contextPickerBrowseAppHint: "输入内容以搜索应用";
2988
2987
  readonly contextPickerBrowseSessionHint: "输入内容以搜索我发起的 Agent 会话";
2989
2988
  readonly contextPickerBrowseCollabHint: "输入内容以搜索其他人和 Agent 的会话";
@@ -3142,7 +3141,7 @@ declare const agentGuiI18nResources: {
3142
3141
  readonly fileMentionLoading: "正在搜索工作区...";
3143
3142
  readonly fileMentionEmpty: "根据你输入的内容搜索工作区文件";
3144
3143
  readonly fileMentionError: "无法搜索工作区文件。";
3145
- readonly fileMentionTabHint: "Tab 切换分类 | ↑↓ 切换选中";
3144
+ readonly fileMentionTabHint: "Tab 切换分类 | ←→ 进入/返回文件夹 | ↑↓ 切换选中";
3146
3145
  readonly addReference: "添加引用";
3147
3146
  readonly referenceWorkspaceFiles: "引用空间文件";
3148
3147
  readonly referencePicker: {
@@ -3185,6 +3184,7 @@ declare const agentGuiI18nResources: {
3185
3184
  readonly projectLocked: "会话开始后项目不可更改";
3186
3185
  readonly projectMissingDescription: "此对话的工作目录已不存在";
3187
3186
  readonly fileMentionSwitchCategory: "切换分类";
3187
+ readonly fileMentionNavigateHierarchy: "进入/返回文件夹";
3188
3188
  readonly fileMentionSwitchSelection: "切换选中";
3189
3189
  readonly mentionFilterFile: "文件";
3190
3190
  readonly mentionFilterApp: "应用";
@@ -3210,7 +3210,7 @@ declare const agentGuiI18nResources: {
3210
3210
  readonly mentionEmptyDockFiles: "Dock 栏暂无已打开文件,输入关键词可搜索工作区文件";
3211
3211
  readonly mentionEmptyAgentGeneratedFiles: "暂无 Agent 生成的文件";
3212
3212
  readonly mentionAgentGeneratedFolderBack: "返回";
3213
- readonly mentionAgentGeneratedFolderFileCount: "{{count}} 个文件";
3213
+ readonly mentionAgentGeneratedFolderFileCount: "包含 {{count}} 个文件";
3214
3214
  readonly mentionNoMatchingFiles: "没有匹配到文件";
3215
3215
  readonly mentionOpenReferences: "查看产物文件";
3216
3216
  readonly issueRunPrompt: {
@@ -6,7 +6,7 @@ import {
6
6
  translate,
7
7
  translateInUiLanguage,
8
8
  useTranslation
9
- } from "../chunk-GLDKFIWM.js";
9
+ } from "../chunk-RQ3HEF42.js";
10
10
  export {
11
11
  AgentGuiI18nProvider,
12
12
  agentGuiI18nModule,
package/dist/index.d.ts CHANGED
@@ -1,21 +1,21 @@
1
- import { AgentActivityNeedsAttentionItem, AgentActivitySnapshot, AgentActivityCancelSessionInput, AgentActivityCancelSessionResult, AgentActivityCreateSessionInput, AgentActivitySession, AgentActivityDeleteSessionInput, AgentActivityDeleteSessionResult, AgentActivitySendInput, AgentActivityMessageOrder, AgentActivityMessagePage, AgentActivitySubmitInteractiveInput, AgentActivitySnapshotListener } from '@tutti-os/agent-activity-core';
1
+ import { AgentActivityNeedsAttentionItem, AgentActivitySnapshot, AgentActivityCancelSessionInput, AgentActivityCancelSessionResult, AgentActivityCreateSessionInput, AgentActivitySession, AgentActivityDeleteSessionInput, AgentActivityDeleteSessionResult, AgentActivitySendInput, AgentActivityMessageOrder, AgentActivityMessagePage, AgentActivitySendInputResult, AgentActivitySubmitInteractiveInput, AgentActivitySnapshotListener } from '@tutti-os/agent-activity-core';
2
2
  export { AgentActivityAdapter, AgentActivityController, AgentActivityMessage, AgentActivityNeedsAttentionItem, AgentActivitySnapshot, selectNeedsAttentionCount, selectNeedsAttentionItems } from '@tutti-os/agent-activity-core';
3
- import { m as WorkspaceAgentActivityListViewModel, g as AgentHostWorkspaceAgentSession, f as AgentHostWorkspaceAgentMessage, l as AgentHostWorkspaceAgentSnapshot, B as BuildWorkspaceAgentActivityListOptions, d as AgentHostRuntimeOpenclawGatewayWarmupResult, c as AgentHostManagedAgentsState } from './workspaceAgentActivityListViewModel-jRF8cP37.js';
3
+ import { m as WorkspaceAgentActivityListViewModel, g as AgentHostWorkspaceAgentSession, f as AgentHostWorkspaceAgentMessage, l as AgentHostWorkspaceAgentSnapshot, B as BuildWorkspaceAgentActivityListOptions, d as AgentHostRuntimeOpenclawGatewayWarmupResult, c as AgentHostManagedAgentsState } from './workspaceAgentActivityListViewModel-DwpbJGDx.js';
4
4
  import * as react from 'react';
5
5
  import { PropsWithChildren, JSX } from 'react';
6
6
  import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
7
- import { d as AgentHostAgentSessionComposerSettings, c as AgentHostActivateAgentSessionResult, k as AgentHostUpdateAgentSessionSettingsResult, e as AgentHostAgentSessionState, j as AgentHostUnactivateAgentSessionResult, o as AgentProvider, n as AgentProbeSnapshot, a as AgentGUINodeViewModel, A as AgentGUINodeData, P as Point, N as NodeFrame, l as AgentMessageMarkdownWorkspaceAppIcon, g as AgentHostInputApi } from './AgentMessageMarkdown-CZaG-QW3.js';
8
- export { f as AgentHostApi, h as AgentHostRuntimeApi, i as AgentHostSelectFilesInput, m as AgentProbeProvider, p as AgentProviderProbeListInput, q as AgentProviderProbeListResult, r as AgentUsageQuota, s as AgentUsageSnapshot } from './AgentMessageMarkdown-CZaG-QW3.js';
7
+ import { d as AgentHostAgentSessionComposerSettings, c as AgentHostActivateAgentSessionResult, k as AgentHostUpdateAgentSessionSettingsResult, e as AgentHostAgentSessionState, j as AgentHostUnactivateAgentSessionResult, o as AgentProvider, n as AgentProbeSnapshot, a as AgentGUINodeViewModel, A as AgentGUINodeData, P as Point, N as NodeFrame, l as AgentMessageMarkdownWorkspaceAppIcon, g as AgentHostInputApi } from './AgentMessageMarkdown-Cp70W-Z2.js';
8
+ export { f as AgentHostApi, h as AgentHostRuntimeApi, i as AgentHostSelectFilesInput, m as AgentProbeProvider, p as AgentProviderProbeListInput, q as AgentProviderProbeListResult, r as AgentUsageQuota, s as AgentUsageSnapshot } from './AgentMessageMarkdown-Cp70W-Z2.js';
9
9
  import { ReferenceLocateTarget, WorkspaceFileReferenceAdapter, WorkspaceFileReference } from '@tutti-os/workspace-file-reference/contracts';
10
10
  import { ReferenceSourceAggregator } from '@tutti-os/workspace-file-reference/core';
11
11
  import { W as WorkspaceLinkAction } from './workspaceLinkActions-CqWZaCY4.js';
12
- import { A as AgentContextMentionItem } from './AgentMentionSearchController-2Vjvmzh3.js';
13
- export { p as preloadAgentMentionBrowse } from './AgentMentionSearchController-2Vjvmzh3.js';
12
+ import { A as AgentContextMentionItem } from './AgentMentionSearchController-D5ks45fN.js';
13
+ export { p as preloadAgentMentionBrowse } from './AgentMentionSearchController-D5ks45fN.js';
14
14
  import { AgentContextMentionProvider } from './context-mention-provider.js';
15
15
  export { AGENT_CONTEXT_MENTION_PROVIDER_IDS, AgentContextMentionProviderId } from './context-mention-provider.js';
16
16
  import { AgentGuiI18nLocale } from './i18n/index.js';
17
17
  export { AgentGuiI18nProvider, agentGuiI18nModule, agentGuiI18nResources } from './i18n/index.js';
18
- import './agentConversationVM-BvlmCNOm.js';
18
+ import './agentConversationVM-BElW2LNR.js';
19
19
  import '@tutti-os/workspace-user-project/contracts';
20
20
  import '@tutti-os/workspace-issue-manager/core';
21
21
  import '@tutti-os/ui-rich-text/at-panel';
@@ -121,6 +121,7 @@ interface AgentActivityRuntimeActivateSessionInput {
121
121
  initialContent?: AgentActivitySendInput["content"];
122
122
  /** 仅展示用首轮文本(bundle 折叠成一个 chip);initialContent 仍带展开后的文件。 */
123
123
  initialDisplayPrompt?: string | null;
124
+ metadata?: Record<string, unknown>;
124
125
  mode: "existing" | "new";
125
126
  openclawGatewayReady?: boolean;
126
127
  provider?: string;
@@ -201,7 +202,7 @@ interface AgentActivityRuntime {
201
202
  ensureSessionSynchronized?(input: AgentActivityRuntimeEnsureSessionSynchronizedInput): () => void;
202
203
  /** @deprecated Use ensureSessionSynchronized. */
203
204
  retainSessionEvents(input: AgentActivityRuntimeRetainSessionEventsInput): () => void;
204
- sendInput(input: AgentActivitySendInput): Promise<AgentActivitySession>;
205
+ sendInput(input: AgentActivitySendInput): Promise<AgentActivitySendInputResult>;
205
206
  uploadPromptContent?(input: AgentActivityRuntimeUploadPromptContentInput): Promise<AgentActivityRuntimeUploadPromptContentResult>;
206
207
  readSessionAttachment?(input: AgentActivityRuntimeReadSessionAttachmentInput): Promise<AgentActivityRuntimeSessionAttachment>;
207
208
  readPromptAsset?(input: AgentActivityRuntimeReadPromptAssetInput): Promise<AgentActivityRuntimePromptAsset>;