@tutti-os/agent-gui 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  AgentInteractivePromptSurface,
15
15
  approvalOptionDisplayLabel
16
- } from "./chunk-OSBLVO4N.js";
16
+ } from "./chunk-4MOHKNXA.js";
17
17
  import {
18
18
  PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
19
19
  PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
@@ -36,13 +36,13 @@ import {
36
36
  skillDescriptionForDisplay,
37
37
  skillTriggerForPrefix,
38
38
  useProjectedAgentConversation
39
- } from "./chunk-3QDLVPMJ.js";
39
+ } from "./chunk-7JW4OAKS.js";
40
40
  import {
41
41
  AgentMessageMarkdown,
42
42
  ZoomableImage,
43
43
  cn,
44
44
  resolveWorkspaceLinkAction
45
- } from "./chunk-VNRRXUI3.js";
45
+ } from "./chunk-BUBD5E4F.js";
46
46
  import {
47
47
  AGENT_MENTION_FILTER_TAB_ORDER,
48
48
  AgentFileMentionPalette,
@@ -50,7 +50,7 @@ import {
50
50
  DEFAULT_AGENT_MENTION_FILTER,
51
51
  agentMentionItemKey,
52
52
  preloadAgentMentionBrowse
53
- } from "./chunk-5PIXN7UF.js";
53
+ } from "./chunk-Q6QE7JNG.js";
54
54
  import {
55
55
  WORKSPACE_AGENT_ACTIVITY_RUNTIME_SESSION_ORIGIN,
56
56
  buildWorkspaceAgentActivityListViewModel,
@@ -90,7 +90,7 @@ import {
90
90
  useAgentActivitySnapshot,
91
91
  useAgentHostApi,
92
92
  useOptionalAgentActivityRuntime
93
- } from "./chunk-YHRJD6HA.js";
93
+ } from "./chunk-CCI6EK5W.js";
94
94
  import "./chunk-TYGL25EL.js";
95
95
  import {
96
96
  AGENT_CONTEXT_MENTION_PROVIDER_IDS
@@ -3171,10 +3171,10 @@ function compareTimelineItemsForMerge(left, right) {
3171
3171
  // agent-gui/agentGuiNode/model/agentComposerDraft.ts
3172
3172
  var MAX_AGENT_COMPOSER_DRAFT_IMAGES = 8;
3173
3173
  function emptyAgentComposerDraft() {
3174
- return { prompt: "", images: [], files: [] };
3174
+ return { prompt: "", images: [] };
3175
3175
  }
3176
3176
  function agentComposerDraftHasContent(draft) {
3177
- return draft.prompt.trim() !== "" || draft.images.length > 0 || (draft.files?.length ?? 0) > 0;
3177
+ return draft.prompt.trim() !== "" || draft.images.length > 0;
3178
3178
  }
3179
3179
  function normalizeAgentPromptContentBlocks(content) {
3180
3180
  const result = [];
@@ -3201,26 +3201,6 @@ function normalizeAgentPromptContentBlocks(content) {
3201
3201
  });
3202
3202
  continue;
3203
3203
  }
3204
- if (block.type === "file") {
3205
- const filePath = block.path?.trim();
3206
- const hostPath = block.hostPath?.trim();
3207
- if (!filePath && !hostPath) {
3208
- continue;
3209
- }
3210
- result.push({
3211
- type: "file",
3212
- ...block.mimeType?.trim() ? { mimeType: block.mimeType.trim() } : {},
3213
- ...filePath ? { path: filePath } : {},
3214
- ...hostPath ? { hostPath } : {},
3215
- ...block.name?.trim() ? { name: block.name.trim() } : {},
3216
- ...block.uri?.trim() ? { uri: block.uri.trim() } : {},
3217
- ...block.uploadStatus?.trim() ? { uploadStatus: block.uploadStatus.trim() } : {},
3218
- ...block.assetId?.trim() ? { assetId: block.assetId.trim() } : {},
3219
- ...typeof block.sizeBytes === "number" ? { sizeBytes: block.sizeBytes } : {},
3220
- kind: "file"
3221
- });
3222
- continue;
3223
- }
3224
3204
  if (block.type === "skill" || block.type === "mention") {
3225
3205
  const name = block.name?.trim();
3226
3206
  const path = block.path?.trim();
@@ -3248,9 +3228,6 @@ function agentPromptContentToComposerDraft(content, idPrefix) {
3248
3228
  prompt: agentPromptContentDisplayText(normalizedContent),
3249
3229
  images: agentPromptContentImageBlocks(normalizedContent).slice(0, MAX_AGENT_COMPOSER_DRAFT_IMAGES).map(
3250
3230
  (image, index) => agentPromptImageBlockToDraftImage(image, idPrefix, index)
3251
- ),
3252
- files: agentPromptFileBlocks(normalizedContent).map(
3253
- (file, index) => agentPromptFileBlockToDraftFile(file, idPrefix, index)
3254
3231
  )
3255
3232
  };
3256
3233
  }
@@ -3272,24 +3249,9 @@ function agentComposerDraftToPromptContent(input) {
3272
3249
  mimeType: image.mimeType,
3273
3250
  ...image.path ? { path: image.path } : { data: image.data },
3274
3251
  name: image.name
3275
- })),
3276
- ...(input.draft.files ?? []).filter((file) => !file.uploading && !file.uploadError).map((file) => ({
3277
- type: "file",
3278
- ...file.mimeType ? { mimeType: file.mimeType } : {},
3279
- ...file.path ? { path: file.path } : {},
3280
- ...file.hostPath ? { hostPath: file.hostPath } : {},
3281
- ...file.assetId ? { assetId: file.assetId } : {},
3282
- ...file.sizeBytes ? { sizeBytes: file.sizeBytes } : {},
3283
- name: file.name,
3284
- kind: "file"
3285
3252
  }))
