@tutti-os/agent-gui 0.0.19 → 0.0.20

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.
@@ -2,8 +2,8 @@ import * as react from 'react';
2
2
  import { ReactNode, JSX } from 'react';
3
3
  import { W as WorkspaceLinkAction } from '../workspaceLinkActions-CqWZaCY4.js';
4
4
  import { A as AgentMessageMarkdownWorkspaceAppIcon } from '../AgentMessageMarkdown-DeYPURtF.js';
5
- import { a as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-BVe64P2E.js';
6
- export { B as BuildWorkspaceAgentSessionDetailInput, b as buildWorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-BVe64P2E.js';
5
+ import { a as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-D09Aw-Ei.js';
6
+ export { B as BuildWorkspaceAgentSessionDetailInput, b as buildWorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-D09Aw-Ei.js';
7
7
  export { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, p as WorkspaceAgentActivityTimelineItem } from '../workspaceAgentActivityListViewModel-BK_J3aNX.js';
8
8
  import '@tutti-os/workspace-issue-manager/core';
9
9
  import '@tutti-os/agent-activity-core';
@@ -6,11 +6,11 @@ import {
6
6
  projectAgentConversationVM,
7
7
  reconcileProjectedAgentConversationVM,
8
8
  useProjectedAgentConversation
9
- } from "../chunk-SY3ES2SA.js";
10
- import "../chunk-HFL5WGRF.js";
9
+ } from "../chunk-DIBNU26G.js";
10
+ import "../chunk-7THDJWRR.js";
11
11
  import "../chunk-XAQQN6MP.js";
12
12
  import "../chunk-XJ34OIEQ.js";
13
- import "../chunk-222YHU5Z.js";
13
+ import "../chunk-IEBWFP7O.js";
14
14
  import "../chunk-TYGL25EL.js";
15
15
  import {
16
16
  translate
@@ -4,7 +4,7 @@ import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
4
4
  import { useTranslation, AgentGuiI18nLocale, TranslateFn } from '../i18n/index.js';
5
5
  import { W as WorkspaceLinkAction } from '../workspaceLinkActions-CqWZaCY4.js';
6
6
  import { AgentActivityNeedsAttentionItem, AgentActivitySnapshot } from '@tutti-os/agent-activity-core';
7
- import { A as AgentConversationPromptVM } from '../agentConversationVM-BVe64P2E.js';
7
+ import { A as AgentConversationPromptVM } from '../agentConversationVM-D09Aw-Ei.js';
8
8
  import { o as WorkspaceAgentActivityStatus } from '../workspaceAgentActivityListViewModel-BK_J3aNX.js';
9
9
  export { PLAN_IMPLEMENTATION_ACTION_IMPLEMENT, PLAN_IMPLEMENTATION_PROMPT } from '../plan-decision-ops.js';
10
10
  import '@tutti-os/workspace-issue-manager/core';
@@ -3,7 +3,7 @@ import {
3
3
  approvalOptionDisplayLabel,
4
4
  getPromptToolDetails,
5
5
  isPromptRequestIdTitle
6
- } from "../chunk-B727YDVW.js";
6
+ } from "../chunk-5H4ISRJQ.js";
7
7
  import {
8
8
  PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
9
9
  PLAN_IMPLEMENTATION_PROMPT,
@@ -16,7 +16,7 @@ import {
16
16
  cn,
17
17
  extractAgentMcpToolTarget,
18
18
  normalizeAskUserQuestions
19
- } from "../chunk-HFL5WGRF.js";
19
+ } from "../chunk-7THDJWRR.js";
20
20
  import {
21
21
  managedAgentRoundedIconUrl,
22
22
  userAvatarPlaceholderUrl,
@@ -26,7 +26,7 @@ import "../chunk-MTFSQWZ6.js";
26
26
  import {
27
27
  resolveWorkspaceAgentSessionSortTimeUnixMs
28
28
  } from "../chunk-IBIMGLCD.js";
29
- import "../chunk-222YHU5Z.js";
29
+ import "../chunk-IEBWFP7O.js";
30
30
  import {
31
31
  workspaceAgentProviderLabel
32
32
  } from "../chunk-TYGL25EL.js";
@@ -172,6 +172,10 @@ interface AgentMessageImageVM {
172
172
  mimeType: string;
173
173
  name?: string | null;
174
174
  data?: string | null;
175
+ path?: string | null;
176
+ uri?: string | null;
177
+ uploadStatus?: "pending" | "uploaded" | "failed" | string | null;
178
+ assetId?: string | null;
175
179
  }
176
180
  interface AgentThinkingContentVM {
177
181
  kind: "thinking-content";
@@ -7,14 +7,14 @@ import {
7
7
  AgentGUIConversation_styles_default,
8
8
  MessageSquareMoreIcon,
9
9
  extractAgentMcpToolTarget
10
- } from "./chunk-HFL5WGRF.js";
10
+ } from "./chunk-7THDJWRR.js";
11
11
  import {
12
12
  Spinner
13
13
  } from "./chunk-F7XLV7M3.js";
14
14
  import {
15
15
  getOptionalAgentHostApi,
16
16
  useOptionalAgentHostApi
17
- } from "./chunk-222YHU5Z.js";
17
+ } from "./chunk-IEBWFP7O.js";
18
18
  import {
19
19
  translate
20
20
  } from "./chunk-GLDKFIWM.js";
@@ -1106,4 +1106,4 @@ export {
1106
1106
  isPromptRequestIdTitle,
1107
1107
  AgentInteractivePromptSurface
1108
1108
  };
1109
- //# sourceMappingURL=chunk-B727YDVW.js.map
1109
+ //# sourceMappingURL=chunk-5H4ISRJQ.js.map
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-XAQQN6MP.js";
10
10
  import {
11
11
  getOptionalAgentHostApi
12
- } from "./chunk-222YHU5Z.js";
12
+ } from "./chunk-IEBWFP7O.js";
13
13
  import {
14
14
  AGENT_CONTEXT_MENTION_PROVIDER_IDS
15
15
  } from "./chunk-JM24HADP.js";
@@ -2142,4 +2142,4 @@ export {
2142
2142
  AgentFileMentionPalette,
2143
2143
  AgentContextMentionPalette
2144
2144
  };
2145
- //# sourceMappingURL=chunk-5BVKJM77.js.map
2145
+ //# sourceMappingURL=chunk-7IFIA3DC.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getOptionalAgentHostApi,
3
3
  useOptionalAgentHostApi
4
- } from "./chunk-222YHU5Z.js";
4
+ } from "./chunk-IEBWFP7O.js";
5
5
  import {
6
6
  useTranslation
7
7
  } from "./chunk-GLDKFIWM.js";
