@tutti-os/agent-gui 0.0.14 → 0.0.16

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 (69) hide show
  1. package/dist/AgentMentionSearchController-DqssJ2-b.d.ts +218 -0
  2. package/dist/agent-conversation/index.d.ts +4 -2
  3. package/dist/agent-conversation/index.js +5 -4
  4. package/dist/agent-conversation/index.js.map +1 -1
  5. package/dist/agent-message-center/index.d.ts +3 -2
  6. package/dist/agent-message-center/index.js +547 -287
  7. package/dist/agent-message-center/index.js.map +1 -1
  8. package/dist/app/renderer/agentactivity.css +177 -17
  9. package/dist/{chunk-GZHQPPK2.js → chunk-267VY3EJ.js} +130 -43
  10. package/dist/chunk-267VY3EJ.js.map +1 -0
  11. package/dist/{chunk-KEKPOVQD.js → chunk-CABHBFYH.js} +2 -2
  12. package/dist/{chunk-HSXDSFKB.js → chunk-EKATXC3W.js} +2 -2
  13. package/dist/{chunk-RLPVFX7V.js → chunk-FJYH2ZPX.js} +196 -322
  14. package/dist/chunk-FJYH2ZPX.js.map +1 -0
  15. package/dist/{chunk-ASAZDEQE.js → chunk-GWR6WGZY.js} +72 -22
  16. package/dist/chunk-GWR6WGZY.js.map +1 -0
  17. package/dist/{chunk-YXSO4ITT.js → chunk-HIREVEZM.js} +1 -1
  18. package/dist/chunk-HIREVEZM.js.map +1 -0
  19. package/dist/{chunk-VDNMTW2E.js → chunk-IXIGWLQY.js} +1 -1
  20. package/dist/chunk-IXIGWLQY.js.map +1 -0
  21. package/dist/{chunk-ZO3SZCIX.js → chunk-JNGYJ7GM.js} +6 -3
  22. package/dist/chunk-JNGYJ7GM.js.map +1 -0
  23. package/dist/{chunk-MU2LODEV.js → chunk-KWPL3JYS.js} +131 -13
  24. package/dist/chunk-KWPL3JYS.js.map +1 -0
  25. package/dist/{chunk-WME2V26J.js → chunk-LW2S255I.js} +21 -36
  26. package/dist/chunk-LW2S255I.js.map +1 -0
  27. package/dist/{chunk-3YZX5EUC.js → chunk-LWRYYGPZ.js} +610 -480
  28. package/dist/chunk-LWRYYGPZ.js.map +1 -0
  29. package/dist/{chunk-GEXHKJK5.js → chunk-MUZMBEFO.js} +35 -17
  30. package/dist/chunk-MUZMBEFO.js.map +1 -0
  31. package/dist/chunk-O5TUTXHT.js +196 -0
  32. package/dist/chunk-O5TUTXHT.js.map +1 -0
  33. package/dist/{chunk-FSTZDNRM.js → chunk-SIDWRR5I.js} +281 -183
  34. package/dist/chunk-SIDWRR5I.js.map +1 -0
  35. package/dist/context-mention-palette/index.d.ts +11 -170
  36. package/dist/context-mention-palette/index.js +7 -6
  37. package/dist/context-mention-provider.d.ts +6 -1
  38. package/dist/context-mention-provider.js +1 -1
  39. package/dist/i18n/index.d.ts +277 -179
  40. package/dist/i18n/index.js +1 -1
  41. package/dist/index.d.ts +56 -3
  42. package/dist/index.js +2706 -1700
  43. package/dist/index.js.map +1 -1
  44. package/dist/workbench/contribution.d.ts +7 -1
  45. package/dist/workbench/contribution.js +6 -4
  46. package/dist/workbench/index.d.ts +5 -2
  47. package/dist/workbench/index.js +6 -4
  48. package/dist/workbench/launch.d.ts +2 -0
  49. package/dist/workbench/launch.js +2 -2
  50. package/dist/workbench/state.d.ts +3 -2
  51. package/dist/workbench/state.js +1 -1
  52. package/dist/workbench/types.d.ts +3 -0
  53. package/dist/workbench/types.js +1 -1
  54. package/dist/workspace-agent-generated-files.js +2 -2
  55. package/dist/{workspaceLinkActions-BlLN8Pvz.d.ts → workspaceLinkActions-Mjktl_Be.d.ts} +3 -0
  56. package/package.json +15 -13
  57. package/dist/chunk-3YZX5EUC.js.map +0 -1
  58. package/dist/chunk-ASAZDEQE.js.map +0 -1
  59. package/dist/chunk-FSTZDNRM.js.map +0 -1
  60. package/dist/chunk-GEXHKJK5.js.map +0 -1
  61. package/dist/chunk-GZHQPPK2.js.map +0 -1
  62. package/dist/chunk-MU2LODEV.js.map +0 -1
  63. package/dist/chunk-RLPVFX7V.js.map +0 -1
  64. package/dist/chunk-VDNMTW2E.js.map +0 -1
  65. package/dist/chunk-WME2V26J.js.map +0 -1
  66. package/dist/chunk-YXSO4ITT.js.map +0 -1
  67. package/dist/chunk-ZO3SZCIX.js.map +0 -1
  68. /package/dist/{chunk-KEKPOVQD.js.map → chunk-CABHBFYH.js.map} +0 -0
  69. /package/dist/{chunk-HSXDSFKB.js.map → chunk-EKATXC3W.js.map} +0 -0
