@tutti-os/agent-gui 0.0.86 → 0.0.88

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.
@@ -4,7 +4,7 @@ import { W as WorkspaceLinkAction } from '../workspaceLinkActions-DS9LWqzI.js';
4
4
  import { A as AgentMessageMarkdownWorkspaceAppIcon } from '../AgentMessageMarkdown-DeYPURtF.js';
5
5
  import { c as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-BgoqFyE9.js';
6
6
  export { B as BuildWorkspaceAgentSessionDetailInput, d as buildWorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-BgoqFyE9.js';
7
- import { e as AgentGUIProviderSkillOption } from '../agentGuiNodeTypes-fRobgKiP.js';
7
+ import { e as AgentGUIProviderSkillOption } from '../agentGuiNodeTypes-BEs_Lhc3.js';
8
8
  export { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, q as WorkspaceAgentActivityTimelineItem } from '../workspaceAgentActivityListViewModel-TXH1VXrk.js';
9
9
  import '@tutti-os/workspace-issue-manager/core';
10
10
  import '@tutti-os/agent-activity-core';
@@ -6,7 +6,7 @@ import {
6
6
  projectAgentConversationVM,
7
7
  reconcileProjectedAgentConversationVM,
8
8
  useProjectedAgentConversation
9
- } from "../chunk-7FZT2OYT.js";
9
+ } from "../chunk-DC3HCHA3.js";
10
10
  import "../chunk-XQUUELKF.js";
11
11
  import "../chunk-PSLAWU25.js";
12
12
  import "../chunk-KQE5KV2V.js";
@@ -506,6 +506,7 @@ interface AgentComposerDraftImage {
506
506
  mimeType: "image/png" | "image/jpeg" | "image/webp";
507
507
  attachmentId?: string;
508
508
  data?: string;
509
+ url?: string;
509
510
  path?: string;
510
511
  previewUrl: string;
511
512
  uploading?: boolean;
@@ -3952,14 +3952,16 @@ function normalizeAgentPromptContentBlocks(content) {
3952
3952
  const mimeType = block.mimeType?.trim();
3953
3953
  const attachmentId = block.attachmentId?.trim();
3954
3954
  const data = block.data?.trim();
3955
+ const url = block.url?.trim();
3955
3956
  const imagePath = block.path?.trim();
3956
- if (!attachmentId && !data && !imagePath || mimeType !== "image/png" && mimeType !== "image/jpeg" && mimeType !== "image/webp") {
3957
+ if (!attachmentId && !data && !url && !imagePath || data && url || url && !isSafePromptImageUrl(url) || mimeType !== "image/png" && mimeType !== "image/jpeg" && mimeType !== "image/webp") {
3957
3958
  continue;
3958
3959
  }
3959
3960
  result.push({
3960
3961
  type: "image",
3961
3962
  mimeType,
3962
- ...attachmentId ? { attachmentId } : imagePath ? { path: imagePath } : { data },
3963
+ ...attachmentId ? { attachmentId } : {},
3964
+ ...url ? { url } : data ? { data } : imagePath ? { path: imagePath } : {},
3963
3965
  ...block.name?.trim() ? { name: block.name.trim() } : {}
3964
3966
  });
3965
3967
  continue;
@@ -3994,6 +3996,14 @@ function normalizeAgentPromptContentBlocks(content) {
3994
3996
  }
3995
3997
  return result;
3996
3998
  }
3999
+ function isSafePromptImageUrl(value) {
4000
+ try {
4001
+ const url = new URL(value);
4002
+ return url.protocol === "https:" && Boolean(url.hostname) && !url.username && !url.password;
4003
+ } catch {
4004
+ return false;
4005
+ }
4006
+ }
3997
4007
  function agentPromptContentDisplayText(content) {
3998
4008
  return content.filter((block) => block.type === "text").map((block) => block.text?.trim() ?? "").filter(Boolean).join("\n");
3999
4009
  }
@@ -4002,7 +4012,7 @@ function agentPromptContentHasImage(content) {
4002
4012
  }
4003
4013
  function agentPromptContentImageBlocks(content) {
4004
4014
  return normalizeAgentPromptContentBlocks(content).filter(
4005
- (block) => block.type === "image" && (typeof block.attachmentId === "string" || typeof block.data === "string" || typeof block.path === "string") && typeof block.mimeType === "string"
4015
+ (block) => block.type === "image" && (typeof block.attachmentId === "string" || typeof block.data === "string" || typeof block.url === "string" || typeof block.path === "string") && typeof block.mimeType === "string"
4006
4016
  );
4007
4017
  }
4008
4018
  function agentPromptContentToComposerDraft(content, idPrefix) {
@@ -4046,7 +4056,8 @@ function agentComposerDraftToPromptContent(input) {
4046
4056
  ...input.draft.images.slice(0, MAX_AGENT_COMPOSER_DRAFT_IMAGES).filter((image) => !image.uploading && !image.uploadError).map((image) => ({
4047
4057
  type: "image",
4048
4058
  mimeType: image.mimeType,
4049
- ...image.attachmentId ? { attachmentId: image.attachmentId } : image.path ? { path: image.path } : { data: image.data },
4059
+ ...image.attachmentId ? { attachmentId: image.attachmentId } : {},
4060
+ ...image.url ? { url: image.url } : image.path ? { path: image.path } : { data: image.data },
4050
4061
  name: image.name
4051
4062
  })),
4052
4063
  ...(input.draft.files ?? []).filter((file) => !file.uploading && !file.uploadError).map((file) => ({
@@ -4216,8 +4227,9 @@ function agentPromptImageBlockToDraftImage(image, idPrefix, index) {
4216
4227
  mimeType: image.mimeType,
4217
4228
  ...image.attachmentId ? { attachmentId: image.attachmentId } : {},
4218
4229
  ...image.data ? { data: image.data } : {},
4230
+ ...image.url ? { url: image.url } : {},
4219
4231
  ...image.path ? { path: image.path } : {},
4220
- previewUrl: typeof image.data === "string" && image.data ? `data:${image.mimeType};base64,${image.data}` : image.path ?? ""
4232
+ previewUrl: typeof image.data === "string" && image.data ? `data:${image.mimeType};base64,${image.data}` : image.url ?? image.path ?? ""
4221
4233
  };
4222
4234
  }
4223
4235
  function agentPromptFileBlockToDraftFile(file, idPrefix, index) {
@@ -15480,4 +15492,4 @@ export {
15480
15492
  AgentConversationFlow,
15481
15493
  useProjectedAgentConversation
15482
15494
  };
15483
- //# sourceMappingURL=chunk-7FZT2OYT.js.map
15495
+ //# sourceMappingURL=chunk-DC3HCHA3.js.map