@@ -2577,4 +2577,4 @@ export {
2577
2577
  CustomScrollArea,
2578
2578
  MessageSquareMoreIcon
2579
2579
  };
2580
- //# sourceMappingURL=chunk-HFL5WGRF.js.map
2580
+ //# sourceMappingURL=chunk-7THDJWRR.js.map
@@ -10,7 +10,7 @@ import {
10
10
  resolveWorkspaceFileLinkAction,
11
11
  resolveWorkspaceFilePathCandidate,
12
12
  resolveWorkspaceLinkAction
13
- } from "./chunk-HFL5WGRF.js";
13
+ } from "./chunk-7THDJWRR.js";
14
14
  import {
15
15
  attrsToMentionItem,
16
16
  createAgentFileMentionExtension,
@@ -24,7 +24,7 @@ import {
24
24
  import {
25
25
  getOptionalAgentActivityRuntime,
26
26
  useOptionalAgentHostApi
27
- } from "./chunk-222YHU5Z.js";
27
+ } from "./chunk-IEBWFP7O.js";
28
28
  import {
29
29
  workspaceAgentProviderLabel
30
30
  } from "./chunk-TYGL25EL.js";
@@ -4368,13 +4368,17 @@ function projectUserMessageContentParts(message, turnId, workspaceId) {
4368
4368
  body: "",
4369
4369
  contentKind: "image-grid",
4370
4370
  images: imageBlocks.map((image, index) => ({
4371
- id: image.attachmentId || `${message.id}:image:0:${index}`,
4371
+ id: image.assetId || image.path || image.uri || image.attachmentId || `${message.id}:image:0:${index}`,
4372
4372
  workspaceId: image.workspaceId,
4373
4373
  agentSessionId: image.agentSessionId,
4374
4374
  attachmentId: image.attachmentId,
4375
4375
  mimeType: image.mimeType,
4376
4376
  name: image.name,
4377
- data: image.data
4377
+ data: image.data,
4378
+ path: image.path,
4379
+ uri: image.uri,
4380
+ uploadStatus: image.uploadStatus,
4381
+ assetId: image.assetId
4378
4382
  })),
4379
4383
  occurredAtUnixMs: message.occurredAtUnixMs ?? null,
4380
4384
  sourceTimelineItems: message.sourceTimelineItems
@@ -4448,7 +4452,11 @@ function userPromptContentBlocks(message, fallbackWorkspaceId) {
4448
4452
  attachmentId: typeof block.attachmentId === "string" && block.attachmentId.trim() ? block.attachmentId.trim() : null,
4449
4453
  mimeType,
4450
4454
  name: typeof block.name === "string" && block.name.trim() ? block.name.trim() : null,
4451
- data: typeof block.data === "string" && block.data.trim() ? block.data.trim() : null
4455
+ data: typeof block.data === "string" && block.data.trim() ? block.data.trim() : null,
4456
+ path: typeof block.path === "string" && block.path.trim() ? block.path.trim() : null,
4457
+ uri: typeof block.uri === "string" && block.uri.trim() ? block.uri.trim() : null,
4458
+ uploadStatus: typeof block.uploadStatus === "string" && block.uploadStatus.trim() ? block.uploadStatus.trim() : null,
4459
+ assetId: typeof block.assetId === "string" && block.assetId.trim() ? block.assetId.trim() : null
4452
4460
  }
4453
4461
  ];
4454
4462
  });