@@ -1,174 +1,10 @@
1
- import { AgentContextMentionProvider } from '../context-mention-provider.js';
2
- export { AGENT_CONTEXT_MENTION_PROVIDER_IDS, AgentContextMentionInsertResult, AgentContextMentionProviderId, AgentContextMentionQueryInput } from '../context-mention-provider.js';
3
- import { MentionPaletteState, MentionPaletteGroup } from '@tutti-os/ui-rich-text/at-panel';
1
+ import { f as AgentMentionSearchState, A as AgentContextMentionItem, a as AgentMentionBrowseCategory, b as AgentMentionFilterId, d as AgentMentionGroupId } from '../AgentMentionSearchController-DqssJ2-b.js';
2
+ export { c as AgentMentionGroup, e as AgentMentionSearchController } from '../AgentMentionSearchController-DqssJ2-b.js';
3
+ export { AGENT_CONTEXT_MENTION_PROVIDER_IDS, AgentContextMentionInsertResult, AgentContextMentionProvider, AgentContextMentionProviderId, AgentContextMentionQueryInput } from '../context-mention-provider.js';
4
+ import '@tutti-os/ui-rich-text/at-panel';
4
5
  import '@tutti-os/ui-rich-text/types';
5
6
  import '@tutti-os/workspace-external-core/contracts';
6
7
 