3286
3253
  ]);
3287
3254
  }
3288
- function agentPromptFileBlocks(content) {
3289
- return normalizeAgentPromptContentBlocks(content).filter(
3290
- (block) => block.type === "file" && (typeof block.path === "string" || typeof block.hostPath === "string")
3291
- );
3292
- }
3293
3255
  function promptItemBlocksForProviderSkills(input) {
3294
3256
  if (input.provider.trim() !== "codex") {
3295
3257
  return [];
@@ -3327,22 +3289,11 @@ function agentPromptImageBlockToDraftImage(image, idPrefix, index) {
3327
3289
  id: `${idPrefix}:image:${index}`,
3328
3290
  name: image.name?.trim() || `image-${index + 1}`,
3329
3291
  mimeType: image.mimeType,
3330
- ...image.data ? { data: image.data } : {},
3331
- ...image.path ? { path: image.path } : {},
3292
+ data: image.data,
3293
+ path: image.path,
3332
3294
  previewUrl: typeof image.data === "string" && image.data ? `data:${image.mimeType};base64,${image.data}` : image.path ?? ""
3333
3295
  };
3334
3296
  }
3335
- function agentPromptFileBlockToDraftFile(file, idPrefix, index) {
3336
- return {
3337
- id: `${idPrefix}:file:${index}`,
3338
- name: file.name?.trim() || `file-${index + 1}`,
3339
- mimeType: file.mimeType,
3340
- path: file.path,
3341
- hostPath: file.hostPath,
3342
- assetId: file.assetId,
3343
- sizeBytes: file.sizeBytes
3344
- };
3345
- }
3346
3297
 
3347
3298
  // shared/agentConversation/projection/workspaceAgentMessageProjection.ts
3348
3299
  function projectWorkspaceAgentMessagesToTimelineItems(messages) {
@@ -17157,7 +17108,6 @@ function AgentComposer({
17157
17108
  "use memo";
17158
17109
  const draftPrompt = draftContent.prompt;
17159
17110
  const draftImages = draftContent.images;
17160
- const draftFiles = draftContent.files ?? [];
17161
17111
  const agentActivityRuntime = useOptionalAgentActivityRuntime();
17162
17112
  const [isPaletteOpen, setIsPaletteOpen] = useState10(true);
17163
17113
  const [isReviewPickerOpen, setIsReviewPickerOpen] = useState10(false);
@@ -17194,7 +17144,6 @@ function AgentComposer({
17194
17144
  const paletteContentRef = useRef12(null);
17195
17145
  const draftPromptRef = useRef12(draftPrompt);
17196
17146
  const draftImagesRef = useRef12(draftImages);
17197
- const draftFilesRef = useRef12(draftFiles);
17198
17147
  const submittedImagePreviewObservedBusyRef = useRef12(false);
17199
17148
  const promptTipRef = useRef12(null);
17200
17149
  const mentionControllerRef = useRef12(
@@ -17401,9 +17350,6 @@ function AgentComposer({
17401
17350
  useEffect11(() => {
17402
17351
  draftImagesRef.current = draftImages;
17403
17352
  }, [draftImages]);
17404
- useEffect11(() => {
17405
- draftFilesRef.current = draftFiles;
17406
- }, [draftFiles]);
17407
17353
  useEffect11(() => {
17408
17354
  if (previousSlashStatusAgentSessionIdRef.current === slashStatusAgentSessionId) {
17409
17355
  return;
@@ -17955,8 +17901,7 @@ function AgentComposer({
17955
17901
  draftImagesRef.current = nextDraftImages;
17956
17902
  onDraftContentChange({
17957
17903
  prompt: draftPromptRef.current,
17958
- images: nextDraftImages,
17959
- files: draftFilesRef.current
17904
+ images: nextDraftImages
17960
17905
  });
17961
17906
  if (!uploadPromptContent) {
17962
17907
  return;
@@ -17993,8 +17938,7 @@ function AgentComposer({
17993
17938
  draftImagesRef.current = uploadedDraftImages;
17994
17939
  onDraftContentChange({
17995
17940
  prompt: draftPromptRef.current,
17996
- images: uploadedDraftImages,
17997
- files: draftFilesRef.current
17941
+ images: uploadedDraftImages
17998
17942
  });
17999
17943
  }).catch((error) => {
18000
17944
  const message = error instanceof Error ? error.message : String(error);
@@ -18008,8 +17952,7 @@ function AgentComposer({
18008
17952
  draftImagesRef.current = failedDraftImages;
18009
17953
  onDraftContentChange({
18010
17954
  prompt: draftPromptRef.current,
18011
- images: failedDraftImages,
18012
- files: draftFilesRef.current
17955
+ images: failedDraftImages
18013
17956
  });
18014
17957
  });
18015
17958
  }
@@ -18036,103 +17979,7 @@ function AgentComposer({
18036
17979
  draftImagesRef.current = nextDraftImages;
18037
17980
  onDraftContentChange({
18038
17981
  prompt: draftPromptRef.current,
18039
- images: nextDraftImages,
18040
- files: draftFilesRef.current
18041
- });
18042
- },
18043
- [onDraftContentChange]
18044
- );
18045
- const addDraftFiles = useCallback9(
18046
- (attachments) => {
18047
- if (attachments.length === 0) {
18048
- return;
18049
- }
18050
- const uploadPromptContent = agentActivityRuntime?.uploadPromptContent;
18051
- const nextFiles = attachments.map((attachment) => ({
18052
- id: `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`,
18053
- name: attachment.name,
18054
- mimeType: attachment.mimeType?.trim() || "application/octet-stream",
18055
- hostPath: attachment.hostPath,
18056
- uploading: Boolean(uploadPromptContent)
18057
- }));
18058
- const nextDraftFiles = [...draftFilesRef.current, ...nextFiles];
18059
- draftFilesRef.current = nextDraftFiles;
18060
- onDraftContentChange({
18061
- prompt: draftPromptRef.current,
18062
- images: draftImagesRef.current,
18063
- files: nextDraftFiles
18064
- });
18065
- if (!uploadPromptContent) {
18066
- return;
18067
- }
18068
- for (const draftFile of nextFiles) {
18069
- void uploadPromptContent({
18070
- workspaceId,
18071
- content: [
18072
- {
18073
- type: "file",
18074
- mimeType: draftFile.mimeType,
18075
- hostPath: draftFile.hostPath,
18076
- name: draftFile.name,
18077
- kind: "file"
18078
- }
18079
- ]
18080
- }).then((result) => {
18081
- const uploadedFile = result.content.find(
18082
- (block) => block.type === "file"
18083
- );
18084
- const uploadedPath = uploadedFile?.path?.trim() ?? "";
18085
- if (!uploadedPath) {
18086
- throw new Error("Prompt file upload completed without path.");
18087
- }
18088
- const uploadedDraftFiles = draftFilesRef.current.map(
18089
- (file) => file.id === draftFile.id ? {
18090
- id: file.id,
18091
- name: uploadedFile?.name ?? file.name,
18092
- mimeType: uploadedFile?.mimeType ?? file.mimeType,
18093
- path: uploadedPath,
18094
- hostPath: uploadedFile?.hostPath ?? file.hostPath,
18095
- assetId: uploadedFile?.assetId,
18096
- sizeBytes: uploadedFile?.sizeBytes,
18097
- uploading: false
18098
- } : file
18099
- );
18100
- draftFilesRef.current = uploadedDraftFiles;
18101
- onDraftContentChange({
18102
- prompt: draftPromptRef.current,
18103
- images: draftImagesRef.current,
18104
- files: uploadedDraftFiles
18105
- });
18106
- }).catch((error) => {
18107
- const message = error instanceof Error ? error.message : String(error);
18108
- const failedDraftFiles = draftFilesRef.current.map(
18109
- (file) => file.id === draftFile.id ? {
18110
- ...file,
18111
- uploading: false,
18112
- uploadError: message
18113
- } : file
18114
- );
18115
- draftFilesRef.current = failedDraftFiles;
18116
- onDraftContentChange({
18117
- prompt: draftPromptRef.current,
18118
- images: draftImagesRef.current,
18119
- files: failedDraftFiles
18120
- });
18121
- });
18122
- }
18123
- },
18124
- [agentActivityRuntime, onDraftContentChange, workspaceId]
18125
- );
18126
- const removeDraftFile = useCallback9(
18127
- (id) => {
18128
- const nextDraftFiles = draftFilesRef.current.filter(
18129
- (file) => file.id !== id
18130
- );
18131
- draftFilesRef.current = nextDraftFiles;
18132
- onDraftContentChange({
18133
- prompt: draftPromptRef.current,
18134
- images: draftImagesRef.current,
18135
- files: nextDraftFiles
17982
+ images: nextDraftImages
18136
17983
  });
18137
17984
  },
18138
17985
  [onDraftContentChange]
@@ -18145,11 +17992,8 @@ function AgentComposer({
18145
17992
  if (result.mentionItems.length > 0) {
18146
17993
  editorHandleRef.current?.insertMentionItems(result.mentionItems);
18147
17994
  }
18148
- if (result.hostAttachments && result.hostAttachments.length > 0) {
18149
- addDraftFiles(result.hostAttachments);
18150
- }
18151
17995
  },
18152
- [addDraftFiles]
17996
+ []
18153
17997
  );
18154
17998
  const handleWorkspaceReferencePicker = useCallback9(async () => {
18155
17999
  if (!onRequestWorkspaceReferences) {
@@ -18416,7 +18260,6 @@ function AgentComposer({
18416
18260
  const effectivePlaceholder = disabledReasonText || placeholder;
18417
18261
  const showingSubmittedImagePreview = draftImages.length === 0 && submittedImagePreview.length > 0;
18418
18262
  const visibleDraftImages = draftImages.length > 0 ? draftImages : submittedImagePreview;
18419
- const visibleDraftFiles = draftFiles;
18420
18263
  useEffect11(() => {
18421
18264
  if (submittedImagePreview.length === 0) {
18422
18265
  submittedImagePreviewObservedBusyRef.current = false;
@@ -18659,56 +18502,6 @@ function AgentComposer({
18659
18502
  ))
18660
18503
  }
18661
18504
  ) : null,
18662
- visibleDraftFiles.length > 0 ? /* @__PURE__ */ jsx26(
18663
- "div",
18664
- {
18665
- className: "mb-2 flex max-w-[520px] flex-wrap gap-2",
18666
- "data-testid": "agent-gui-composer-file-drafts",
18667
- children: visibleDraftFiles.map((file) => /* @__PURE__ */ jsxs13(
18668
- "div",
18669
- {
18670
- className: cn(
18671
- "group inline-flex max-w-full items-center gap-2 rounded-[6px] border border-[var(--line-1)] bg-[var(--background-fronted)] px-2 py-1 text-xs text-[var(--text-primary)]",
18672
- file.uploadError && "border-[color:color-mix(in_srgb,var(--danger)_55%,var(--line-1))]"
18673
- ),
18674
- "data-uploading": file.uploading ? "true" : void 0,
18675
- "data-upload-error": file.uploadError ? "true" : void 0,
18676
- title: file.hostPath ?? file.path ?? file.name,
18677
- children: [
18678
- file.uploading ? /* @__PURE__ */ jsx26(
18679
- Spinner,
18680
- {
18681
- className: "shrink-0 text-[var(--text-primary)]",
18682
- size: 14,
18683
- strokeWidth: 2.4,
18684
- trackColor: "var(--transparency-hover)",
18685
- testId: "agent-gui-composer-file-upload-spinner"
18686
- }
18687
- ) : /* @__PURE__ */ jsx26(
18688
- "span",
18689
- {
18690
- className: "size-2 shrink-0 rounded-full bg-[var(--text-tertiary)]",
18691
- "aria-hidden": true
18692
- }
18693
- ),
18694
- /* @__PURE__ */ jsx26("span", { className: "min-w-0 max-w-[220px] truncate", children: file.name }),
18695
- /* @__PURE__ */ jsx26(
18696
- "button",
18697
- {
18698
- type: "button",
18699
- className: "inline-flex size-5 shrink-0 items-center justify-center rounded-full text-[var(--text-secondary)] transition hover:bg-[var(--transparency-hover)] hover:text-[var(--text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:color-mix(in_srgb,var(--text-primary)_34%,transparent)]",
18700
- "aria-label": labels.removeMention,
18701
- title: labels.removeMention,
18702
- onClick: () => removeDraftFile(file.id),
18703
- children: /* @__PURE__ */ jsx26(X, { size: 12, strokeWidth: 2.4, "aria-hidden": true })
18704
- }
18705
- )
18706
- ]
18707
- },
18708
- file.id
18709
- ))
18710
- }
18711
- ) : null,
18712
18505
  /* @__PURE__ */ jsx26(
18713
18506
  AgentRichTextEditor,
18714
18507
  {
@@ -19699,7 +19492,6 @@ function AgentGUINodeView({
19699
19492
  workspaceAppIcons = EMPTY_WORKSPACE_APP_ICONS3
19700
19493
  }) {
19701
19494
  "use memo";
19702
- const agentHostApi = useAgentHostApi();
19703
19495
  const layoutElementRef = useRef13(null);
19704
19496
  const railResizeInteractionRef = useRef13(null);
19705
19497
  const [isRailResizing, setIsRailResizing] = useState11(false);
@@ -19717,117 +19509,18 @@ function AgentGUINodeView({
19717
19509
  );
19718
19510
  const workspaceReferencePickerResolverRef = useRef13(null);
19719
19511
  const emptyReferencePickResult = useMemo10(
19720
- () => ({ files: [], mentionItems: [], hostAttachments: [] }),
19512
+ () => ({ files: [], mentionItems: [] }),
19721
19513
  []
19722
19514
  );
19723
- const hostLocalFileLabel = uiLanguage === "zh-CN" ? "\u672C\u5730\u6587\u4EF6(\u5BBF\u4E3B\u673A)" : "Local files (Host)";
19724
- const hostLocalFileSelectLabel = uiLanguage === "zh-CN" ? "\u4ECE\u7535\u8111\u9009\u62E9\u2026" : "Choose from computer\u2026";
19725
- const hostLocalFileActionPath = "host-local-file://select";
19726
- const referenceSourceAggregatorWithHostLocalFile = useMemo10(() => {
19727
- if (!referenceSourceAggregator) {
19728
- return null;
19729
- }
19730
- const sourceId = "host-local-file";
19731
- const actionNode = {
19732
- ref: { sourceId, nodeId: "select-files" },
19733
- kind: "file",
19734
- displayName: hostLocalFileSelectLabel
19735
- };
19736
- const rootNode = {
19737
- ref: { sourceId, nodeId: "\0source-root" },
19738
- kind: "folder",
19739
- displayName: hostLocalFileLabel,
19740
- hasChildren: true
19741
- };
19742
- return {
19743
- ...referenceSourceAggregator,
19744
- async listSources(scope) {
19745
- const sources = await referenceSourceAggregator.listSources(scope);
19746
- return [
19747
- ...sources,
19748
- {
19749
- sourceId,
19750
- label: hostLocalFileLabel,
19751
- icon: "file",
19752
- capabilities: {
19753
- searchable: false,
19754
- previewable: false,
19755
- paginated: false,
19756
- navigable: false,
19757
- filterable: false
19758
- }
19759
- }
19760
- ];
19761
- },
19762
- async listRoot(scope) {
19763
- const root = await referenceSourceAggregator.listRoot(scope);
19764
- return [...root, rootNode];
19765
- },
19766
- async listChildren(scope, node, input) {
19767
- if (node.sourceId === sourceId) {
19768
- return { entries: [actionNode], nextCursor: null };
19769
- }
19770
- return await referenceSourceAggregator.listChildren(scope, node, input);
19771
- },
19772
- async search(scope, currentSourceId, input) {
19773
- if (currentSourceId === sourceId) {
19774
- return { entries: [], nextCursor: null };
19775
- }
19776
- return await referenceSourceAggregator.search(
19777
- scope,
19778
- currentSourceId,
19779
- input
19780
- );
19781
- },
19782
- async open(scope, node) {
19783
- if (node.ref.sourceId === sourceId) {
19784
- return;
19785
- }
19786
- await referenceSourceAggregator.open(scope, node);
19787
- },
19788
- async readPreview(scope, node) {
19789
- if (node.ref.sourceId === sourceId) {
19790
- return null;
19791
- }
19792
- return await referenceSourceAggregator.readPreview(scope, node);
19793
- },
19794
- resolveSelection(node) {
19795
- if (node.ref.sourceId === sourceId) {
19796
- return {
19797
- path: hostLocalFileActionPath,
19798
- kind: "file",
19799
- displayName: actionNode.displayName
19800
- };
19801
- }
19802
- return referenceSourceAggregator.resolveSelection(node);
19803
- },
19804
- async locateTarget(scope, currentSourceId, params) {
19805
- if (currentSourceId === sourceId) {
19806
- return null;
19807
- }
19808
- return await referenceSourceAggregator.locateTarget(
19809
- scope,
19810
- currentSourceId,
19811
- params
19812
- );
19813
- },
19814
- getLoadedSource(currentSourceId) {
19815
- if (currentSourceId === sourceId) {
19816
- return void 0;
19817
- }
19818
- return referenceSourceAggregator.getLoadedSource(currentSourceId);
19819
- }
19820
- };
19821
- }, [hostLocalFileLabel, hostLocalFileSelectLabel, referenceSourceAggregator]);
19822
19515
  const requestWorkspaceReferences = useCallback10(
19823
19516
  async (entity) => {
19824
19517
  if (previewMode) {
19825
19518
  return emptyReferencePickResult;
19826
19519
  }
19827
- if (!workspaceFileReferenceAdapter && !referenceSourceAggregatorWithHostLocalFile || !workspaceFileReferenceCopy) {
19520
+ if (!workspaceFileReferenceAdapter && !referenceSourceAggregator || !workspaceFileReferenceCopy) {
19828
19521
  return emptyReferencePickResult;
19829
19522
  }
19830
- const target = entity && referenceSourceAggregatorWithHostLocalFile ? resolveMentionReferenceTarget?.(entity) ?? null : referenceSourceAggregatorWithHostLocalFile ? resolveWorkspaceReferenceInitialTarget?.({
19523
+ const target = entity && referenceSourceAggregator ? resolveMentionReferenceTarget?.(entity) ?? null : referenceSourceAggregator ? resolveWorkspaceReferenceInitialTarget?.({
19831
19524
  activeConversation: viewModel.activeConversation,
19832
19525
  composerSelectedProjectPath: viewModel.composerSettings.selectedProjectPath ?? null,
19833
19526
  userProjects: viewModel.userProjects
@@ -19841,7 +19534,7 @@ function AgentGUINodeView({
19841
19534
  [
19842
19535
  emptyReferencePickResult,
19843
19536
  previewMode,
19844
- referenceSourceAggregatorWithHostLocalFile,
19537
+ referenceSourceAggregator,
19845
19538
  resolveMentionReferenceTarget,
19846
19539
  resolveWorkspaceReferenceInitialTarget,
19847
19540
  viewModel.activeConversation,
@@ -19870,32 +19563,10 @@ function AgentGUINodeView({
19870
19563
  [onWorkspaceFileReferencesAdded]
19871
19564
  );
19872
19565
  const confirmWorkspaceReferencePicker = useCallback10(
19873
- async (refs) => {
19874
- const wantsHostFiles = refs.some(
19875
- (ref) => ref.path === hostLocalFileActionPath
19876
- );
19877
- if (!wantsHostFiles) {
19878
- settleReferencePicker(
19879
- { files: refs, mentionItems: [], hostAttachments: [] },
19880
- refs
19881
- );
19882
- return;
19883
- }
19884
- const workspaceRefs = refs.filter(
19885
- (ref) => ref.path !== hostLocalFileActionPath
19886
- );
19887
- const selected = await agentHostApi.workspace.selectFiles();
19888
- const hostAttachments = selected.map((file) => ({
19889
- hostPath: file.path,
19890
- name: file.name || file.path.split("/").pop() || file.path,
19891
- mimeType: null
19892
- }));
19893
- settleReferencePicker(
19894
- { files: workspaceRefs, mentionItems: [], hostAttachments },
19895
- workspaceRefs
19896
- );
19566
+ (refs) => {
19567
+ settleReferencePicker({ files: refs, mentionItems: [] }, refs);
19897
19568
  },
19898
- [agentHostApi.workspace, settleReferencePicker]
19569
+ [settleReferencePicker]
19899
19570
  );
19900
19571
  const confirmWorkspaceReferenceBundles = useCallback10(
19901
19572
  (result) => {
@@ -19926,7 +19597,7 @@ function AgentGUINodeView({
19926
19597
  };
19927
19598
  });
19928
19599
  settleReferencePicker(
19929
- { files: result.files, mentionItems, hostAttachments: [] },
19600
+ { files: result.files, mentionItems },
19930
19601
  result.files
19931
19602
  );
19932
19603
  },
@@ -20272,10 +19943,10 @@ function AgentGUINodeView({
20272
19943
  ]
20273
19944
  }
20274
19945
  ),
20275
- referenceSourceAggregatorWithHostLocalFile ? /* @__PURE__ */ jsx29(
19946
+ referenceSourceAggregator ? /* @__PURE__ */ jsx29(
20276
19947
  ReferenceSourcePicker,
20277
19948
  {
20278
- aggregator: referenceSourceAggregatorWithHostLocalFile,
19949
+ aggregator: referenceSourceAggregator,
20279
19950
  copy: workspaceFileReferenceCopy ?? fallbackWorkspaceFileReferenceCopy,
20280
19951
  initialTarget: workspaceReferencePickerTarget,
20281
19952
  open: workspaceReferencePickerOpen,