@@ -6545,21 +6553,34 @@ function useAgentMessageImageSources(images) {
6545
6553
  const [sources, setSources] = useState5(() => /* @__PURE__ */ new Map());
6546
6554
  const missingImages = useMemo(
6547
6555
  () => images.filter(
6548
- (image) => !imageDataUrl(image) && !sources.has(image.id) && image.workspaceId && image.agentSessionId && image.attachmentId
6556
+ (image) => !imageDataUrl(image) && !sources.has(image.id) && image.workspaceId && image.agentSessionId && (image.attachmentId || image.path || image.uri)
6549
6557
  ),
6550
6558
  [images, sources]
6551
6559
  );
6552
6560
  useEffect4(() => {
6553
- if (!runtime?.readSessionAttachment || missingImages.length === 0) {
6561
+ if (!runtime?.readSessionAttachment && !runtime?.readPromptAsset || missingImages.length === 0) {
6554
6562
  return;
6555
6563
  }
6556
6564
  let canceled = false;
6557
6565
  for (const image of missingImages) {
6558
- void runtime.readSessionAttachment({
6566
+ const readImage = image.attachmentId ? runtime.readSessionAttachment?.({
6559
6567
  workspaceId: image.workspaceId ?? "",
6560
6568
  agentSessionId: image.agentSessionId,
6561
6569
  attachmentId: image.attachmentId ?? ""
6562
- }).then((attachment) => {
6570
+ }) : runtime.readPromptAsset?.({
6571
+ workspaceId: image.workspaceId ?? "",
6572
+ agentSessionId: image.agentSessionId,
6573
+ assetId: image.assetId,
6574
+ mimeType: image.mimeType,
6575
+ name: image.name,
6576
+ path: image.path,
6577
+ uri: image.uri,
6578
+ uploadStatus: image.uploadStatus
6579
+ });
6580
+ if (!readImage) {
6581
+ continue;
6582
+ }
6583
+ void readImage.then((attachment) => {
6563
6584
  if (canceled) {
6564
6585
  return;
6565
6586
  }
@@ -12085,4 +12106,4 @@ export {
12085
12106
  AgentConversationFlow,
12086
12107
  useProjectedAgentConversation
12087
12108
  };
12088
- //# sourceMappingURL=chunk-SY3ES2SA.js.map
12109
+ //# sourceMappingURL=chunk-DIBNU26G.js.map