7
- type AgentMentionProviderDiagnosticStatus = "success" | "timeout" | "error" | "missing";
8
- interface AgentMentionProviderQueryDiagnostic {
9
- durationMs: number;
10
- errorKind?: string;
11
- providerId: string;
12
- resultCount: number;
13
- status: AgentMentionProviderDiagnosticStatus;
14
- }
15
- interface AgentMentionSearchDiagnosticLog {
16
- debounceMs: number;
17
- durationMs: number;
18
- errorKind?: string;
19
- event: "agent_gui.mention_search";
20
- filter: AgentMentionFilterId;
21
- groupCount: number;
22
- itemCount: number;
23
- mode: "browse" | "results";
24
- providerResults: AgentMentionProviderQueryDiagnostic[];
25
- providerTimeoutMs: number;
26
- queryLength: number;
27
- requestId: number;
28
- status: "ready" | "error";
29
- workspaceId: string;
30
- }
31
-
32
- type AgentFileMentionKind = "file" | "directory" | "unknown";
33
- type AgentMentionFileNavigationAction = "agent-generated-folder" | "agent-generated-folder-back";
34
- type AgentMentionScope = "my_sessions" | "collab_sessions";
35
- interface AgentMentionFileItem {
36
- kind: "file";
37
- path: string;
38
- href: string;
39
- name: string;
40
- entryKind: AgentFileMentionKind;
41
- directoryPath: string;
42
- score?: number;
43
- thumbnailUrl?: string | null;
44
- mentionNavigation?: AgentMentionFileNavigationAction;
45
- childCount?: number;
46
- }
47
- interface AgentMentionSessionItem {
48
- kind: "session";
49
- href: string;
50
- workspaceId: string;
51
- targetId: string;
52
- name: string;
53
- title: string;
54
- scope: AgentMentionScope;
55
- initiatorName: string;
56
- initiatorAvatarUrl?: string;
57
- agentName: string;
58
- status?: string;
59
- inputPreview?: string;
60
- summaryPreview?: string;
61
- updatedAtUnixMs?: number;
62
- }
63
- interface AgentMentionWorkspaceIssueItem {
64
- kind: "workspace-issue";
65
- href: string;
66
- workspaceId: string;
67
- targetId: string;
68
- topicId?: string;
69
- name: string;
70
- title: string;
71
- creatorName?: string;
72
- status?: string;
73
- contentPreview?: string;
74
- updatedAtUnixMs?: number;
75
- }
76
- interface AgentMentionWorkspaceAppItem {
77
- kind: "workspace-app";
78
- href: string;
79
- workspaceId: string;
80
- targetId: string;
81
- appId: string;
82
- name: string;
83
- description?: string;
84
- iconUrl?: string;
85
- }
86
- interface AgentMentionWorkspaceAppFactoryItem {
87
- kind: "workspace-app-factory";
88
- href: string;
89
- workspaceId: string;
90
- targetId: string;
91
- jobId: string;
92
- name: string;
93
- action?: string;
94
- contextPath?: string;
95
- }
96
- type AgentContextMentionItem = AgentMentionFileItem | AgentMentionSessionItem | AgentMentionWorkspaceAppItem | AgentMentionWorkspaceAppFactoryItem | AgentMentionWorkspaceIssueItem;
97
-
98
- type AgentMentionFilterId = "all" | "app" | "file" | "session" | "issue";
99
- type AgentMentionGroupId = "apps" | "files" | "opened_files" | "agent_generated_files" | "my_sessions" | "collab_sessions" | "issues";
100
- interface AgentMentionBrowseCategory {
101
- id: AgentMentionFilterId;
102
- label: string;
103
- }
104
- type AgentMentionGroup = MentionPaletteGroup<AgentContextMentionItem>;
105
- type AgentMentionSearchState = MentionPaletteState<AgentContextMentionItem>;
106
- interface AgentMentionSearchControllerOptions {
107
- contextMentionProviders?: readonly AgentContextMentionProvider[];
108
- debounceMs?: number;
109
- fileLimit?: number;
110
- issueLimit?: number;
111
- providerTimeoutMs?: number;
112
- diagnosticInfoLogger?: (payload: AgentMentionSearchDiagnosticLog) => void;
113
- diagnosticNow?: () => number;
114
- diagnosticSlowThresholdMs?: number;
115
- }
116
- type Listener = (state: AgentMentionSearchState) => void;
117
- declare class AgentMentionSearchController {
118
- private readonly contextMentionProviders;
119
- private readonly debounceMs;
120
- private readonly fileLimit;
121
- private readonly issueLimit;
122
- private readonly providerTimeoutMs;
123
- private readonly diagnosticInfoLogger;
124
- private readonly diagnosticNow;
125
- private readonly diagnosticSlowThresholdMs;
126
- private readonly listeners;
127
- private readonly expandedCounts;
128
- private readonly totalCounts;
129
- private timer;
130
- private requestId;
131
- private disposed;
132
- private activeWorkspaceId;
133
- private currentUserId;
134
- private currentFilter;
135
- private currentQuery;
136
- private currentSessionCwd;
137
- private currentFileSearchLimit;
138
- private currentIssueSearchLimit;
139
- private agentGeneratedBrowsePath;
140
- private rawGroups;
141
- private state;
142
- constructor(options: AgentMentionSearchControllerOptions);
143
- subscribe(listener: Listener): () => void;
144
- updateQuery(input: {
145
- workspaceId: string;
146
- currentUserId?: string | null;
147
- query: string;
148
- sessionCwd?: string | null;
149
- }): void;
150
- setFilter(filter: AgentMentionFilterId): void;
151
- enterCategory(category: Exclude<AgentMentionFilterId, "all">): void;
152
- selectAgentGeneratedMentionItem(item: AgentContextMentionItem): boolean;
153
- expandGroup(groupId: AgentMentionGroupId): void;
154
- close(): void;
155
- dispose(): void;
156
- private startBrowseModeFetch;
157
- private runSearch;
158
- private runBrowseSearch;
159
- private queryProviderMentionItems;
160
- private queryProviderMentionItemsById;
161
- private logSearchDiagnostic;
162
- private groupsFromRawGroups;
163
- private emitBrowseState;
164
- private canApply;
165
- private clearTimer;
166
- private resetExpandedCounts;
167
- private resetSearchLimits;
168
- private resetAgentGeneratedBrowsePath;
169
- private setState;
170
- }
171
-
172
8
  interface AgentMentionPaletteEntry {
173
9
  key: string;
174
10
  type: "category" | "item" | "expand";
@@ -193,11 +29,16 @@ interface AgentFileMentionPaletteProps {
193
29
  onExpandGroup: (groupId: AgentMentionGroupId) => void;
194
30
  onCycleFilter: () => void;
195
31
  onMoveSelection: (delta: 1 | -1) => void;
32
+ /**
33
+ * 可选:点击 issue / app 行末尾的「查看产物文件」图标时回调(打开引用 picker 并定位)。
34
+ * 仅 workspace-issue / workspace-app 行渲染该入口。
35
+ */
36
+ onOpenReferences?: (item: AgentContextMentionItem) => void;
196
37
  }
197
38
  declare function flattenAgentMentionPaletteEntries(state: AgentMentionSearchState): AgentMentionPaletteEntry[];
198
39
  declare function groupStartKeys(state: AgentMentionSearchState): string[];
199
- declare function AgentFileMentionPalette({ state, highlightedKey, label, loadingLabel, emptyLabel, errorLabel, tabHintLabel, maxHeightPx, shouldCenterHighlightedItem, onHighlightChange, onSelectItem, onSelectCategory, onSelectFilter, onExpandGroup, onCycleFilter, onMoveSelection }: AgentFileMentionPaletteProps): React.JSX.Element;
40
+ declare function AgentFileMentionPalette({ state, highlightedKey, label, loadingLabel, emptyLabel, errorLabel, tabHintLabel, maxHeightPx, shouldCenterHighlightedItem, onHighlightChange, onSelectItem, onSelectCategory, onSelectFilter, onExpandGroup, onCycleFilter, onMoveSelection, onOpenReferences }: AgentFileMentionPaletteProps): React.JSX.Element;
200
41
  declare const AgentContextMentionPalette: typeof AgentFileMentionPalette;
201
42
  type AgentContextMentionPaletteProps = AgentFileMentionPaletteProps;
202
43
 
203
- export { type AgentContextMentionItem, AgentContextMentionPalette, type AgentContextMentionPaletteProps, AgentContextMentionProvider, AgentFileMentionPalette, type AgentFileMentionPaletteProps, type AgentMentionBrowseCategory, type AgentMentionFilterId, type AgentMentionGroup, type AgentMentionGroupId, type AgentMentionPaletteEntry, AgentMentionSearchController, type AgentMentionSearchState, flattenAgentMentionPaletteEntries, groupStartKeys };
44
+ export { AgentContextMentionItem, AgentContextMentionPalette, type AgentContextMentionPaletteProps, AgentFileMentionPalette, type AgentFileMentionPaletteProps, AgentMentionBrowseCategory, AgentMentionFilterId, AgentMentionGroupId, type AgentMentionPaletteEntry, AgentMentionSearchState, flattenAgentMentionPaletteEntries, groupStartKeys };
@@ -4,19 +4,20 @@ import {
4
4
  AgentMentionSearchController,
5
5
  flattenAgentMentionPaletteEntries,
6
6
  groupStartKeys
7
- } from "../chunk-3YZX5EUC.js";
8
- import "../chunk-KEKPOVQD.js";
9
- import "../chunk-HSXDSFKB.js";
7
+ } from "../chunk-LWRYYGPZ.js";
8
+ import "../chunk-CABHBFYH.js";
9
+ import "../chunk-EKATXC3W.js";
10
10
  import "../chunk-MTFSQWZ6.js";
11
11
  import "../chunk-IBIMGLCD.js";
12
- import "../chunk-MU2LODEV.js";
12
+ import "../chunk-KWPL3JYS.js";
13
13
  import "../chunk-XJ34OIEQ.js";
14
+ import "../chunk-O5TUTXHT.js";
14
15
  import "../chunk-TYGL25EL.js";
15
16
  import {
16
17
  AGENT_CONTEXT_MENTION_PROVIDER_IDS
17
- } from "../chunk-YXSO4ITT.js";
18
+ } from "../chunk-HIREVEZM.js";
18
19
  import "../chunk-GCBDIQDX.js";
19
- import "../chunk-FSTZDNRM.js";
20
+ import "../chunk-SIDWRR5I.js";
20
21
  import "../chunk-LUGELG5V.js";
21
22
  import "../chunk-PJP5BUU6.js";
22
23
  export {
@@ -25,6 +25,11 @@ interface AgentContextMentionPresentation {
25
25
  statusLabel?: string;
26
26
  statusPulse?: string;
27
27
  userAvatarPlaceholderUrl?: string;
28
+ /**
29
+ * 应用是否能够提供产物文件(reference)。"true" 表示支持,缺省/其它值表示不支持。
30
+ * 仅用于 @ 面板行末尾「查看产物文件」入口的展示判断,不持久化到 mention 节点。
31
+ */
32
+ referencesListSupported?: string;
28
33
  }
29
34
  type AgentContextMentionInsertResult = {
30
35
  kind: "mention";
@@ -45,7 +50,7 @@ type AgentContextMentionInsertResult = {
45
50
  type AgentContextMentionProvider<TItem = any> = Omit<RichTextTriggerProvider<TItem>, "toInsertResult"> & {
46
51
  trigger: "@";
47
52
  toInsertResult: (item: TItem) => AgentContextMentionInsertResult;
48
- getItemThumbnailUrl?: (item: TItem) => string | null | undefined | Promise<string | null | undefined>;
53
+ getItemIconUrl?: (item: TItem) => string | null | undefined | Promise<string | null | undefined>;
49
54
  };
50
55
 
51
56
  export { AGENT_CONTEXT_MENTION_PROVIDER_IDS, type AgentContextMentionInsertResult, type AgentContextMentionPresentation, type AgentContextMentionProvider, type AgentContextMentionProviderId, type AgentContextMentionQueryInput };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AGENT_CONTEXT_MENTION_PROVIDER_IDS
3
- } from "./chunk-YXSO4ITT.js";
3
+ } from "./chunk-HIREVEZM.js";
4
4
  export {
5
5
  AGENT_CONTEXT_MENTION_PROVIDER_IDS
6
6
  };