Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

PRD-8453 fix(ok): image drop-to-attach on bottom Ask AI composer (#4055)

Abraham8fccfb2c64af
diff --git a/.changeset/ask-ai-composer-attachments.md b/.changeset/ask-ai-composer-attachments.md
new file mode 100644
index 000000000..7384a5546
--- /dev/null
+++ b/.changeset/ask-ai-composer-attachments.md
@@ -0,0 +1,11 @@
+---
+"@inkeep/open-knowledge": patch
+---
+
+The **Ask AI** composer at the bottom of the editor now takes attachments. Drop a file on it, paste a screenshot into it, or use the new attach button beside the field; each attachment appears as a removable chip above the input and rides along with your prompt into the new chat.
+
+- **Only in-app agents receive attachments.** A terminal CLI or an external app has no attachment channel, so with one of those selected the composer refuses the drop and says which constraint applies rather than accepting a file it cannot forward. Attach first and then switch agents, and the send is blocked with the same explanation instead of quietly stripping the file.
+- **Images from anywhere, other files from inside the project.** A non-image file is sent as a path reference, so it has to live in the workspace; anything skipped is reported as a single summary rather than one notice per file. Attachments are capped at 700 KB per message — a full-screen Retina screenshot is usually over that limit, so crop or resize it first.
+- **The agent gets the last word on images.** If the agent turns out not to accept image attachments, the chat now says so instead of leaving you to guess why the reply ignored your screenshot.
+
+The create-a-project prompt on a fresh project takes attachments the same way: drop, paste, or attach while an in-app agent is picked, and the files ride into the launched conversation; pick a terminal CLI or an external app instead and it refuses with the reason. The comment composers that share this field answer a dropped file with a short inline note instead of ignoring it.
diff --git a/docs/content/features/editor.mdx b/docs/content/features/editor.mdx
index afd714d76..262c767c2 100644
--- a/docs/content/features/editor.mdx
+++ b/docs/content/features/editor.mdx
@@ -112,7 +112,9 @@ An **Ask AI** composer is docked at the bottom of the editor — in the desktop
It's the primary in-editor way to hand work to an agent, and the freetext companion to the menu-driven [Open with AI](#open-with-ai) (whole file / folder / project). Submitting dispatches the typed prompt to your **default agent**, scoped to the current doc (or, in a folder view, the folder), which the agent receives as an `@`-mention. Until you pick something else, that default is an **In app** agent, so the conversation stays inside OpenKnowledge; it falls back to a **Terminal** CLI — preferring one detected on this machine — and then to an **External app**, when no higher option is available here. The agent picker beside the field overrides the default per send, listing In app agents first, then the [Terminal](#open-with-ai) CLIs available on this machine, then the external agent apps detected here. Whatever you pick is remembered on that machine and stays your default until you change it or turn it off in **Agent connections**. Success and failure use the same handoff toast as Open with AI.
-The composer stays out of the way where it doesn't belong: it's hidden inside an AI editor's embedded view, while the [docked terminal](#terminal) is open (the terminal is its own AI entry point), and when no doc or folder is open (the empty state already offers project handoff). It's also dismissible — an **Ask AI** badge in the status bar brings it back.
+The field also takes attachments when an **In app** agent is selected: drop a file on it, paste a screenshot into it, or use the attach button beside the field. Each one appears as a removable chip above the input and travels with the prompt into the new conversation. Images can come from anywhere; other files are sent as a path reference, so they have to live inside the project. Images must be PNG, JPEG, GIF, or WebP, and all attachments on one message are capped at 700 KB combined. That budget is tight for screenshots — a full-screen Retina capture is usually several megabytes and will be refused, so crop the capture or resize it first. Pick a **Terminal** CLI or an **External app** instead and the composer refuses the drop with the reason — those targets have no attachment channel — and if you attach first and switch afterwards, the send is blocked with the same explanation rather than silently dropping the file. Attachments aren't available in note windows yet, and whether an in-app agent can actually read an image is up to that agent: if it can't, OpenKnowledge shows a notification saying so once the agent's capabilities are known. The empty-state create composer on a fresh project takes attachments the same way — drop, paste, or the attach button while an **In app** agent is picked — and refuses them with the reason for **Terminal** and **External apps** targets.
+
+The composer stays out of the way where it doesn't belong: it's hidden inside an AI editor's embedded view, while the [docked terminal](#terminal) is open (the terminal is its own AI entry point), and when no doc or folder is open (the empty state's create composer offers the same handoff, attachments included). It's also dismissible — an **Ask AI** badge in the status bar brings it back.
### From a text selection
diff --git a/packages/app/src/comments/CommentSelectionAffordance.tsx b/packages/app/src/comments/CommentSelectionAffordance.tsx
index c848ee49b..edda035a9 100644
--- a/packages/app/src/comments/CommentSelectionAffordance.tsx
+++ b/packages/app/src/comments/CommentSelectionAffordance.tsx
@@ -180,6 +180,7 @@ export function CommentSelectionAffordance({
ref={inputRef}
ariaLabel={t`Add a comment`}
placeholder={t`Add a comment`}
+ attachmentDrop={{ kind: 'refuse' }}
onEmptyChange={setEmpty}
onSubmit={post}
onEscape={reset}
diff --git a/packages/app/src/comments/ThreadCard.tsx b/packages/app/src/comments/ThreadCard.tsx
index 6913950e5..cf09eedc7 100644
--- a/packages/app/src/comments/ThreadCard.tsx
+++ b/packages/app/src/comments/ThreadCard.tsx
@@ -322,6 +322,7 @@ export function ThreadCard({
ref={editFieldRef}
ariaLabel={t`Edit this comment`}
placeholder={t`Edit this comment`}
+ attachmentDrop={{ kind: 'refuse' }}
onEmptyChange={setDraftEmpty}
onContentChange={() => {
liveDraftRef.current = editFieldRef.current?.getContent().instruction ?? null;
diff --git a/packages/app/src/components/BottomComposer.drop.dom.test.tsx b/packages/app/src/components/BottomComposer.drop.dom.test.tsx
new file mode 100644
index 000000000..db3641ddd
--- /dev/null
+++ b/packages/app/src/components/BottomComposer.drop.dom.test.tsx
@@ -0,0 +1,669 @@
+import * as actualLinguiMacro from '@lingui/react/macro';
+import {
+ act,
+ cleanup,
+ createEvent,
+ fireEvent,
+ render,
+ screen,
+ waitFor,
+} from '@testing-library/react';
+import type { ReactNode } from 'react';
+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
+import { setComposerDraftDoc } from '@/components/composer-draft-store';
+import {
+ type AgentThreadLaunchDetail,
+ subscribeToAgentThreadLaunchRequests,
+} from '@/components/handoff/thread-launch-events';
+import {
+ attachmentChipEvidence,
+ backfillElementFromPoint,
+ collectImageParts,
+ DROP_TEST_FILE_NAME,
+ DROP_TEST_PNG_BASE64,
+ dropImageOn,
+ dropRefusalText,
+ expectDragOverIsCancelled,
+ liveRegionTexts,
+ makeFilesDataTransfer,
+ makeImageFile,
+ removeAttachmentButton,
+} from '@/editor/composer-drop.test-helper';
+import { reloadEnabledAgentsFromStorage } from '@/lib/acp/enabled-agents';
+import { registerAgent, reloadRegisteredAgentsFromStorage } from '@/lib/acp/registered-agents';
+import { OK_SIDEBAR_DRAG_MIME } from '@/lib/sidebar-drag';
+import { saveStickyAgent, terminalCliId } from '@/lib/unified-agent-store';
+
+vi.doMock('@lingui/react/macro', () => ({
+ ...actualLinguiMacro,
+ Trans: ({ children }: { children: ReactNode }) => <>{children}</>,
+ useLingui: () => ({
+ t: (strings: TemplateStringsArray, ...values: unknown[]) =>
+ strings.reduce((acc, part, index) => `${acc}${part}${values[index] ?? ''}`, ''),
+ }),
+}));
+
+vi.doMock('@/components/handoff/OpenInAgentMenuItem', () => ({
+ TargetIcon: ({ id }: { id: string }) => <span data-testid={`target-icon-${id}`} />,
+}));
+
+type MenuChild = {
+ children?: ReactNode;
+ disabled?: boolean;
+ onSelect?: () => void;
+ [key: string]: unknown;
+};
+vi.doMock('@/components/ui/dropdown-menu', () => ({
+ DropdownMenu: ({ children }: MenuChild) => <div>{children}</div>,
+ DropdownMenuTrigger: ({ children }: MenuChild) => <>{children}</>,
+ DropdownMenuContent: ({ children, ...props }: MenuChild) => (
+ <div role="menu" {...props}>
+ {children}
+ </div>
+ ),
+ DropdownMenuGroup: ({ children }: MenuChild) => <>{children}</>,
+ DropdownMenuItem: ({ children, disabled, onSelect, ...props }: MenuChild) => (
+ <button type="button" role="menuitem" disabled={disabled} onClick={onSelect} {...props}>
+ {children}
+ </button>
+ ),
+ DropdownMenuCheckboxItem: ({ children, disabled, checked, ...props }: MenuChild) => (
+ <button
+ type="button"
+ role="menuitemcheckbox"
+ aria-checked={checked === true}
+ disabled={disabled}
+ {...props}
+ >
+ {children}
+ </button>
+ ),
+ DropdownMenuLabel: ({ children, ...props }: MenuChild) => <div {...props}>{children}</div>,
+ DropdownMenuSeparator: () => <hr data-testid="menu-separator" />,
+}));
+
+let installStates: Record<string, { installed: boolean | null }> = {};
+vi.doMock('@/components/handoff/useInstalledAgents', () => ({
+ useInstalledAgents: () => ({ states: installStates, refresh: () => Promise.resolve() }),
+}));
+
+vi.doMock('@/lib/use-workspace', () => ({
+ useWorkspace: () => ({ contentDir: '/tmp/project', pathSeparator: '/' }),
+}));
+
+vi.doMock('@/hooks/use-selection-context', () => ({
+ useSelectionContext: () => null,
+ usePublishFrontmatterSelection: () => {},
+}));
+
+vi.doMock('@/components/PageListContext', () => ({
+ usePageList: () => ({ pageMeta: new Map() }),
+}));
+
+vi.doMock('@/lib/onboarding-signals', () => ({ recordOnboardingAskedAi: () => {} }));
+
+let noteWindowMode = false;
+vi.doMock('@/lib/note-window-mode', async () => {
+ const actual =
+ await vi.importActual<typeof import('@/lib/note-window-mode')>('@/lib/note-window-mode');
+ return { ...actual, isNoteWindow: () => noteWindowMode };
+});
+
+const dispatchCalls: Array<{ target: string; input: unknown }> = [];
+vi.doMock('@/components/handoff/useHandoffDispatch', async () => {
+ const actual = await vi.importActual<typeof import('@/components/handoff/useHandoffDispatch')>(
+ '@/components/handoff/useHandoffDispatch',
+ );
+ return {
+ ...actual,
+ useHandoffDispatch: () => ({
+ dispatch: (target: string, input: unknown) => {
+ dispatchCalls.push({ target, input });
+ return Promise.resolve({ ok: true });
+ },
+ reinstallCoworkSkill: () => Promise.resolve({ kind: 'already-installed' }),
+ }),
+ };
+});
+
+const toastMessages: string[] = [];
+vi.doMock('sonner', () => ({
+ toast: {
+ error: (message: string) => {
+ toastMessages.push(message);
+ },
+ info: (message: string) => {
+ toastMessages.push(message);
+ },
+ warning: (message: string) => {
+ toastMessages.push(message);
+ },
+ success: (message: string) => {
+ toastMessages.push(message);
+ },
+ },
+}));
+
+type ComposeDispatch = (
+ items: readonly { threadId: string; payload: { docName: string } }[],
+) => Promise<boolean>;
+const commentBatches: unknown[] = [];
+let queuedCommentCount = 0;
+vi.doMock('@/comments/store', () => ({
+ dispatchComments: async ({ compose }: { compose: ComposeDispatch }) => {
+ if (queuedCommentCount === 0) return [];
+ const items = [{ threadId: 'c1', payload: { docName: 'notes' } }];
+ const delivered = await compose(items);
+ if (delivered) commentBatches.push(items);
+ return delivered ? ['c1'] : [];
+ },
+ subscribeCommentPosted: () => () => {},
+}));
+
+vi.doMock('@/comments/comment-chips', async () => {
+ const actual = await vi.importActual<typeof import('@/comments/comment-chips')>(
+ '@/comments/comment-chips',
+ );
+ return {
+ ...actual,
+ useSelectedCommentCount: () => queuedCommentCount,
+ useSelectedCommentDocs: () => (queuedCommentCount > 0 ? ['notes'] : []),
+ toCommentBatchItem: () => ({
+ docName: 'notes',
+ body: 'look at this',
+ quote: 'the tofu',
+ anchorLost: false,
+ }),
+ };
+});
+
+const ALL_INSTALLED: Record<string, { installed: boolean | null }> = {
+ 'claude-cowork': { installed: false },
+ 'claude-code': { installed: true },
+ codex: { installed: true },
+ cursor: { installed: true },
+};
+
+const DROPPED_FILE_NAME = DROP_TEST_FILE_NAME;
+const INSTRUCTION = 'please describe the attached picture';
+
+async function renderComposer(docName = 'notes', { withTerminal = true } = {}) {
+ const { BottomComposer } = await import('./BottomComposer');
+ const { TooltipProvider } = await import('@/components/ui/tooltip');
+ const { TerminalLaunchProvider } = await import('@/components/handoff/TerminalLaunchContext');
+ return render(
+ <TooltipProvider>
+ <TerminalLaunchProvider
+ value={
+ withTerminal ? { launchInTerminal: () => {}, installedClis: { claude: true } } : null
+ }
+ >
+ <BottomComposer docName={docName} surface="wysiwyg" />
+ </TerminalLaunchProvider>
+ </TooltipProvider>,
+ );
+}
+
+function seedInstructionDraft() {
+ setComposerDraftDoc({
+ type: 'doc',
+ content: [{ type: 'paragraph', content: [{ type: 'text', text: INSTRUCTION }] }],
+ });
+}
+
+function getInput() {
+ return screen.getByRole('textbox', { name: 'Ask AI' });
+}
+
+function visibleFeedback(): string[] {
+ return [...toastMessages, ...liveRegionTexts()];
+}
+
+let launches: AgentThreadLaunchDetail[] = [];
+let unsubscribeLaunches: (() => void) | null = null;
+let consoleErrorSpy: ReturnType<typeof vi.spyOn>;
+
+beforeEach(() => {
+ backfillElementFromPoint();
+ noteWindowMode = false;
+ consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(() => {});
+ installStates = { ...ALL_INSTALLED };
+ dispatchCalls.length = 0;
+ toastMessages.length = 0;
+ commentBatches.length = 0;
+ queuedCommentCount = 0;
+ launches = [];
+ unsubscribeLaunches = subscribeToAgentThreadLaunchRequests((detail) => launches.push(detail));
+ try {
+ window.localStorage.clear();
+ } catch {}
+ setComposerDraftDoc(null);
+ reloadRegisteredAgentsFromStorage();
+ reloadEnabledAgentsFromStorage();
+});
+
+afterEach(() => {
+ cleanup();
+ unsubscribeLaunches?.();
+ consoleErrorSpy.mockRestore();
+ delete (window as { okDesktop?: unknown }).okDesktop;
+});
+
+describe('image drop on the bottom Ask AI composer with the in-app thread target', () => {
+ test('a dropped image attaches as a visible, removable chip', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+
+ dropImageOn(getInput());
+
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).not.toBeNull();
+ });
+
+ const remove = removeAttachmentButton(DROPPED_FILE_NAME);
+ expect(remove).toBeDefined();
+ if (remove !== undefined) fireEvent.click(remove);
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).toBeNull();
+ });
+ });
+
+ test('a dropped image reaches the launched thread as an ACP image content block', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+
+ dropImageOn(getInput());
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).not.toBeNull();
+ });
+
+ fireEvent.click(screen.getByTestId('ask-ai-send'));
+
+ await waitFor(() => {
+ expect(launches).toHaveLength(1);
+ });
+ const parts = collectImageParts(launches[0]);
+ expect(parts).toContainEqual(
+ expect.objectContaining({ kind: 'image', mimeType: 'image/png', data: DROP_TEST_PNG_BASE64 }),
+ );
+
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).toBeNull();
+ });
+ });
+
+ test('removing the chip keeps the image out of the launch payload', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+
+ dropImageOn(getInput());
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).not.toBeNull();
+ });
+ const remove = removeAttachmentButton(DROPPED_FILE_NAME);
+ expect(remove).toBeDefined();
+ if (remove !== undefined) fireEvent.click(remove);
+
+ fireEvent.click(screen.getByTestId('ask-ai-send'));
+
+ await waitFor(() => {
+ expect(launches).toHaveLength(1);
+ });
+ expect(collectImageParts(launches[0])).toEqual([]);
+ expect(launches[0]?.prompt).toContain(INSTRUCTION);
+ });
+});
+
+describe('image drop in a note window', () => {
+ test('the drop is refused by name even with the in-app thread target selected', async () => {
+ noteWindowMode = true;
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+
+ dropImageOn(getInput());
+
+ await waitFor(() => {
+ expect(dropRefusalText()).toContain('note windows');
+ });
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).toBeNull();
+ expect(launches).toEqual([]);
+ expect(dispatchCalls).toEqual([]);
+ });
+});
+
+describe('a drop that carries no attachable file', () => {
+ test('an empty file is refused by name rather than falling through to the browser', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+
+ const input = getInput();
+ const empty = new File([], 'screenshots', { type: '' });
+ const dataTransfer = makeFilesDataTransfer([empty]);
+ const dropEvent = createEvent.drop(input, { dataTransfer });
+ act(() => {
+ fireEvent(input, dropEvent);
+ });
+
+ expect(dropEvent.defaultPrevented).toBe(true);
+ await waitFor(() => {
+ expect(dropRefusalText()).toContain('Folders and empty files');
+ });
+ expect(attachmentChipEvidence('screenshots')).toBeNull();
+ });
+});
+
+describe('the composer drop surface itself', () => {
+ test('dragover is cancelled with a copy drop effect so a real browser will deliver the drop', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+
+ expectDragOverIsCancelled(getInput());
+ });
+
+ test('dragover in refuse mode sets dropEffect copy (never none) so the drop event still fires', async () => {
+ saveStickyAgent('cursor');
+ seedInstructionDraft();
+ await renderComposer();
+ expect(screen.getByTestId('ask-ai-send').textContent).toContain('Cursor');
+
+ expectDragOverIsCancelled(getInput());
+ });
+
+ test('send stays disabled while a dropped image is still being read', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+
+ dropImageOn(getInput());
+
+ expect(screen.getByTestId('ask-ai-send')).toHaveProperty('disabled', true);
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).not.toBeNull();
+ });
+ await waitFor(() => {
+ expect(screen.getByTestId('ask-ai-send')).toHaveProperty('disabled', false);
+ });
+ });
+});
+
+describe('drops on the composer card outside the text box', () => {
+ test('a drop on the card root attaches just like a drop on the editor', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+
+ dropImageOn(screen.getByTestId('ask-ai-composer-card'));
+
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).not.toBeNull();
+ });
+ });
+
+ test('a drop on a non-editor child of the card attaches instead of falling through', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+
+ dropImageOn(screen.getByTestId('ask-ai-send'));
+
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).not.toBeNull();
+ });
+ });
+
+ test('a card drop for a target with no attachment channel refuses visibly', async () => {
+ saveStickyAgent('cursor');
+ seedInstructionDraft();
+ await renderComposer();
+
+ dropImageOn(screen.getByTestId('ask-ai-composer-card'));
+
+ await waitFor(() => {
+ expect(dropRefusalText()).toContain('opens via a link');
+ });
+ expect(toastMessages).toEqual([]);
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).toBeNull();
+ });
+
+ test('dragover on the card is cancelled with a copy drop effect', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+
+ expectDragOverIsCancelled(screen.getByTestId('ask-ai-composer-card'));
+ });
+});
+
+describe('attachments with no agent configured at all', () => {
+ test('an image drop is refused with a visible reason, not silently ignored', async () => {
+ installStates = {};
+ seedInstructionDraft();
+ await renderComposer('notes', { withTerminal: false });
+
+ dropImageOn(getInput());
+
+ await waitFor(() => {
+ expect(dropRefusalText()).toContain('No agents are set up yet');
+ });
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).toBeNull();
+ });
+
+ test('a pasted image is refused with a visible reason, not a silent no-op', async () => {
+ installStates = {};
+ seedInstructionDraft();
+ await renderComposer('notes', { withTerminal: false });
+
+ act(() => {
+ fireEvent.paste(getInput(), { clipboardData: makeFilesDataTransfer([makeImageFile()]) });
+ });
+
+ await waitFor(() => {
+ expect(dropRefusalText()).toContain('No agents are set up yet');
+ });
+ expect(toastMessages).toEqual([]);
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).toBeNull();
+ });
+});
+
+describe('pasting an image into the Ask AI composer', () => {
+ test('a pasted image attaches for the in-app thread target', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+
+ act(() => {
+ fireEvent.paste(getInput(), { clipboardData: makeFilesDataTransfer([makeImageFile()]) });
+ });
+
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).not.toBeNull();
+ });
+ });
+
+ test('a pasted image is refused by name for a target with no attachment channel', async () => {
+ saveStickyAgent('cursor');
+ seedInstructionDraft();
+ await renderComposer();
+
+ act(() => {
+ fireEvent.paste(getInput(), { clipboardData: makeFilesDataTransfer([makeImageFile()]) });
+ });
+
+ await waitFor(() => {
+ expect(dropRefusalText()).toContain('opens via a link');
+ });
+ expect(toastMessages).toEqual([]);
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).toBeNull();
+ });
+});
+
+describe('image drop followed by a target switch', () => {
+ test('sending to a linkless target with an attachment pending refuses or strips visibly, never silently losing the image', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+
+ dropImageOn(getInput());
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).not.toBeNull();
+ });
+
+ fireEvent.click(screen.getByTestId('ask-ai-agent-trigger'));
+ fireEvent.click(screen.getByTestId('ask-ai-agent-option-cursor'));
+ expect(screen.getByTestId('ask-ai-send').textContent).toContain('Cursor');
+
+ const feedbackBefore = new Set(visibleFeedback());
+ fireEvent.click(screen.getByTestId('ask-ai-send'));
+
+ await waitFor(() => {
+ const fresh = visibleFeedback().filter((text) => !feedbackBefore.has(text));
+ expect(fresh).not.toEqual([]);
+ });
+ expect(collectImageParts(launches)).toEqual([]);
+ expect(collectImageParts(dispatchCalls)).toEqual([]);
+ });
+});
+
+describe('image drop with a target that has no attachment channel', () => {
+ test('a link-opened desktop target names the link constraint in the refusal', async () => {
+ saveStickyAgent('cursor');
+ seedInstructionDraft();
+ await renderComposer();
+ expect(screen.getByTestId('ask-ai-send').textContent).toContain('Cursor');
+
+ dropImageOn(getInput());
+
+ await waitFor(() => {
+ expect(dropRefusalText()).toContain('opens via a link');
+ });
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).toBeNull();
+ expect(dispatchCalls).toEqual([]);
+ expect(launches).toEqual([]);
+ });
+
+ test('a terminal CLI target names the terminal constraint in the refusal', async () => {
+ saveStickyAgent(terminalCliId('claude'));
+ seedInstructionDraft();
+ await renderComposer();
+
+ dropImageOn(getInput());
+
+ await waitFor(() => {
+ expect(dropRefusalText()).toContain('runs in a terminal');
+ });
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).toBeNull();
+ expect(dispatchCalls).toEqual([]);
+ expect(launches).toEqual([]);
+ });
+});
+
+describe('the attachment status live region', () => {
+ test('announces the in-flight read first, then the ready count once it settles', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+ const region = screen.getByTestId('composer-attachment-status');
+ expect(region.textContent).toBe('');
+
+ dropImageOn(getInput());
+
+ expect(region.textContent).toContain('Uploading');
+ expect(region.textContent).not.toContain('ready to send');
+ await waitFor(() => {
+ expect(region.textContent).toContain('ready to send');
+ });
+ expect(region.textContent).not.toContain('Uploading');
+ });
+});
+
+describe('image drop while comments are queued', () => {
+ test('the comment batch ships with the image instead of blocking the send', async () => {
+ queuedCommentCount = 1;
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+
+ dropImageOn(getInput());
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).not.toBeNull();
+ });
+
+ fireEvent.click(screen.getByTestId('ask-ai-send'));
+
+ await waitFor(() => {
+ expect(launches).toHaveLength(1);
+ });
+ expect(collectImageParts(launches[0])).toContainEqual(
+ expect.objectContaining({ kind: 'image', mimeType: 'image/png', data: DROP_TEST_PNG_BASE64 }),
+ );
+ expect(commentBatches).toHaveLength(1);
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROPPED_FILE_NAME)).toBeNull();
+ });
+ });
+});
+
+describe('the drag highlight on the composer card', () => {
+ test('an accept mount lights a distinct channel and survives a dragleave bubbling from a child', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+ const card = screen.getByTestId('ask-ai-composer-card');
+ const input = getInput();
+ const dataTransfer = makeFilesDataTransfer([makeImageFile()]);
+
+ act(() => {
+ fireEvent.dragEnter(card, { dataTransfer });
+ });
+ expect(card.getAttribute('data-drag-active')).toBe('accept');
+
+ const leaveToChild = createEvent.dragLeave(card, { dataTransfer });
+ Object.defineProperty(leaveToChild, 'relatedTarget', { value: input });
+ act(() => {
+ fireEvent.dragEnter(input, { dataTransfer });
+ fireEvent(card, leaveToChild);
+ });
+ expect(card.getAttribute('data-drag-active')).toBe('accept');
+
+ act(() => {
+ fireEvent.dragLeave(card, { dataTransfer });
+ });
+ expect(card.getAttribute('data-drag-active')).toBeNull();
+ });
+
+ test('a refuse mount signals refusal during the drag instead of advertising acceptance', async () => {
+ saveStickyAgent('cursor');
+ seedInstructionDraft();
+ await renderComposer();
+ const card = screen.getByTestId('ask-ai-composer-card');
+
+ act(() => {
+ fireEvent.dragEnter(card, { dataTransfer: makeFilesDataTransfer([makeImageFile()]) });
+ });
+
+ expect(card.getAttribute('data-drag-active')).toBe('refuse');
+ });
+
+ test('a sidebar row drag does not light the card even when it advertises Files', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ seedInstructionDraft();
+ await renderComposer();
+ const card = screen.getByTestId('ask-ai-composer-card');
+ const dataTransfer = {
+ ...makeFilesDataTransfer([makeImageFile()]),
+ types: ['Files', OK_SIDEBAR_DRAG_MIME],
+ };
+
+ act(() => {
+ fireEvent.dragEnter(card, { dataTransfer });
+ });
+
+ expect(card.getAttribute('data-drag-active')).toBeNull();
+ });
+});
diff --git a/packages/app/src/components/BottomComposer.tsx b/packages/app/src/components/BottomComposer.tsx
index e05d95a5a..78581fe3a 100644
--- a/packages/app/src/components/BottomComposer.tsx
+++ b/packages/app/src/components/BottomComposer.tsx
@@ -1,7 +1,7 @@
// oxlint-disable ok/no-physical-direction-utility -- pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/lint-plugins/ok-rules/README.md#no-physical-direction-utility
import { type TargetData, TERMINAL_CLIS, type TerminalCli } from '@inkeep/open-knowledge-core';
-import { Trans, useLingui } from '@lingui/react/macro';
+import { Plural, Trans, useLingui } from '@lingui/react/macro';
import { ArrowUpRight, ChevronDown, TextQuote, X } from 'lucide-react';
import { useEffect, useRef, useState } from 'react';
import { toast } from 'sonner';
@@ -13,8 +13,11 @@ import {
useSelectedCommentDocs,
} from '@/comments/comment-chips';
import { type BatchPreparedItem, dispatchComments, subscribeCommentPosted } from '@/comments/store';
+import { AttachFilesButton } from '@/components/acp/AttachFilesButton';
+import { PendingImageStrip } from '@/components/acp/PendingImageStrip';
import { RegisteredAgentIcon } from '@/components/acp/RegisteredAgentIcon';
import { ComposerContextChips } from '@/components/ComposerContextChips';
+import { isExternalFileDrag } from '@/components/file-tree-adapter';
import { AgentSplitButton } from '@/components/handoff/AgentSplitButton';
import { AskAgentNameLabel, OpenDesktopAppLabel } from '@/components/handoff/agent-launcher-labels';
import { TargetIcon } from '@/components/handoff/OpenInAgentMenuItem';
@@ -31,6 +34,7 @@ import { Button } from '@/components/ui/button';
import { Spinner } from '@/components/ui/spinner';
import { getEditorForDoc } from '@/editor/active-editor';
import {
+ type ComposerAttachmentDropPolicy,
ComposerMentionInput,
type ComposerMentionInputHandle,
} from '@/editor/ComposerMentionInput';
@@ -42,11 +46,13 @@ import {
selectionSnapshotToCompose,
} from '@/editor/selection-context';
import type { EditorSurface } from '@/editor/selection-stats';
+import { useComposerAttachments } from '@/editor/use-composer-attachments';
import { useConflictComposerPrefill } from '@/hooks/use-conflict-composer-prefill';
import { useReducedMotion } from '@/hooks/use-reduced-motion';
import { useSelectionContext } from '@/hooks/use-selection-context';
import { isDesktopTargetEnabled, isInAppAgentEnabled } from '@/lib/acp/agent-visibility';
import { useEnabledOverrides } from '@/lib/acp/enabled-agents';
+import { collectAllFiles, collectImageFiles } from '@/lib/acp/image-attachment';
import {
enabledDesktopTargets,
enabledTerminalClis,
@@ -62,6 +68,7 @@ import {
} from '@/lib/acp/registered-agents';
import { VISIBLE_TARGETS } from '@/lib/handoff/targets';
import { matchesKeyboardShortcut } from '@/lib/keyboard-shortcuts';
+import { isNoteWindow } from '@/lib/note-window-mode';
import { recordOnboardingAskedAi } from '@/lib/onboarding-signals';
import { isOverlayLayerOpen } from '@/lib/overlay-layers';
import {
@@ -150,6 +157,7 @@ export function BottomComposer({
const [selectedId, setSelectedId] = useState<string | null>(null);
const [isEmpty, setIsEmpty] = useState(true);
const [pending, setPending] = useState(false);
+ const [dragActive, setDragActive] = useState(false);
const inputRef = useRef<ComposerMentionInputHandle>(null);
const { isSeedIntact, onContentChanged: onPrefillContentChanged } = useConflictComposerPrefill(
activeDocOrNull,
@@ -159,6 +167,22 @@ export function BottomComposer({
const [initialDraftDoc] = useState(() => getComposerDraft().doc ?? undefined);
+ const {
+ pendingAttachments,
+ pendingUploads,
+ ingestFiles,
+ removeAt: removePendingAttachment,
+ clear: clearPendingAttachments,
+ } = useComposerAttachments({
+ absPathOf:
+ typeof window !== 'undefined' && window.okDesktop
+ ? window.okDesktop.getPathForFile
+ : undefined,
+ workspaceContentDir: workspace?.contentDir,
+ pathSeparator: workspace?.pathSeparator,
+ onError: (message) => toast.error(message),
+ });
+
useEffect(() => {
if (folderMode || docName == null) return;
const root = document.documentElement;
@@ -334,9 +358,47 @@ export function BottomComposer({
const canSend =
!pending &&
- (!isEmpty || pinnedSelection !== null || hasQueuedComments) &&
+ pendingUploads.length === 0 &&
+ (!isEmpty || pinnedSelection !== null || hasQueuedComments || pendingAttachments.length > 0) &&
(isTerminalSelected || resolvedTarget !== null || isThreadSelected);
+ const inNoteWindow = isNoteWindow();
+ const dropRefusalReason = ((): string | null => {
+ if (inNoteWindow) {
+ return t`Attachments aren't available in note windows yet — use the main window to attach files.`;
+ }
+ switch (selection.kind) {
+ case 'thread':
+ return null;
+ case 'cli':
+ return t`${TERMINAL_CLIS[selection.cli].displayName} runs in a terminal and doesn't accept attachments — choose an in-app agent instead.`;
+ case 'desktop':
+ return resolvedTarget !== null
+ ? t`${resolvedTarget.displayName} opens via a link and doesn't accept attachments — choose an in-app agent instead.`
+ : t`This composer doesn't accept attachments.`;
+ case 'terminal':
+ return t`This composer doesn't accept attachments.`;
+ case 'none':
+ return t`No agents are set up yet — add an in-app agent in Agent connections to attach files.`;
+ default: {
+ const _exhaustive: never = selection;
+ throw new Error(`Unhandled launcher selection: ${String(_exhaustive)}`);
+ }
+ }
+ })();
+ const attachmentsAccepted = isThreadSelected && !inNoteWindow;
+ const attachmentDrop: ComposerAttachmentDropPolicy = attachmentsAccepted
+ ? {
+ kind: 'accept',
+ onFiles: (files) => {
+ void ingestFiles(files);
+ },
+ }
+ : {
+ kind: 'refuse',
+ ...(dropRefusalReason !== null ? { reason: dropRefusalReason } : {}),
+ };
+
const desktopAgents = VISIBLE_TARGETS.filter((target) =>
isDesktopTargetEnabled(overrides, target.id, states[target.id]?.installed),
);
@@ -397,6 +459,7 @@ export function BottomComposer({
setTouchedFiles([]);
setDismissedFiles(new Set());
setCommentsAttached(true);
+ clearPendingAttachments();
clearComposerDraft();
};
@@ -411,6 +474,12 @@ export function BottomComposer({
toast.error(t`Couldn't send your prompt — please try again.`);
return false;
}
+ if (pendingAttachments.length > 0 && !isThreadSelected) {
+ toast.error(
+ t`This agent doesn't accept attachments — remove them or choose an in-app agent.`,
+ );
+ return false;
+ }
if (isThreadSelected) {
startAgentThreadForInput(
input,
@@ -468,6 +537,7 @@ export function BottomComposer({
workspace,
instruction,
mentions: dispatchMentions,
+ attachments: pendingAttachments,
});
}
@@ -492,6 +562,7 @@ export function BottomComposer({
instruction,
mentions: dispatchMentions,
selection,
+ attachments: pendingAttachments,
});
};
@@ -530,6 +601,7 @@ export function BottomComposer({
...mentions,
]),
],
+ attachments: pendingAttachments,
});
if (input === null) {
toast.error(t`Couldn't send your comments — please try again.`);
@@ -562,7 +634,66 @@ export function BottomComposer({
<div
ref={cardRef}
onMouseDown={(event) => focusComposerInputOnCardPointer(event, inputRef)}
- className="pointer-events-auto group relative flex cursor-text flex-col gap-1.5 rounded-2xl border border-border/60 bg-card px-3 py-2 shadow-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50"
+ onPaste={(event) => {
+ const files = collectImageFiles(event.clipboardData);
+ if (files.length === 0) return;
+ event.preventDefault();
+ if (!attachmentsAccepted) {
+ inputRef.current?.refuseDrop(
+ dropRefusalReason ?? t`This composer doesn't accept attachments.`,
+ );
+ return;
+ }
+ void ingestFiles(files);
+ }}
+ onDragEnter={(event) => {
+ if (isExternalFileDrag(event)) {
+ event.preventDefault();
+ setDragActive(true);
+ }
+ }}
+ onDragOver={(event) => {
+ if (isExternalFileDrag(event)) {
+ event.preventDefault();
+ event.dataTransfer.dropEffect = 'copy';
+ setDragActive(true);
+ }
+ }}
+ onDragLeave={(event) => {
+ const next = event.relatedTarget;
+ if (next instanceof Node && event.currentTarget.contains(next)) return;
+ setDragActive(false);
+ }}
+ onDropCapture={() => setDragActive(false)}
+ onDrop={(event) => {
+ if (!isExternalFileDrag(event)) return;
+ event.preventDefault();
+ const files = collectAllFiles(event.dataTransfer);
+ if (files.length === 0) {
+ inputRef.current?.refuseDrop(
+ t`Folders and empty files can't be attached — drop the files themselves.`,
+ );
+ return;
+ }
+ if (!attachmentsAccepted) {
+ inputRef.current?.refuseDrop(
+ dropRefusalReason ?? t`This composer doesn't accept attachments.`,
+ );
+ return;
+ }
+ void ingestFiles(files);
+ }}
+ data-testid="ask-ai-composer-card"
+ data-drag-active={dragActive ? (attachmentsAccepted ? 'accept' : 'refuse') : undefined}
+ className={cn(
+ 'pointer-events-auto group relative flex cursor-text flex-col gap-1.5 rounded-2xl border border-border/60 bg-card px-3 py-2 shadow-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50',
+ dragActive &&
+ attachmentsAccepted &&
+ 'bg-primary/5 outline-2 outline-dashed outline-offset-2 outline-primary',
+ dragActive &&
+ !attachmentsAccepted &&
+ 'bg-destructive/5 outline-2 outline-dashed outline-offset-2 outline-destructive/60',
+ )}
>
{}
{!folderMode ? (
@@ -653,11 +784,50 @@ export function BottomComposer({
/>
)}
</ComposerContextChips>
+ {pendingAttachments.length > 0 || pendingUploads.length > 0 ? (
+ <PendingImageStrip
+ testIdPrefix="ask-ai"
+ images={pendingAttachments}
+ uploads={pendingUploads}
+ onRemove={removePendingAttachment}
+ />
+ ) : null}
+ {pendingAttachments.length > 0 && dropRefusalReason !== null ? (
+ <p aria-hidden="true" className="px-1 pb-1 text-muted-foreground text-xs">
+ {dropRefusalReason}
+ </p>
+ ) : null}
+ <div
+ role="status"
+ aria-live="polite"
+ className="sr-only"
+ data-testid="composer-attachment-status"
+ >
+ {pendingAttachments.length > 0 && dropRefusalReason !== null ? (
+ dropRefusalReason
+ ) : pendingUploads.length > 0 ? (
+ <Plural
+ value={pendingUploads.length}
+ one="Uploading # attachment"
+ other="Uploading # attachments"
+ />
+ ) : pendingAttachments.length > 0 ? (
+ <Plural
+ value={pendingAttachments.length}
+ one="# attachment is ready to send"
+ other="# attachments are ready to send"
+ />
+ ) : null}
+ </div>
<div className="flex items-end gap-2">
+ {attachmentsAccepted ? (
+ <AttachFilesButton testId="ask-ai-attach-files" onFiles={ingestFiles} />
+ ) : null}
<div className="relative flex-1">
<ComposerMentionInput
ref={inputRef}
ariaLabel={t`Ask AI`}
+ attachmentDrop={attachmentDrop}
onEmptyChange={setIsEmpty}
onContentChange={(doc) => {
setComposerDraftDoc(doc);
diff --git a/packages/app/src/components/EditorPane.dom.test.tsx b/packages/app/src/components/EditorPane.dom.test.tsx
index 61808867a..f13c5e6a5 100644
--- a/packages/app/src/components/EditorPane.dom.test.tsx
+++ b/packages/app/src/components/EditorPane.dom.test.tsx
@@ -7,6 +7,7 @@ import type { ReactNode } from 'react';
import { afterEach, describe, expect, test, vi } from 'vitest';
import * as Y from 'yjs';
import { registerEditor, unregisterEditor } from '@/editor/active-editor';
+import { collectImageParts } from '@/editor/composer-drop.test-helper';
import { publishSelectionContext } from '@/editor/selection-context';
import type { EditorSurface } from '@/editor/selection-stats';
import {
@@ -16,7 +17,10 @@ import {
import { VIEW_IN_SOURCE_EVENT, type ViewInSourceDetail } from '@/editor/view-in-source-event';
import { subscribeToPreferredSessionRequests } from './handoff/preferred-session-events';
import { subscribeToActiveTerminalInput } from './handoff/terminal-input-events';
-import { requestAgentThreadLaunch } from './handoff/thread-launch-events';
+import {
+ type AgentThreadLaunchDetail,
+ requestAgentThreadLaunch,
+} from './handoff/thread-launch-events';
const TEST_DOC = 'docs/notes';
@@ -220,6 +224,7 @@ vi.doMock('./SessionsHost', () => ({
data-launch-stage={launch?.stagePaste ?? 'none'}
data-thread-launch-nonce={threadLaunch ? String(threadLaunch.nonce) : 'none'}
data-thread-launch-agent={threadLaunch?.agentId ?? 'none'}
+ data-thread-launch-image-parts={String(collectImageParts(threadLaunch).length)}
>
{surface === 'agents-panel' ? (
<button type="button" onClick={() => onVisibleChange?.(true)}>
@@ -922,6 +927,7 @@ describe('EditorPane session-panel wiring', () => {
prompt: 'summarize this doc',
docName: TEST_DOC,
titleHint: null,
+ attachments: null,
});
});
@@ -931,6 +937,33 @@ describe('EditorPane session-panel wiring', () => {
expect(agents.getAttribute('data-thread-launch-nonce')).not.toBe('none');
});
+ test('a launch request carrying an image attachment forwards it into the thread-launch intent', async () => {
+ await renderEditorPane();
+
+ await act(async () => {
+ requestAgentThreadLaunch({
+ agentSource: 'registry',
+ agentId: 'acme-agent',
+ prompt: 'describe the screenshot',
+ docName: TEST_DOC,
+ titleHint: null,
+ attachments: [
+ {
+ kind: 'image',
+ mimeType: 'image/png',
+ data: 'iVBORw==',
+ name: 'drop-me.png',
+ sizeBytes: 4,
+ },
+ ],
+ } as AgentThreadLaunchDetail);
+ });
+
+ const agents = screen.getByTestId('agents-panel');
+ expect(agents.getAttribute('data-thread-launch-agent')).toBe('acme-agent');
+ expect(agents.getAttribute('data-thread-launch-image-parts')).toBe('1');
+ });
+
test('desktop: a rejecting getDockState still settles the gate so the view-menu push converges', async () => {
const desk = makeOkDesktopStub(async () => {
throw new Error('ipc boom');
diff --git a/packages/app/src/components/EditorPane.tsx b/packages/app/src/components/EditorPane.tsx
index e77777bbc..098c080fd 100644
--- a/packages/app/src/components/EditorPane.tsx
+++ b/packages/app/src/components/EditorPane.tsx
@@ -4,6 +4,7 @@ import {
type TerminalCli,
type TerminalPlacement,
} from '@inkeep/open-knowledge-core';
+import type { AttachmentPart } from '@inkeep/open-knowledge-core/acp/thread-protocol';
import {
lazy,
Suspense,
@@ -81,6 +82,7 @@ export interface ThreadLaunchIntent {
readonly prompt: string | null;
readonly docName: string | null;
readonly titleHint: string | null;
+ readonly attachments: readonly AttachmentPart[] | null;
readonly nonce: number;
}
@@ -297,6 +299,7 @@ export function EditorPane({ onOpenSearch }: EditorPaneProps = {}) {
prompt: detail.prompt,
docName: detail.docName,
titleHint: detail.titleHint,
+ attachments: detail.attachments ?? null,
nonce: threadLaunchNonceRef.current,
});
});
diff --git a/packages/app/src/components/NoteWindowMainActionReceiver.dom.test.ts b/packages/app/src/components/NoteWindowMainActionReceiver.dom.test.ts
index 2a84a7c9b..a9f9c6dda 100644
--- a/packages/app/src/components/NoteWindowMainActionReceiver.dom.test.ts
+++ b/packages/app/src/components/NoteWindowMainActionReceiver.dom.test.ts
@@ -51,6 +51,7 @@ describe('dispatchNoteWindowMainAction', () => {
prompt: 'Review',
docName: 'notes/alpha',
titleHint: 'Review',
+ attachments: null,
},
{ prompt: 'Review', cli: 'codex', stage: false },
]);
diff --git a/packages/app/src/components/NoteWindowMainActionReceiver.tsx b/packages/app/src/components/NoteWindowMainActionReceiver.tsx
index c600b65cd..06c9a8297 100644
--- a/packages/app/src/components/NoteWindowMainActionReceiver.tsx
+++ b/packages/app/src/components/NoteWindowMainActionReceiver.tsx
@@ -32,6 +32,7 @@ export function dispatchNoteWindowMainAction(
prompt: action.prompt,
docName: action.docName,
titleHint: action.titleHint,
+ attachments: null,
},
target,
);
diff --git a/packages/app/src/components/SessionsHost.agents.dom.test.tsx b/packages/app/src/components/SessionsHost.agents.dom.test.tsx
index 09bcef305..f012ae989 100644
--- a/packages/app/src/components/SessionsHost.agents.dom.test.tsx
+++ b/packages/app/src/components/SessionsHost.agents.dom.test.tsx
@@ -4,6 +4,7 @@ import userEvent from '@testing-library/user-event';
import { useEffect, useState, useSyncExternalStore } from 'react';
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
import { TooltipProvider } from '@/components/ui/tooltip';
+import { collectImageParts } from '@/editor/composer-drop.test-helper';
import {
inAppEnabledKey,
reloadEnabledAgentsFromStorage,
@@ -252,6 +253,37 @@ describe('SessionsHost — agents panel (web / no bridge)', () => {
_resetReusableSession();
});
+ test('a thread-launch intent carrying an image attachment forwards it to launchAgentThread', async () => {
+ render(
+ <Harness
+ threadLaunch={
+ {
+ agentSource: 'registry',
+ agentId: 'acme-agent',
+ prompt: 'describe the screenshot',
+ docName: null,
+ titleHint: null,
+ nonce: 7,
+ attachments: [
+ {
+ kind: 'image',
+ mimeType: 'image/png',
+ data: 'iVBORw==',
+ name: 'drop-me.png',
+ sizeBytes: 4,
+ },
+ ],
+ } as ThreadLaunchIntent
+ }
+ />,
+ );
+
+ await waitFor(() => expect(launchAgentThread).toHaveBeenCalledTimes(1));
+ expect(collectImageParts(launchAgentThread.mock.calls[0])).toContainEqual(
+ expect.objectContaining({ kind: 'image', mimeType: 'image/png', data: 'iVBORw==' }),
+ );
+ });
+
test('a server thread becomes a tab rendering its ThreadView', async () => {
render(<Harness />);
setOpenThreads([makeThread({ threadId: 't1', title: 'Refactor' })]);
@@ -658,6 +690,7 @@ describe('SessionsHost — agents panel (web / no bridge)', () => {
prompt: null,
docName: null,
titleHint: null,
+ attachments: null,
nonce,
});
@@ -672,6 +705,8 @@ describe('SessionsHost — agents panel (web / no bridge)', () => {
null,
null,
null,
+ null,
+ undefined,
]);
expect(window.location.hash).toBe('');
expect(registerAgent).not.toHaveBeenCalled();
@@ -763,6 +798,7 @@ describe('SessionsHost — agents panel (web / no bridge)', () => {
prompt: 'do the thing',
docName: 'notes',
titleHint: 'Notes',
+ attachments: null,
nonce: 1,
}}
/>,
@@ -774,6 +810,8 @@ describe('SessionsHost — agents panel (web / no bridge)', () => {
'do the thing',
'notes',
'Notes',
+ null,
+ undefined,
]);
});
});
@@ -791,6 +829,7 @@ describe('SessionsHost — agents panel (web / no bridge)', () => {
prompt: 'the words I just typed',
docName: null,
titleHint: null,
+ attachments: null,
nonce: 1,
}}
/>,
@@ -811,6 +850,7 @@ describe('SessionsHost — agents panel (web / no bridge)', () => {
prompt: 'the words I just typed',
docName: null,
titleHint: null,
+ attachments: null,
nonce: 1,
}}
/>,
@@ -918,6 +958,7 @@ describe('SessionsHost — agents panel (web / no bridge)', () => {
prompt: 'do it',
docName: null,
titleHint: null,
+ attachments: null,
nonce: 1,
});
control.current?.setVisible(true);
@@ -940,6 +981,7 @@ describe('SessionsHost — agents panel (web / no bridge)', () => {
prompt: 'do it',
docName: null,
titleHint: null,
+ attachments: null,
nonce: 1,
});
control.current?.setVisible(true);
@@ -966,6 +1008,7 @@ describe('SessionsHost — agents panel (web / no bridge)', () => {
prompt: null,
docName: null,
titleHint: null,
+ attachments: null,
nonce: 1,
});
control.current?.setVisible(true);
diff --git a/packages/app/src/components/SessionsHost.tsx b/packages/app/src/components/SessionsHost.tsx
index 0661ae994..0f49a3593 100644
--- a/packages/app/src/components/SessionsHost.tsx
+++ b/packages/app/src/components/SessionsHost.tsx
@@ -966,6 +966,8 @@ export function SessionsHost({
threadLaunch.prompt,
threadLaunch.docName,
threadLaunch.titleHint,
+ null,
+ threadLaunch.attachments ?? undefined,
).then((outcome) => {
if (outcome === 'deduped') {
toast.error(t`Already starting a chat with this agent — try again in a moment.`);
diff --git a/packages/app/src/components/acp/AttachFilesButton.tsx b/packages/app/src/components/acp/AttachFilesButton.tsx
new file mode 100644
index 000000000..eb1d633ec
--- /dev/null
+++ b/packages/app/src/components/acp/AttachFilesButton.tsx
@@ -0,0 +1,48 @@
+import { useLingui } from '@lingui/react/macro';
+import { Plus } from 'lucide-react';
+import type { ReactNode } from 'react';
+import { Button } from '@/components/ui/button';
+import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
+
+export function AttachFilesButton({
+ onFiles,
+ referencesOnly = false,
+ testId,
+}: {
+ onFiles: (files: readonly File[]) => Promise<void> | void;
+ referencesOnly?: boolean;
+ testId: string;
+}): ReactNode {
+ const { t } = useLingui();
+ const openFilePicker = () => {
+ const input = document.createElement('input');
+ input.type = 'file';
+ input.multiple = true;
+ input.addEventListener('change', () => {
+ const files = Array.from(input.files ?? []);
+ if (files.length > 0) void onFiles(files);
+ });
+ input.click();
+ };
+ return (
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button
+ type="button"
+ size="icon-sm"
+ variant="ghost"
+ className="rounded-lg"
+ onClick={openFilePicker}
+ aria-label={t`Attach a file`}
+ data-testid={testId}
+ >
+ <Plus className="size-4" aria-hidden="true" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent side="top">
+ {t`Attach a file`}
+ {referencesOnly ? t` · references only (no embedded contents)` : null}
+ </TooltipContent>
+ </Tooltip>
+ );
+}
diff --git a/packages/app/src/components/acp/PendingImageStrip.tsx b/packages/app/src/components/acp/PendingImageStrip.tsx
new file mode 100644
index 000000000..fc7ab50e9
--- /dev/null
+++ b/packages/app/src/components/acp/PendingImageStrip.tsx
@@ -0,0 +1,115 @@
+import type { AttachmentPart } from '@inkeep/open-knowledge-core/acp/thread-protocol';
+import { useLingui } from '@lingui/react/macro';
+import { X } from 'lucide-react';
+import { createContext, type ReactNode, use } from 'react';
+import { Button } from '@/components/ui/button';
+import { Spinner } from '@/components/ui/spinner';
+
+export type ImagePreview = { readonly src: string; readonly name: string };
+
+export const ImagePreviewContext = createContext<((preview: ImagePreview) => void) | null>(null);
+
+function extensionLabel(name: string, mimeType: string): string {
+ const dot = name.lastIndexOf('.');
+ if (dot > 0 && dot < name.length - 1) return name.slice(dot + 1).toLowerCase();
+ const slash = mimeType.lastIndexOf('/');
+ if (slash > 0 && slash < mimeType.length - 1) return mimeType.slice(slash + 1).toLowerCase();
+ return 'file';
+}
+
+export function PendingImageStrip({
+ testIdPrefix,
+ images,
+ uploads,
+ onRemove,
+}: {
+ testIdPrefix: string;
+ images: readonly AttachmentPart[];
+ uploads: readonly { readonly id: string; readonly name: string; readonly mimeType: string }[];
+ onRemove: (index: number) => void;
+}): ReactNode {
+ const { t } = useLingui();
+ const openPreview = use(ImagePreviewContext);
+ return (
+ <div
+ className="flex flex-wrap gap-2 px-3 pt-2 pb-1"
+ aria-busy={uploads.length > 0}
+ data-testid={`${testIdPrefix}-pending-images`}
+ >
+ {images.map((image, index) => {
+ const key =
+ image.kind === 'image' || image.kind === 'blob'
+ ? `${index}:${image.name}:${image.data.slice(0, 24)}`
+ : `${index}:${image.name}:${image.path}`;
+ const src = image.kind === 'image' ? `data:${image.mimeType};base64,${image.data}` : null;
+ const label =
+ image.kind === 'file' || image.kind === 'folder'
+ ? extensionLabel(image.name, '')
+ : extensionLabel(image.name, image.mimeType);
+ return (
+ <div key={key} className="group relative inline-flex size-14" title={image.name}>
+ {src !== null && openPreview !== null ? (
+ <Button
+ type="button"
+ variant="ghost"
+ onClick={() => openPreview({ src, name: image.name })}
+ className="size-full items-center justify-center overflow-hidden rounded-md border border-input bg-muted p-0 hover:bg-muted"
+ aria-label={image.name}
+ data-testid={`${testIdPrefix}-pending-image-preview`}
+ >
+ <img
+ src={src}
+ alt={image.name}
+ className="h-full w-full object-cover"
+ draggable={false}
+ />
+ </Button>
+ ) : (
+ <div className="inline-flex size-full items-center justify-center overflow-hidden rounded-md border border-input bg-muted">
+ {src !== null ? (
+ <img
+ src={src}
+ alt={image.name}
+ className="h-full w-full object-cover"
+ draggable={false}
+ />
+ ) : (
+ <span className="text-muted-foreground text-xs uppercase">{label}</span>
+ )}
+ </div>
+ )}
+ <Button
+ type="button"
+ size="icon"
+ variant="secondary"
+ onClick={(event) => {
+ event.stopPropagation();
+ onRemove(index);
+ }}
+ aria-label={t`Remove ${image.name}`}
+ className="absolute top-0.5 end-0.5 size-5 rounded-full border border-border bg-background/80 p-0 shadow-sm opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100 focus-visible:opacity-100"
+ data-testid={`${testIdPrefix}-pending-image-remove`}
+ >
+ <X className="size-3" aria-hidden="true" />
+ </Button>
+ </div>
+ );
+ })}
+ {uploads.map((upload) => {
+ const fileName = upload.name;
+ return (
+ <div
+ key={upload.id}
+ role="img"
+ aria-label={t`Uploading ${fileName}`}
+ className="relative inline-flex size-14 items-center justify-center overflow-hidden rounded-md border border-input bg-muted"
+ title={upload.name}
+ data-testid={`${testIdPrefix}-pending-upload`}
+ >
+ <Spinner className="size-4 text-muted-foreground" aria-hidden="true" />
+ </div>
+ );
+ })}
+ </div>
+ );
+}
diff --git a/packages/app/src/components/acp/ThreadView.dom.test.tsx b/packages/app/src/components/acp/ThreadView.dom.test.tsx
index 759b9c4cb..6f71d4a03 100644
--- a/packages/app/src/components/acp/ThreadView.dom.test.tsx
+++ b/packages/app/src/components/acp/ThreadView.dom.test.tsx
@@ -2,6 +2,7 @@ import type { ThreadInfo } from '@inkeep/open-knowledge-core/acp/thread-protocol
import {
act,
cleanup,
+ createEvent,
fireEvent,
render as rtlRender,
screen,
@@ -11,6 +12,7 @@ import {
import userEvent from '@testing-library/user-event';
import { afterEach, describe, expect, test, vi } from 'vitest';
import { TooltipProvider } from '@/components/ui/tooltip';
+import { MAX_TOTAL_ATTACHMENT_BYTES } from '@/lib/acp/image-attachment';
import type {
RenderedItem,
RenderedTerminal,
@@ -2905,3 +2907,155 @@ describe('ThreadView plan approval wiring (PRD-8022)', () => {
expect(screen.queryByTestId('agent-thread-plan-approval')).toBeNull();
});
});
+
+describe('ThreadView attachment budget and clear fence (PRD-8453)', () => {
+ const makeDropTransfer = (files: readonly File[]) => ({
+ types: ['Files'],
+ files,
+ items: files.map((file) => ({ kind: 'file', getAsFile: () => file })),
+ dropEffect: 'copy',
+ });
+
+ const fireDrop = (files: readonly File[]) => {
+ const root = document.querySelector('[data-agent-thread-root]');
+ if (root === null) throw new Error('agent-thread-root not mounted');
+ act(() => {
+ fireEvent.drop(root, { dataTransfer: makeDropTransfer(files) });
+ });
+ };
+
+ const overBudgetPng = (name: string) =>
+ new File([new Uint8Array(Math.ceil(MAX_TOTAL_ATTACHMENT_BYTES * 0.6))], name, {
+ type: 'image/png',
+ });
+
+ const smallPng = (name: string) =>
+ new File([new Uint8Array([0x89, 0x50, 0x4e, 0x47])], name, { type: 'image/png' });
+
+ test('interleaved drops cannot stack attachments past the aggregate byte budget', async () => {
+ model = makeModel({ items: [], turnActive: false });
+ render(
+ <ThreadView info={makeInfo({ status: 'ready', promptCapabilities: { image: true } })} />,
+ );
+
+ fireDrop([overBudgetPng('one.png')]);
+ fireDrop([overBudgetPng('two.png')]);
+
+ const notice = await screen.findByTestId('agent-thread-drop-notice');
+ await waitFor(() => expect(notice.textContent).toContain("can't total more than"));
+ expect(screen.queryAllByTestId('agent-thread-pending-image-preview')).toHaveLength(1);
+ });
+
+ test('a mixed-cause drop reports both the skip and the budget refusal in one notice', async () => {
+ model = makeModel({ items: [], turnActive: false });
+ render(
+ <ThreadView info={makeInfo({ status: 'ready', promptCapabilities: { image: true } })} />,
+ );
+
+ fireDrop([
+ overBudgetPng('one.png'),
+ overBudgetPng('two.png'),
+ new File(['content'], 'notes.txt', { type: 'text/plain' }),
+ ]);
+
+ const notice = await screen.findByTestId('agent-thread-drop-notice');
+ await waitFor(() => expect(notice.textContent).toContain("can't total more than"));
+ expect(notice.textContent).toContain("can't attach files by path");
+ });
+
+ test('Enter during an in-flight read is held — the attachment survives to ride the send once it settles', async () => {
+ model = makeModel({ items: [], turnActive: false });
+ render(
+ <ThreadView info={makeInfo({ status: 'ready', promptCapabilities: { image: true } })} />,
+ );
+ const composer = screen.getByTestId('agent-thread-composer');
+
+ fireEvent.change(composer, { target: { value: 'first prompt' } });
+ fireDrop([smallPng('late.png')]);
+ expect(screen.queryAllByTestId('agent-thread-pending-upload')).toHaveLength(1);
+ expect(screen.getByTestId('agent-thread-drop-notice').textContent).toContain('Uploading');
+ fireEvent.keyDown(composer, { key: 'Enter' });
+
+ expect(prompt).not.toHaveBeenCalled();
+ expect(screen.queryAllByTestId('agent-thread-pending-upload')).toHaveLength(1);
+
+ await waitFor(() =>
+ expect(screen.queryAllByTestId('agent-thread-pending-image-preview')).toHaveLength(1),
+ );
+ expect(screen.getByTestId('agent-thread-drop-notice').textContent).not.toContain('Uploading');
+
+ fireEvent.keyDown(composer, { key: 'Enter' });
+ expect(prompt).toHaveBeenCalledTimes(1);
+ expect(prompt).toHaveBeenCalledWith(
+ 'thread-1',
+ 'first prompt',
+ expect.arrayContaining([expect.objectContaining({ kind: 'image', name: 'late.png' })]),
+ );
+ expect(screen.queryByTestId('agent-thread-pending-images')).toBeNull();
+ });
+
+ test('Steer is held while an attachment read is in flight — nothing ships without the image', async () => {
+ model = makeModel({ items: [], turnActive: true });
+ render(
+ <ThreadView info={makeInfo({ status: 'running', promptCapabilities: { image: true } })} />,
+ );
+ const composer = screen.getByTestId('agent-thread-composer');
+
+ fireEvent.change(composer, { target: { value: 'actually, do this instead' } });
+ fireDrop([smallPng('late.png')]);
+ expect(screen.queryAllByTestId('agent-thread-pending-upload')).toHaveLength(1);
+
+ const steerButton = screen.getByTestId('agent-thread-steer');
+ expect(steerButton).toHaveProperty('disabled', true);
+ fireEvent.click(steerButton);
+
+ expect(steer).not.toHaveBeenCalled();
+ expect(screen.queryAllByTestId('agent-thread-pending-upload')).toHaveLength(1);
+ });
+
+ test('the send button waits for an in-flight read to settle', async () => {
+ model = makeModel({ items: [], turnActive: false });
+ render(
+ <ThreadView info={makeInfo({ status: 'ready', promptCapabilities: { image: true } })} />,
+ );
+ const composer = screen.getByTestId('agent-thread-composer');
+ fireEvent.change(composer, { target: { value: 'describe the screenshot' } });
+
+ fireDrop([smallPng('shot.png')]);
+
+ expect(screen.getByTestId('agent-thread-send')).toHaveProperty('disabled', true);
+ await waitFor(() =>
+ expect(screen.queryAllByTestId('agent-thread-pending-image-preview')).toHaveLength(1),
+ );
+ expect(screen.getByTestId('agent-thread-send')).toHaveProperty('disabled', false);
+ });
+
+ test('the drop highlight survives a dragleave that bubbles from a child', async () => {
+ model = makeModel({ items: [], turnActive: false });
+ render(
+ <ThreadView info={makeInfo({ status: 'ready', promptCapabilities: { image: true } })} />,
+ );
+ const root = document.querySelector('[data-agent-thread-root]');
+ if (root === null) throw new Error('agent-thread-root not mounted');
+ const child = screen.getByTestId('agent-thread-composer');
+ const dataTransfer = makeDropTransfer([smallPng('shot.png')]);
+
+ act(() => {
+ fireEvent.dragEnter(root, { dataTransfer });
+ });
+ expect(screen.queryByTestId('agent-thread-drop-overlay')).not.toBeNull();
+
+ const leaveToChild = createEvent.dragLeave(root, { dataTransfer });
+ Object.defineProperty(leaveToChild, 'relatedTarget', { value: child });
+ act(() => {
+ fireEvent.dragEnter(child, { dataTransfer });
+ fireEvent(root, leaveToChild);
+ });
+ expect(screen.queryByTestId('agent-thread-drop-overlay')).not.toBeNull();
+
+ act(() => {
+ fireEvent.dragLeave(root, { dataTransfer });
+ });
+ expect(screen.queryByTestId('agent-thread-drop-overlay')).toBeNull();
+ });
+});
diff --git a/packages/app/src/components/acp/ThreadView.tsx b/packages/app/src/components/acp/ThreadView.tsx
index fec3d7d37..3a2c545cb 100644
--- a/packages/app/src/components/acp/ThreadView.tsx
+++ b/packages/app/src/components/acp/ThreadView.tsx
@@ -9,7 +9,7 @@ import type {
ThreadInfo,
} from '@inkeep/open-knowledge-core/acp/thread-protocol';
import { plural } from '@lingui/core/macro';
-import { useLingui } from '@lingui/react/macro';
+import { Plural, useLingui } from '@lingui/react/macro';
import {
ArrowUp,
Check,
@@ -42,7 +42,6 @@ import {
Zap,
} from 'lucide-react';
import {
- createContext,
Fragment,
type ReactNode,
type RefObject,
@@ -65,6 +64,7 @@ import {
import { subscribeSendInThread } from '@/comments/open-chat-send';
import { dispatchComments, subscribeCommentPosted } from '@/comments/store';
import { ComposerContextChips } from '@/components/ComposerContextChips';
+import { isExternalFileDrag } from '@/components/file-tree-adapter';
import { focusComposerInputOnCardPointer } from '@/components/focus-composer-on-card-pointer';
import { useOptionalPageList } from '@/components/PageListContext';
import { Badge } from '@/components/ui/badge';
@@ -103,6 +103,7 @@ import {
type ComposerMentionInputHandle,
} from '@/editor/ComposerMentionInput';
import { useDocumentContext } from '@/editor/DocumentContext';
+import { agentDisplayName } from '@/lib/acp/agent-display';
import {
agentSettingsKey,
rememberAgentConfigOption,
@@ -110,10 +111,14 @@ import {
} from '@/lib/acp/agent-settings-store';
import { configValueHint, resolveDefaultOptionLabel } from '@/lib/acp/config-value-hints';
import {
+ attachmentBudgetKb,
collectAllFiles,
collectImageFiles,
describeImageError,
+ embeddedAttachmentBytes,
fileToAttachment,
+ MAX_TOTAL_ATTACHMENT_BYTES,
+ totalEmbeddedAttachmentBytes,
} from '@/lib/acp/image-attachment';
import { computeDiffRows } from '@/lib/acp/inline-diff';
import { launchAgentThread } from '@/lib/acp/launch-agent-thread';
@@ -142,6 +147,7 @@ import { useWorkspace } from '@/lib/use-workspace';
import { cn } from '@/lib/utils';
import { AgentMarkdown } from './AgentMarkdown';
import { AgentNoticeAnnouncer } from './AgentNoticeAnnouncer';
+import { AttachFilesButton } from './AttachFilesButton';
import { buildDocPathResolver, setDocPathResolver } from './doc-path-links';
import { DocPathResolverReadyContext } from './doc-path-links-context';
import {
@@ -152,6 +158,7 @@ import {
loadFollowFilePref,
saveFollowFilePref,
} from './follow-file';
+import { type ImagePreview, ImagePreviewContext, PendingImageStrip } from './PendingImageStrip';
import { PlanChecklist } from './PlanChecklist';
import { appendPresenceWrite, latestAgentWrite, type PresenceWrite } from './presence-follow';
import { RegisteredAgentIcon } from './RegisteredAgentIcon';
@@ -187,14 +194,6 @@ function errorText(err: unknown): string {
return err instanceof Error ? err.message : String(err);
}
-function agentDisplayName(name: string): string {
- return name.replace(/\s+Agent$/i, '');
-}
-
-type ImagePreview = { readonly src: string; readonly name: string };
-
-const ImagePreviewContext = createContext<((preview: ImagePreview) => void) | null>(null);
-
const RETRYABLE_FAILURE_REASONS: ReadonlySet<ThreadFailureDetail['reason']> = new Set([
'connect',
'session-setup',
@@ -257,12 +256,26 @@ export function ThreadView({
const [dragActive, setDragActive] = useState(false);
const [dropNotice, setDropNotice] = useState<{ text: string; id: number } | null>(null);
const dropNoticeIdRef = useRef(0);
+ const attachmentsRef = useRef<readonly AttachmentPart[]>([]);
+ const attachmentsGenerationRef = useRef(0);
+ const commitPendingAttachments = (next: readonly AttachmentPart[], generation: number): void => {
+ if (generation !== attachmentsGenerationRef.current) return;
+ attachmentsRef.current = next;
+ setPendingAttachments(next);
+ };
+ const clearPendingAttachments = (): void => {
+ attachmentsGenerationRef.current += 1;
+ attachmentsRef.current = [];
+ setPendingAttachments([]);
+ setPendingUploads([]);
+ };
useEffect(() => {
if (dropNotice === null) return;
const timer = setTimeout(() => setDropNotice(null), 4000);
return () => clearTimeout(timer);
}, [dropNotice]);
const imagesAccepted = info.promptCapabilities?.image === true;
+ const uploadsPending = pendingUploads.length > 0;
const composerText = (): string => composerRef.current?.getContent().instruction.trim() ?? '';
const composerAttachments = (): readonly AttachmentPart[] => {
const chips = composerRef.current?.getContent().attachments ?? [];
@@ -295,9 +308,14 @@ export function ThreadView({
name: file.name || 'attachment',
mimeType: file.type || '',
}));
+ const generation = attachmentsGenerationRef.current;
+ const report = (message: string): void => {
+ if (generation === attachmentsGenerationRef.current) toast.error(message);
+ };
setPendingUploads((previous) => [...previous, ...placeholders]);
let outsideWorkspaceCount = 0;
let unknownPathCount = 0;
+ let tooLargeTotalCount = 0;
for (let i = 0; i < accepted.length; i += 1) {
const file = accepted[i];
const placeholderId = placeholders[i]?.id;
@@ -310,21 +328,30 @@ export function ThreadView({
});
setPendingUploads((previous) => previous.filter((p) => p.id !== placeholderId));
if (outcome.ok) {
- setPendingAttachments((previous) => [...previous, outcome.part]);
+ const current = attachmentsRef.current;
+ if (
+ totalEmbeddedAttachmentBytes(current) + embeddedAttachmentBytes(outcome.part) >
+ MAX_TOTAL_ATTACHMENT_BYTES
+ ) {
+ tooLargeTotalCount += 1;
+ } else {
+ commitPendingAttachments([...current, outcome.part], generation);
+ }
} else if (outcome.error.kind === 'outside-workspace') {
outsideWorkspaceCount += 1;
} else if (outcome.error.kind === 'unknown-path') {
unknownPathCount += 1;
} else {
- toast.error(describeImageError(outcome.error));
+ report(describeImageError(outcome.error));
}
} catch (err) {
setPendingUploads((previous) => previous.filter((p) => p.id !== placeholderId));
const fileName = file.name || 'attachment';
console.error('[ingestFiles] failed to read attachment', fileName, err);
- toast.error(t`Couldn't read ${fileName}.`);
+ report(t`Couldn't read ${fileName}.`);
}
}
+ const notices: string[] = [];
const skipTotal = outsideWorkspaceCount + unknownPathCount;
if (skipTotal > 0) {
let noticeText: string;
@@ -344,12 +371,27 @@ export function ThreadView({
other: "Skipped # files that couldn't be attached.",
})}`;
}
+ notices.push(noticeText);
+ }
+ if (tooLargeTotalCount > 0) {
+ const budgetKb = attachmentBudgetKb();
+ notices.push(
+ t`${plural(tooLargeTotalCount, {
+ one: `Skipped # file — attachments can't total more than ${budgetKb} KB per message.`,
+ other: `Skipped # files — attachments can't total more than ${budgetKb} KB per message.`,
+ })}`,
+ );
+ }
+ if (notices.length > 0 && generation === attachmentsGenerationRef.current) {
dropNoticeIdRef.current += 1;
- setDropNotice({ text: noticeText, id: dropNoticeIdRef.current });
+ setDropNotice({ text: notices.join(' '), id: dropNoticeIdRef.current });
}
};
const removePendingAttachment = (index: number): void => {
- setPendingAttachments((previous) => previous.filter((_, i) => i !== index));
+ commitPendingAttachments(
+ attachmentsRef.current.filter((_, i) => i !== index),
+ attachmentsGenerationRef.current,
+ );
};
const [followFile, setFollowFile] = useState(loadFollowFilePref);
const scrollApiRef = useRef<ReturnType<typeof useMessageScroller> | null>(null);
@@ -459,13 +501,13 @@ export function ThreadView({
};
const requestSteer = (): void => {
+ if (uploadsPending) return;
const text = composerText();
const attachments = composerAttachments();
if (text === '' && attachments.length === 0) return;
client.steer(info.threadId, text, attachments.length > 0 ? attachments : undefined);
composerRef.current?.clear();
- setPendingAttachments([]);
- setPendingUploads([]);
+ clearPendingAttachments();
scrollApiRef.current?.scrollToEnd();
};
@@ -567,6 +609,7 @@ export function ThreadView({
};
const submit = (): void => {
+ if (uploadsPending) return;
const text = composerText();
const attachments = composerAttachments();
if (!(canPrompt || canQueue)) return;
@@ -579,8 +622,7 @@ export function ThreadView({
if (text === '' && attachments.length === 0) return;
void sendText(text, text, attachments);
composerRef.current?.clear();
- setPendingAttachments([]);
- setPendingUploads([]);
+ clearPendingAttachments();
};
const submitQueuedComments = async (
@@ -755,25 +797,36 @@ export function ThreadView({
className="relative flex min-h-0 flex-1 flex-col text-gray-800 dark:text-gray-200"
data-agent-thread-root=""
onDragEnter={(event) => {
- if (event.dataTransfer?.types.includes('Files')) {
+ if (isExternalFileDrag(event)) {
event.preventDefault();
setDragActive(true);
}
}}
onDragOver={(event) => {
- if (event.dataTransfer?.types.includes('Files')) {
+ if (isExternalFileDrag(event)) {
event.preventDefault();
event.dataTransfer.dropEffect = 'copy';
+ setDragActive(true);
}
}}
onDragLeave={(event) => {
- if (event.currentTarget === event.target) setDragActive(false);
+ const next = event.relatedTarget;
+ if (next instanceof Node && event.currentTarget.contains(next)) return;
+ setDragActive(false);
}}
onDrop={(event) => {
- const files = collectAllFiles(event.dataTransfer);
- if (files.length === 0) return;
+ if (!isExternalFileDrag(event)) return;
event.preventDefault();
setDragActive(false);
+ const files = collectAllFiles(event.dataTransfer);
+ if (files.length === 0) {
+ dropNoticeIdRef.current += 1;
+ setDropNotice({
+ text: t`Folders and empty files can't be attached — drop the files themselves.`,
+ id: dropNoticeIdRef.current,
+ });
+ return;
+ }
void ingestFiles(files);
}}
>
@@ -911,9 +964,20 @@ export function ThreadView({
)}
<div role="status" aria-live="polite" data-testid="agent-thread-drop-notice">
{dropNotice !== null ? (
- <div className="border-t bg-muted/40 px-3 py-1.5 text-muted-foreground text-xs">
+ <div
+ key={dropNotice.id}
+ className="border-t bg-muted/40 px-3 py-1.5 text-muted-foreground text-xs"
+ >
{dropNotice.text}
</div>
+ ) : uploadsPending ? (
+ <p className="sr-only">
+ <Plural
+ value={pendingUploads.length}
+ one="Uploading # attachment"
+ other="Uploading # attachments"
+ />
+ </p>
) : null}
</div>
{info.steer !== undefined && !archived ? (
@@ -3191,7 +3255,7 @@ function ThreadComposer({
type="button"
size="icon-sm"
className="rounded-lg"
- disabled={!(canPrompt || canQueue) || !hasSendableContent}
+ disabled={!(canPrompt || canQueue) || !hasSendableContent || pendingUploads.length > 0}
onClick={onSubmit}
aria-label={canQueue ? t`Queue message` : t`Send`}
data-testid="agent-thread-send"
@@ -3240,6 +3304,7 @@ function ThreadComposer({
) : null}
{pendingAttachments.length > 0 || pendingUploads.length > 0 ? (
<PendingImageStrip
+ testIdPrefix="agent-thread"
images={pendingAttachments}
uploads={pendingUploads}
onRemove={onRemovePendingAttachment}
@@ -3250,6 +3315,7 @@ function ThreadComposer({
ariaLabel={t`Message ${agentName}`}
onEmptyChange={setIsEmpty}
onSubmit={onSubmit}
+ attachmentDrop={{ kind: 'host' }}
onEscape={() => {
if (turnActive && !cancelPending) onCancel();
}}
@@ -3276,6 +3342,7 @@ function ThreadComposer({
<div className="flex items-center gap-2 px-1.5 pt-1 pb-1.5">
<AgentSettingsPopover info={info} />
<AttachFilesButton
+ testId="agent-thread-attach-files"
onFiles={onIngestAllFiles}
referencesOnly={
info.promptCapabilities !== null &&
@@ -3321,6 +3388,7 @@ function ThreadComposer({
size="icon-sm"
variant="outline"
className="rounded-lg"
+ disabled={pendingUploads.length > 0}
onClick={onSteer}
aria-label={t`Steer now`}
data-testid="agent-thread-steer"
@@ -3523,92 +3591,6 @@ function QueuedMessageRow({
);
}
-function extensionLabel(name: string, mimeType: string): string {
- const dot = name.lastIndexOf('.');
- if (dot > 0 && dot < name.length - 1) return name.slice(dot + 1).toLowerCase();
- const slash = mimeType.lastIndexOf('/');
- if (slash > 0 && slash < mimeType.length - 1) return mimeType.slice(slash + 1).toLowerCase();
- return 'file';
-}
-
-function PendingImageStrip({
- images,
- uploads,
- onRemove,
-}: {
- images: readonly AttachmentPart[];
- uploads: readonly { readonly id: string; readonly name: string; readonly mimeType: string }[];
- onRemove: (index: number) => void;
-}): ReactNode {
- const { t } = useLingui();
- const openPreview = use(ImagePreviewContext);
- return (
- <div className="flex flex-wrap gap-2 px-3 pt-2 pb-1" data-testid="agent-thread-pending-images">
- {images.map((image, index) => {
- const key =
- image.kind === 'image' || image.kind === 'blob'
- ? `${index}:${image.name}:${image.data.slice(0, 24)}`
- : `${index}:${image.name}:${image.path}`;
- const src = image.kind === 'image' ? `data:${image.mimeType};base64,${image.data}` : null;
- const label =
- image.kind === 'file' || image.kind === 'folder'
- ? extensionLabel(image.name, '')
- : extensionLabel(image.name, image.mimeType);
- return (
- <div key={key} className="group relative inline-flex size-14" title={image.name}>
- {src !== null ? (
- <Button
- type="button"
- variant="ghost"
- onClick={() => openPreview?.({ src, name: image.name })}
- disabled={openPreview === null}
- className="size-full items-center justify-center overflow-hidden rounded-md border border-input bg-muted p-0 hover:bg-muted"
- aria-label={image.name}
- data-testid="agent-thread-pending-image-preview"
- >
- <img
- src={src}
- alt={image.name}
- className="h-full w-full object-cover"
- draggable={false}
- />
- </Button>
- ) : (
- <div className="inline-flex size-full items-center justify-center overflow-hidden rounded-md border border-input bg-muted">
- <span className="text-muted-foreground text-xs uppercase">{label}</span>
- </div>
- )}
- <Button
- type="button"
- size="icon"
- variant="secondary"
- onClick={(event) => {
- event.stopPropagation();
- onRemove(index);
- }}
- aria-label={t`Remove ${image.name}`}
- className="absolute top-0.5 right-0.5 size-5 rounded-full border border-border bg-background/80 p-0 shadow-sm opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100 focus-visible:opacity-100"
- data-testid="agent-thread-pending-image-remove"
- >
- <X className="size-3" aria-hidden="true" />
- </Button>
- </div>
- );
- })}
- {uploads.map((upload) => (
- <div
- key={upload.id}
- className="relative inline-flex size-14 items-center justify-center overflow-hidden rounded-md border border-input bg-muted"
- title={upload.name}
- data-testid="agent-thread-pending-upload"
- >
- <Spinner className="size-4 text-muted-foreground" aria-hidden="true" />
- </div>
- ))}
- </div>
- );
-}
-
function ChatPanelDropOverlay({ onDismiss }: { onDismiss: () => void }): ReactNode {
const { t } = useLingui();
return (
@@ -3631,44 +3613,3 @@ function ChatPanelDropOverlay({ onDismiss }: { onDismiss: () => void }): ReactNo
</div>
);
}
-
-function AttachFilesButton({
- onFiles,
- referencesOnly,
-}: {
- onFiles: (files: readonly File[]) => Promise<void>;
- referencesOnly: boolean;
-}): ReactNode {
- const { t } = useLingui();
- const openFilePicker = () => {
- const input = document.createElement('input');
- input.type = 'file';
- input.multiple = true;
- input.addEventListener('change', () => {
- const files = Array.from(input.files ?? []);
- if (files.length > 0) void onFiles(files);
- });
- input.click();
- };
- return (
- <Tooltip>
- <TooltipTrigger asChild>
- <Button
- type="button"
- size="icon-sm"
- variant="ghost"
- className="rounded-lg"
- onClick={openFilePicker}
- aria-label={t`Attach a file`}
- data-testid="agent-thread-attach-files"
- >
- <Plus className="size-4" aria-hidden="true" />
- </Button>
- </TooltipTrigger>
- <TooltipContent side="top">
- {t`Attach a file`}
- {referencesOnly ? t` · references only (no embedded contents)` : null}
- </TooltipContent>
- </Tooltip>
- );
-}
diff --git a/packages/app/src/components/acp/UserMessageActions.tsx b/packages/app/src/components/acp/UserMessageActions.tsx
index 85660ffe0..187e743f4 100644
--- a/packages/app/src/components/acp/UserMessageActions.tsx
+++ b/packages/app/src/components/acp/UserMessageActions.tsx
@@ -147,6 +147,7 @@ export function UserMessageEditor({
ref={fieldRef}
ariaLabel={t`Edit and send again`}
placeholder={t`Edit and send again`}
+ attachmentDrop={{ kind: 'host' }}
onEmptyChange={setDraftEmpty}
onSubmit={sendHere}
onEscape={onCancel}
diff --git a/packages/app/src/components/acp/composer-mention-input.test-helper.tsx b/packages/app/src/components/acp/composer-mention-input.test-helper.tsx
index b7e254c81..25c2e3bac 100644
--- a/packages/app/src/components/acp/composer-mention-input.test-helper.tsx
+++ b/packages/app/src/components/acp/composer-mention-input.test-helper.tsx
@@ -40,6 +40,7 @@ export function MockComposerMentionInput({
};
useImperativeHandle(ref, () => ({
focus: () => localRef.current?.focus(),
+ refuseDrop: () => {},
focusEnd: () => {
const el = localRef.current;
if (!el) return;
diff --git a/packages/app/src/components/composer-shared-draft.dom.test.tsx b/packages/app/src/components/composer-shared-draft.dom.test.tsx
index 299c64958..d0ba7e3f3 100644
--- a/packages/app/src/components/composer-shared-draft.dom.test.tsx
+++ b/packages/app/src/components/composer-shared-draft.dom.test.tsx
@@ -227,6 +227,7 @@ vi.doMock('@/editor/ComposerMentionInput', () => ({
const { BottomComposer } = await import('./BottomComposer');
const { CreatePromptComposer } = await import('./empty-state/CreatePromptComposer');
const { registerAgent } = await import('@/lib/acp/registered-agents');
+const { TooltipProvider } = await import('@/components/ui/tooltip');
beforeEach(() => {
try {
@@ -253,33 +254,43 @@ function heroInput() {
describe('shared draft across composer placements', () => {
test('a draft typed in the bottom (docked) composer appears in the create (hero) composer', async () => {
- const docked = render(<BottomComposer docName="notes" surface="wysiwyg" />);
+ const docked = render(<BottomComposer docName="notes" surface="wysiwyg" />, {
+ wrapper: TooltipProvider,
+ });
fireEvent.change(bottomInput(), { target: { value: 'condense my AGENTS.md' } });
docked.unmount();
- render(<CreatePromptComposer scenario={'new-project' as CreateScenario} />);
+ render(<CreatePromptComposer scenario={'new-project' as CreateScenario} />, {
+ wrapper: TooltipProvider,
+ });
await waitFor(() => expect(heroInput().value).toBe('condense my AGENTS.md'));
});
test('a draft typed in the create (hero) composer appears in the bottom (docked) composer', async () => {
- const hero = render(<CreatePromptComposer scenario={'new-project' as CreateScenario} />);
+ const hero = render(<CreatePromptComposer scenario={'new-project' as CreateScenario} />, {
+ wrapper: TooltipProvider,
+ });
fireEvent.change(heroInput(), { target: { value: 'research flightless birds' } });
hero.unmount();
- render(<BottomComposer docName="notes" surface="wysiwyg" />);
+ render(<BottomComposer docName="notes" surface="wysiwyg" />, { wrapper: TooltipProvider });
await waitFor(() => expect(bottomInput().value).toBe('research flightless birds'));
});
test('an @-mention chip inserted in the bottom composer survives as a chip node in the create composer', async () => {
- const docked = render(<BottomComposer docName="notes" surface="wysiwyg" />);
+ const docked = render(<BottomComposer docName="notes" surface="wysiwyg" />, {
+ wrapper: TooltipProvider,
+ });
fireEvent.change(bottomInput(), { target: { value: 'see ' } });
fireEvent.click(screen.getByTestId('insert-mention-Ask AI'));
docked.unmount();
- render(<CreatePromptComposer scenario={'new-project' as CreateScenario} />);
+ render(<CreatePromptComposer scenario={'new-project' as CreateScenario} />, {
+ wrapper: TooltipProvider,
+ });
await waitFor(() => {
const chip = document.querySelector(
@@ -290,13 +301,15 @@ describe('shared draft across composer placements', () => {
});
test('the chip also survives the reverse direction (hero → bottom)', async () => {
- const hero = render(<CreatePromptComposer scenario={'new-project' as CreateScenario} />);
+ const hero = render(<CreatePromptComposer scenario={'new-project' as CreateScenario} />, {
+ wrapper: TooltipProvider,
+ });
fireEvent.change(heroInput(), { target: { value: 'reference ' } });
fireEvent.click(screen.getByTestId('insert-mention-Describe the project you want to create'));
hero.unmount();
- render(<BottomComposer docName="notes" surface="wysiwyg" />);
+ render(<BottomComposer docName="notes" surface="wysiwyg" />, { wrapper: TooltipProvider });
await waitFor(() => {
const chip = document.querySelector(
'.composer-mention[data-composer-mention="ideas/foo.md"]',
@@ -306,26 +319,32 @@ describe('shared draft across composer placements', () => {
});
test('the draft survives a doc → empty → doc round trip (remount restores it)', async () => {
- const first = render(<BottomComposer docName="notes" surface="wysiwyg" />);
+ const first = render(<BottomComposer docName="notes" surface="wysiwyg" />, {
+ wrapper: TooltipProvider,
+ });
fireEvent.change(bottomInput(), { target: { value: 'summarize my week' } });
first.unmount();
- const empty = render(<CreatePromptComposer scenario={'new-project' as CreateScenario} />);
+ const empty = render(<CreatePromptComposer scenario={'new-project' as CreateScenario} />, {
+ wrapper: TooltipProvider,
+ });
await waitFor(() => expect(heroInput().value).toBe('summarize my week'));
empty.unmount();
- render(<BottomComposer docName="other" surface="wysiwyg" />);
+ render(<BottomComposer docName="other" surface="wysiwyg" />, { wrapper: TooltipProvider });
await waitFor(() => expect(bottomInput().value).toBe('summarize my week'));
});
test('the draft persists across a reload (store re-hydrates the doc from storage)', async () => {
- const docked = render(<BottomComposer docName="notes" surface="wysiwyg" />);
+ const docked = render(<BottomComposer docName="notes" surface="wysiwyg" />, {
+ wrapper: TooltipProvider,
+ });
fireEvent.change(bottomInput(), { target: { value: 'draft a spec' } });
docked.unmount();
__resetComposerDraftForTests();
- render(<BottomComposer docName="notes" surface="wysiwyg" />);
+ render(<BottomComposer docName="notes" surface="wysiwyg" />, { wrapper: TooltipProvider });
await waitFor(() => expect(bottomInput().value).toBe('draft a spec'));
});
});
diff --git a/packages/app/src/components/empty-state/CreatePromptComposer.dom.test.tsx b/packages/app/src/components/empty-state/CreatePromptComposer.dom.test.tsx
index efca56702..52a33cf51 100644
--- a/packages/app/src/components/empty-state/CreatePromptComposer.dom.test.tsx
+++ b/packages/app/src/components/empty-state/CreatePromptComposer.dom.test.tsx
@@ -148,6 +148,7 @@ const launchCalls: HandoffDispatchInput[] = [];
const { CreatePromptComposer } = await import('./CreatePromptComposer');
const { TerminalLaunchProvider } = await import('@/components/handoff/TerminalLaunchContext');
+const { TooltipProvider } = await import('@/components/ui/tooltip');
async function renderComposer(
opts: { withTerminal: boolean; scenario?: CreateScenario } = { withTerminal: true },
@@ -156,9 +157,11 @@ async function renderComposer(
? { launchInTerminal: (i: HandoffDispatchInput) => launchCalls.push(i), installedClis: {} }
: null;
render(
- <TerminalLaunchProvider value={value}>
- <CreatePromptComposer scenario={opts.scenario ?? 'new-project'} />
- </TerminalLaunchProvider>,
+ <TooltipProvider>
+ <TerminalLaunchProvider value={value}>
+ <CreatePromptComposer scenario={opts.scenario ?? 'new-project'} />
+ </TerminalLaunchProvider>
+ </TooltipProvider>,
);
await waitFor(() => {
expect(screen.getByTestId('create-with-agent-menu')).toBeTruthy();
diff --git a/packages/app/src/components/empty-state/CreatePromptComposer.tsx b/packages/app/src/components/empty-state/CreatePromptComposer.tsx
index 745a9b97b..d769a54f2 100644
--- a/packages/app/src/components/empty-state/CreatePromptComposer.tsx
+++ b/packages/app/src/components/empty-state/CreatePromptComposer.tsx
@@ -1,8 +1,15 @@
-import { type HandoffTarget, TERMINAL_CLIS, type TerminalCli } from '@inkeep/open-knowledge-core';
-import { Trans, useLingui } from '@lingui/react/macro';
+import {
+ type HandoffTarget,
+ type TargetData,
+ TERMINAL_CLIS,
+ type TerminalCli,
+} from '@inkeep/open-knowledge-core';
+import { Plural, Trans, useLingui } from '@lingui/react/macro';
import { ArrowUpRight, Check, ChevronDown, SlidersHorizontal, Sparkles } from 'lucide-react';
import { useRef, useState } from 'react';
import { toast } from 'sonner';
+import { AttachFilesButton } from '@/components/acp/AttachFilesButton';
+import { PendingImageStrip } from '@/components/acp/PendingImageStrip';
import { RegisteredAgentIcon } from '@/components/acp/RegisteredAgentIcon';
import {
clearComposerDraft,
@@ -13,6 +20,7 @@ import {
type CreateScenario,
useCreateSuggestions,
} from '@/components/empty-state/use-create-suggestions';
+import { isExternalFileDrag } from '@/components/file-tree-adapter';
import { focusComposerInputOnCardPointer } from '@/components/focus-composer-on-card-pointer';
import {
AskAgentNameLabel,
@@ -42,11 +50,14 @@ import {
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import {
+ type ComposerAttachmentDropPolicy,
ComposerMentionInput,
type ComposerMentionInputHandle,
} from '@/editor/ComposerMentionInput';
+import { useComposerAttachments } from '@/editor/use-composer-attachments';
import { isDesktopTargetEnabled, isInAppAgentEnabled } from '@/lib/acp/agent-visibility';
import { useEnabledOverrides } from '@/lib/acp/enabled-agents';
+import { collectAllFiles, collectImageFiles } from '@/lib/acp/image-attachment';
import {
enabledDesktopTargets,
enabledTerminalClis,
@@ -117,7 +128,60 @@ export function CreatePromptComposer({ scenario, className }: CreatePromptCompos
const [initialDraftDoc] = useState(() => getComposerDraft().doc ?? undefined);
+ const {
+ pendingAttachments,
+ pendingUploads,
+ ingestFiles,
+ removeAt: removePendingAttachment,
+ clear: clearPendingAttachments,
+ } = useComposerAttachments({
+ absPathOf:
+ typeof window !== 'undefined' && window.okDesktop
+ ? window.okDesktop.getPathForFile
+ : undefined,
+ workspaceContentDir: workspace?.contentDir,
+ pathSeparator: workspace?.pathSeparator,
+ onError: (message) => toast.error(message),
+ });
+
+ const resolvedTarget: TargetData | null =
+ selection.kind === 'desktop'
+ ? (VISIBLE_TARGETS.find((target) => target.id === selection.target) ?? null)
+ : null;
+ const dropRefusalReason = ((): string | null => {
+ switch (selection.kind) {
+ case 'thread':
+ return null;
+ case 'cli':
+ return t`${TERMINAL_CLIS[selection.cli].displayName} runs in a terminal and doesn't accept attachments — choose an in-app agent instead.`;
+ case 'desktop':
+ return resolvedTarget !== null
+ ? t`${resolvedTarget.displayName} opens via a link and doesn't accept attachments — choose an in-app agent instead.`
+ : t`This composer doesn't accept attachments.`;
+ case 'terminal':
+ return t`This composer doesn't accept attachments.`;
+ case 'none':
+ return t`No agents are set up yet — add an in-app agent in Agent connections to attach files.`;
+ default: {
+ const _exhaustive: never = selection;
+ throw new Error(`Unhandled launcher selection: ${String(_exhaustive)}`);
+ }
+ }
+ })();
+ const attachmentDrop: ComposerAttachmentDropPolicy = threadSelected
+ ? {
+ kind: 'accept',
+ onFiles: (files) => {
+ void ingestFiles(files);
+ },
+ }
+ : {
+ kind: 'refuse',
+ ...(dropRefusalReason !== null ? { reason: dropRefusalReason } : {}),
+ };
+
const [isEmpty, setIsEmpty] = useState(true);
+ const [dragActive, setDragActive] = useState(false);
const [showRequiredError, setShowRequiredError] = useState(false);
@@ -159,6 +223,7 @@ export function CreatePromptComposer({ scenario, className }: CreatePromptCompos
}
function launchThread() {
+ if (pendingUploads.length > 0) return;
const { instruction, mentions } = inputRef.current?.getContent() ?? {
instruction: '',
mentions: [],
@@ -172,6 +237,7 @@ export function CreatePromptComposer({ scenario, className }: CreatePromptCompos
description: instruction,
scenario,
mentions,
+ attachments: pendingAttachments,
});
if (input === null) return;
startAgentThreadForInput(
@@ -181,6 +247,7 @@ export function CreatePromptComposer({ scenario, className }: CreatePromptCompos
: undefined,
);
inputRef.current?.clear();
+ clearPendingAttachments();
clearComposerDraft();
}
@@ -194,6 +261,12 @@ export function CreatePromptComposer({ scenario, className }: CreatePromptCompos
setShowRequiredError(true);
return;
}
+ if (pendingAttachments.length > 0 || pendingUploads.length > 0) {
+ toast.error(
+ t`This agent doesn't accept attachments — remove them or choose an in-app agent.`,
+ );
+ return;
+ }
const input = buildCreateHandoffInput({
workspace,
description: instruction,
@@ -215,6 +288,12 @@ export function CreatePromptComposer({ scenario, className }: CreatePromptCompos
setShowRequiredError(true);
return;
}
+ if (pendingAttachments.length > 0 || pendingUploads.length > 0) {
+ toast.error(
+ t`This agent doesn't accept attachments — remove them or choose an in-app agent.`,
+ );
+ return;
+ }
writePreferredAgent(targetId);
if (states[targetId]?.installed !== true) {
const target = VISIBLE_TARGETS.find((candidate) => candidate.id === targetId);
@@ -294,7 +373,66 @@ export function CreatePromptComposer({ scenario, className }: CreatePromptCompos
{/* biome-ignore lint/a11y/noStaticElementInteractions: pointer clicks only delegate focus to the composer's editable; keyboard users focus it directly (Tab / ⌥⌘L). */}
<div
onMouseDown={(event) => focusComposerInputOnCardPointer(event, inputRef)}
- className="flex w-full cursor-text flex-col rounded-2xl border border-border/60 bg-card shadow-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50"
+ onPaste={(event) => {
+ const files = collectImageFiles(event.clipboardData);
+ if (files.length === 0) return;
+ event.preventDefault();
+ if (!threadSelected) {
+ inputRef.current?.refuseDrop(
+ dropRefusalReason ?? t`This composer doesn't accept attachments.`,
+ );
+ return;
+ }
+ void ingestFiles(files);
+ }}
+ onDragEnter={(event) => {
+ if (isExternalFileDrag(event)) {
+ event.preventDefault();
+ setDragActive(true);
+ }
+ }}
+ onDragOver={(event) => {
+ if (isExternalFileDrag(event)) {
+ event.preventDefault();
+ event.dataTransfer.dropEffect = 'copy';
+ setDragActive(true);
+ }
+ }}
+ onDragLeave={(event) => {
+ const next = event.relatedTarget;
+ if (next instanceof Node && event.currentTarget.contains(next)) return;
+ setDragActive(false);
+ }}
+ onDropCapture={() => setDragActive(false)}
+ onDrop={(event) => {
+ if (!isExternalFileDrag(event)) return;
+ event.preventDefault();
+ const files = collectAllFiles(event.dataTransfer);
+ if (files.length === 0) {
+ inputRef.current?.refuseDrop(
+ t`Folders and empty files can't be attached — drop the files themselves.`,
+ );
+ return;
+ }
+ if (!threadSelected) {
+ inputRef.current?.refuseDrop(
+ dropRefusalReason ?? t`This composer doesn't accept attachments.`,
+ );
+ return;
+ }
+ void ingestFiles(files);
+ }}
+ data-testid="create-prompt-card"
+ data-drag-active={dragActive ? (threadSelected ? 'accept' : 'refuse') : undefined}
+ className={cn(
+ 'flex w-full cursor-text flex-col rounded-2xl border border-border/60 bg-card shadow-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50',
+ dragActive &&
+ threadSelected &&
+ 'bg-primary/5 outline-2 outline-dashed outline-offset-2 outline-primary',
+ dragActive &&
+ !threadSelected &&
+ 'bg-destructive/5 outline-2 outline-dashed outline-offset-2 outline-destructive/60',
+ )}
>
{}
<ComposerMentionInput
@@ -309,25 +447,64 @@ export function CreatePromptComposer({ scenario, className }: CreatePromptCompos
? t`A PR reviewer, a release-notes writer, a deploy checklist...`
: t`A team knowledge base, a personal wiki, project docs...`
}
+ attachmentDrop={attachmentDrop}
onEmptyChange={handleEmptyChange}
onContentChange={setComposerDraftDoc}
onSubmit={handleSubmit}
initialDoc={initialDraftDoc}
className="max-h-96 overflow-y-auto px-4 py-3 text-sm leading-relaxed subtle-scrollbar [&_.ProseMirror]:min-h-16"
/>
+ {pendingAttachments.length > 0 || pendingUploads.length > 0 ? (
+ <PendingImageStrip
+ testIdPrefix="create-prompt"
+ images={pendingAttachments}
+ uploads={pendingUploads}
+ onRemove={removePendingAttachment}
+ />
+ ) : null}
+ {pendingAttachments.length > 0 && dropRefusalReason !== null ? (
+ <p aria-hidden="true" className="px-4 pb-1 text-muted-foreground text-xs">
+ {dropRefusalReason}
+ </p>
+ ) : null}
+ <div
+ role="status"
+ aria-live="polite"
+ className="sr-only"
+ data-testid="composer-attachment-status"
+ >
+ {pendingAttachments.length > 0 && dropRefusalReason !== null ? (
+ dropRefusalReason
+ ) : pendingUploads.length > 0 ? (
+ <Plural
+ value={pendingUploads.length}
+ one="Uploading # attachment"
+ other="Uploading # attachments"
+ />
+ ) : pendingAttachments.length > 0 ? (
+ <Plural
+ value={pendingAttachments.length}
+ one="# attachment is ready to send"
+ other="# attachments are ready to send"
+ />
+ ) : null}
+ </div>
{}
<div className="flex flex-wrap items-center justify-between gap-2 px-3 pb-3">
- {showRequiredError && isEmpty ? (
- <p
- role="alert"
- className="text-1sm text-destructive"
- data-testid="create-input-required"
- >
- <Trans>Describe what you want to create to continue</Trans>
- </p>
- ) : (
- <span />
- )}
+ <div className="flex min-w-0 items-center gap-2">
+ {threadSelected ? (
+ <AttachFilesButton testId="create-attach-files" onFiles={ingestFiles} />
+ ) : null}
+ {showRequiredError && isEmpty ? (
+ <p
+ role="alert"
+ className="text-1sm text-destructive"
+ data-testid="create-input-required"
+ >
+ <Trans>Describe what you want to create to continue</Trans>
+ </p>
+ ) : null}
+ </div>
{!canCreate ? (
<Button
type="button"
@@ -352,6 +529,7 @@ export function CreatePromptComposer({ scenario, className }: CreatePromptCompos
: undefined
}
variant="outline"
+ disabled={pendingUploads.length > 0}
className="gap-1.5"
data-testid="create-with-agent"
>
diff --git a/packages/app/src/components/handoff/thread-launch-events.ts b/packages/app/src/components/handoff/thread-launch-events.ts
index 863a91afd..1ef9518d3 100644
--- a/packages/app/src/components/handoff/thread-launch-events.ts
+++ b/packages/app/src/components/handoff/thread-launch-events.ts
@@ -1,3 +1,5 @@
+import type { AttachmentPart } from '@inkeep/open-knowledge-core/acp/thread-protocol';
+import type { OkNoteWindowMainAction } from '@inkeep/open-knowledge-core/desktop-bridge';
import { routeNoteWindowActionToMain } from '@/lib/note-window-main-actions';
const THREAD_LAUNCH_EVENT = 'open-knowledge:agent-thread-launch';
@@ -8,6 +10,34 @@ export interface AgentThreadLaunchDetail {
readonly prompt: string | null;
readonly docName: string | null;
readonly titleHint: string | null;
+ readonly attachments: readonly AttachmentPart[] | null;
+}
+
+type NoteWindowAgentThreadAction = Extract<OkNoteWindowMainAction, { kind: 'agent-thread' }>;
+
+function toNoteWindowAgentThreadAction(
+ detail: AgentThreadLaunchDetail,
+): NoteWindowAgentThreadAction {
+ const { agentSource, agentId, prompt, docName, titleHint } = detail;
+ return { kind: 'agent-thread', agentSource, agentId, prompt, docName, titleHint };
+}
+
+function warnDroppedByNoteWindowChannel(
+ detail: AgentThreadLaunchDetail,
+ forwarded: NoteWindowAgentThreadAction,
+): void {
+ const forwardedKeys = new Set(Object.keys(forwarded));
+ for (const [key, value] of Object.entries(detail)) {
+ if (forwardedKeys.has(key)) continue;
+ const droppedCount = Array.isArray(value) ? value.length : value == null ? 0 : 1;
+ if (droppedCount > 0) {
+ console.warn(
+ `[agent-threads] the note-window launch channel carries no ${key} — dropping`,
+ droppedCount,
+ 'value(s) from the forwarded launch',
+ );
+ }
+ }
}
export function requestAgentThreadLaunch(
@@ -16,7 +46,11 @@ export function requestAgentThreadLaunch(
? new EventTarget()
: window,
): void {
- if (routeNoteWindowActionToMain({ kind: 'agent-thread', ...detail }, target)) return;
+ const action = toNoteWindowAgentThreadAction(detail);
+ if (routeNoteWindowActionToMain(action, target)) {
+ warnDroppedByNoteWindowChannel(detail, action);
+ return;
+ }
target.dispatchEvent(new CustomEvent<AgentThreadLaunchDetail>(THREAD_LAUNCH_EVENT, { detail }));
}
diff --git a/packages/app/src/components/handoff/useHandoffDispatch.ts b/packages/app/src/components/handoff/useHandoffDispatch.ts
index 8a64001a5..270761167 100644
--- a/packages/app/src/components/handoff/useHandoffDispatch.ts
+++ b/packages/app/src/components/handoff/useHandoffDispatch.ts
@@ -26,6 +26,7 @@ import {
type TerminalCli,
withSkillPointer,
} from '@inkeep/open-knowledge-core';
+import type { AttachmentPart } from '@inkeep/open-knowledge-core/acp/thread-protocol';
import { t } from '@lingui/core/macro';
import { toast as sonnerToast } from 'sonner';
import { useConfigContext } from '@/lib/config-context';
@@ -88,6 +89,7 @@ export interface HandoffDispatchInput {
readonly createScenario?: CreateScenario;
readonly createMentions?: readonly string[];
readonly instruction?: string;
+ readonly attachments?: readonly AttachmentPart[];
readonly projectDir: string;
readonly docPath: string;
}
@@ -122,6 +124,7 @@ export function buildCreateHandoffInput(args: {
readonly description: string;
readonly scenario: CreateScenario;
readonly mentions: readonly string[];
+ readonly attachments?: readonly AttachmentPart[];
}): HandoffDispatchInput | null {
if (!args.workspace?.contentDir) return null;
return {
@@ -129,6 +132,9 @@ export function buildCreateHandoffInput(args: {
createDescription: args.description,
createScenario: args.scenario,
createMentions: args.mentions,
+ ...(args.attachments !== undefined && args.attachments.length > 0
+ ? { attachments: args.attachments }
+ : {}),
projectDir: args.workspace.contentDir,
docPath: '',
};
@@ -215,9 +221,14 @@ export function buildComposerHandoffInput(args: {
readonly instruction: string;
readonly mentions: readonly string[];
readonly selection?: ComposeSelection;
+ readonly attachments?: readonly AttachmentPart[];
}): HandoffDispatchInput | null {
if (!args.workspace?.contentDir) return null;
const { contentDir, pathSeparator } = args.workspace;
+ const attachmentsField =
+ args.attachments !== undefined && args.attachments.length > 0
+ ? { attachments: args.attachments }
+ : {};
if (args.docName) {
const relativePath = args.docRelativePath ?? docNameToRelativePath(args.docName);
const base = {
@@ -231,6 +242,7 @@ export function buildComposerHandoffInput(args: {
return {
docContext: null,
compose,
+ ...attachmentsField,
projectDir: contentDir,
docPath: joinWorkspacePath(contentDir, relativePath, pathSeparator),
};
@@ -244,6 +256,7 @@ export function buildComposerHandoffInput(args: {
instruction: args.instruction,
mentions: args.mentions,
},
+ ...attachmentsField,
projectDir: contentDir,
docPath: '',
};
@@ -255,6 +268,7 @@ export function buildComposerHandoffInput(args: {
instruction: args.instruction,
mentions: args.mentions,
},
+ ...attachmentsField,
projectDir: contentDir,
docPath: '',
};
@@ -465,6 +479,7 @@ export function startAgentThreadForInput(
prompt: composeThreadLaunchPrompt(input),
docName: docNameFromInput(input),
titleHint: threadTitleHintFromInput(input),
+ attachments: input.attachments ?? null,
});
}
diff --git a/packages/app/src/editor/ComposerMentionInput.dom.test.tsx b/packages/app/src/editor/ComposerMentionInput.dom.test.tsx
index c7338fff3..0a714b0cc 100644
--- a/packages/app/src/editor/ComposerMentionInput.dom.test.tsx
+++ b/packages/app/src/editor/ComposerMentionInput.dom.test.tsx
@@ -137,7 +137,12 @@ describe('serializeComposerContent / isComposerEmpty', () => {
describe('ComposerMentionInput (component)', () => {
test('renders an accessible textbox with the given name', () => {
render(
- <ComposerMentionInput ariaLabel="Ask AI" onEmptyChange={() => {}} onSubmit={() => {}} />,
+ <ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
+ ariaLabel="Ask AI"
+ onEmptyChange={() => {}}
+ onSubmit={() => {}}
+ />,
);
expect(screen.getByRole('textbox', { name: 'Ask AI' })).toBeTruthy();
});
@@ -145,7 +150,12 @@ describe('ComposerMentionInput (component)', () => {
test('Enter calls onSubmit; Shift+Enter does not', () => {
const onSubmit = vi.fn(() => {});
render(
- <ComposerMentionInput ariaLabel="Ask AI" onEmptyChange={() => {}} onSubmit={onSubmit} />,
+ <ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
+ ariaLabel="Ask AI"
+ onEmptyChange={() => {}}
+ onSubmit={onSubmit}
+ />,
);
const box = screen.getByRole('textbox', { name: 'Ask AI' });
@@ -160,6 +170,7 @@ describe('ComposerMentionInput (component)', () => {
const ref = createRef<ComposerMentionInputHandle>();
render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ref={ref}
ariaLabel="Ask AI"
onEmptyChange={() => {}}
@@ -178,6 +189,7 @@ describe('ComposerMentionInput (component)', () => {
const onEmptyChange = vi.fn((_isEmpty: boolean) => {});
render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ref={ref}
ariaLabel="Describe"
onEmptyChange={onEmptyChange}
@@ -198,6 +210,7 @@ describe('ComposerMentionInput (component)', () => {
const onEmptyChange = vi.fn((_isEmpty: boolean) => {});
render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ref={ref}
ariaLabel="Describe"
onEmptyChange={onEmptyChange}
@@ -214,6 +227,7 @@ describe('ComposerMentionInput (component)', () => {
const onEmptyChange = vi.fn((_isEmpty: boolean) => {});
render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ref={ref}
ariaLabel="Message Claude"
onEmptyChange={onEmptyChange}
@@ -229,6 +243,7 @@ describe('ComposerMentionInput (component)', () => {
const ref = createRef<ComposerMentionInputHandle>();
render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ref={ref}
ariaLabel="Message Claude"
onEmptyChange={() => {}}
@@ -254,6 +269,7 @@ describe('ComposerMentionInput (component)', () => {
const ref = createRef<ComposerMentionInputHandle>();
const { rerender } = render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ref={ref}
ariaLabel="Message Claude"
placeholder="Resuming the chat"
@@ -271,6 +287,7 @@ describe('ComposerMentionInput (component)', () => {
rerender(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ref={ref}
ariaLabel="Message Claude"
placeholder="Resuming the chat"
@@ -287,6 +304,7 @@ describe('ComposerMentionInput (component)', () => {
const onContentChange = vi.fn(() => {});
render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ariaLabel="Ask AI"
onEmptyChange={() => {}}
onContentChange={onContentChange}
@@ -299,6 +317,7 @@ describe('ComposerMentionInput (component)', () => {
test('a placeholder adds the data-placeholder hint while the field is empty', () => {
render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ariaLabel="Describe"
placeholder="A wiki"
onEmptyChange={() => {}}
@@ -313,6 +332,7 @@ describe('ComposerMentionInput (component)', () => {
const ref = createRef<ComposerMentionInputHandle>();
render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ref={ref}
ariaLabel="Ask AI"
onEmptyChange={() => {}}
@@ -350,6 +370,7 @@ describe('ComposerMentionInput (component)', () => {
const ref = createRef<ComposerMentionInputHandle>();
render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ref={ref}
ariaLabel="Ask AI"
onEmptyChange={() => {}}
@@ -399,7 +420,12 @@ describe('ComposerMentionInput (component)', () => {
registerEditor('some-doc', docEditor);
try {
render(
- <ComposerMentionInput ariaLabel="Ask AI" onEmptyChange={() => {}} onSubmit={() => {}} />,
+ <ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
+ ariaLabel="Ask AI"
+ onEmptyChange={() => {}}
+ onSubmit={() => {}}
+ />,
);
expect(getEditorForDoc('some-doc')).toBe(docEditor);
} finally {
@@ -454,7 +480,12 @@ describe('ComposerMentionInput — Enter defers to the @-mention popup', () => {
test('Enter submits while the popup is closed', () => {
const onSubmit = vi.fn(() => {});
render(
- <ComposerMentionInput ariaLabel="Ask AI" onEmptyChange={() => {}} onSubmit={onSubmit} />,
+ <ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
+ ariaLabel="Ask AI"
+ onEmptyChange={() => {}}
+ onSubmit={onSubmit}
+ />,
);
const box = screen.getByRole('textbox', { name: 'Ask AI' });
const editor = getComposerEditor(box);
@@ -467,7 +498,12 @@ describe('ComposerMentionInput — Enter defers to the @-mention popup', () => {
test('Enter does NOT submit while the @-popup holds a selectable item', async () => {
const onSubmit = vi.fn(() => {});
render(
- <ComposerMentionInput ariaLabel="Ask AI" onEmptyChange={() => {}} onSubmit={onSubmit} />,
+ <ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
+ ariaLabel="Ask AI"
+ onEmptyChange={() => {}}
+ onSubmit={onSubmit}
+ />,
);
const box = screen.getByRole('textbox', { name: 'Ask AI' });
const editor = getComposerEditor(box);
@@ -483,7 +519,12 @@ describe('ComposerMentionInput — Enter defers to the @-mention popup', () => {
test('Enter over an open @-popup with NO selectable item submits — never splits', async () => {
const onSubmit = vi.fn(() => {});
render(
- <ComposerMentionInput ariaLabel="Ask AI" onEmptyChange={() => {}} onSubmit={onSubmit} />,
+ <ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
+ ariaLabel="Ask AI"
+ onEmptyChange={() => {}}
+ onSubmit={onSubmit}
+ />,
);
const box = screen.getByRole('textbox', { name: 'Ask AI' });
const editor = getComposerEditor(box);
@@ -500,7 +541,12 @@ describe('ComposerMentionInput — Enter defers to the @-mention popup', () => {
test('Enter resumes submitting once the popup closes', async () => {
const onSubmit = vi.fn(() => {});
render(
- <ComposerMentionInput ariaLabel="Ask AI" onEmptyChange={() => {}} onSubmit={onSubmit} />,
+ <ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
+ ariaLabel="Ask AI"
+ onEmptyChange={() => {}}
+ onSubmit={onSubmit}
+ />,
);
const box = screen.getByRole('textbox', { name: 'Ask AI' });
const editor = getComposerEditor(box);
@@ -521,6 +567,7 @@ describe('ComposerMentionInput — Enter defers to the @-mention popup', () => {
const onEscape = vi.fn(() => {});
render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ariaLabel="Ask AI"
onEmptyChange={() => {}}
onSubmit={() => {}}
@@ -546,7 +593,12 @@ describe('ComposerMentionInput — Enter during IME composition', () => {
test('neither guard half lets a composition Enter submit; a plain Enter does', () => {
const onSubmit = vi.fn(() => {});
render(
- <ComposerMentionInput ariaLabel="Ask AI" onEmptyChange={() => {}} onSubmit={onSubmit} />,
+ <ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
+ ariaLabel="Ask AI"
+ onEmptyChange={() => {}}
+ onSubmit={onSubmit}
+ />,
);
const box = screen.getByRole('textbox', { name: 'Ask AI' });
const editor = getComposerEditor(box);
@@ -570,7 +622,14 @@ describe('ComposerMentionInput — Enter during IME composition', () => {
describe('ComposerMentionInput — setText round-trips the text it was given', () => {
test('newlines survive, and angle brackets are not parsed as markup', () => {
const ref = createRef<ComposerMentionInputHandle>();
- render(<ComposerMentionInput ref={ref} ariaLabel="Ask AI" onEmptyChange={() => {}} />);
+ render(
+ <ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
+ ref={ref}
+ ariaLabel="Ask AI"
+ onEmptyChange={() => {}}
+ />,
+ );
const seeded = 'first line\nsecond <b>line</b>\n\nfourth line';
act(() => ref.current?.setText(seeded));
@@ -581,7 +640,14 @@ describe('ComposerMentionInput — setText round-trips the text it was given', (
test('seeding announces emptiness, the way appending does', () => {
const onEmptyChange = vi.fn((_isEmpty: boolean) => {});
const ref = createRef<ComposerMentionInputHandle>();
- render(<ComposerMentionInput ref={ref} ariaLabel="Ask AI" onEmptyChange={onEmptyChange} />);
+ render(
+ <ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
+ ref={ref}
+ ariaLabel="Ask AI"
+ onEmptyChange={onEmptyChange}
+ />,
+ );
onEmptyChange.mockClear();
act(() => ref.current?.setText('some words'));
diff --git a/packages/app/src/editor/ComposerMentionInput.tsx b/packages/app/src/editor/ComposerMentionInput.tsx
index ebef50e49..7b840761a 100644
--- a/packages/app/src/editor/ComposerMentionInput.tsx
+++ b/packages/app/src/editor/ComposerMentionInput.tsx
@@ -1,8 +1,9 @@
import { useLingui } from '@lingui/react/macro';
import type { JSONContent } from '@tiptap/core';
import { EditorContent, useEditor } from '@tiptap/react';
-import { type Ref, useEffect, useImperativeHandle, useRef, useState } from 'react';
+import { type DragEvent, type Ref, useEffect, useImperativeHandle, useRef, useState } from 'react';
import { clearComposerDraft } from '@/components/composer-draft-store';
+import { isExternalFileDrag } from '@/components/file-tree-adapter';
import {
type ComposerAttachmentPart,
composerMentionExtensions,
@@ -20,6 +21,7 @@ import {
setSlashCommands,
} from '@/editor/composer-mention/composer-slash-command';
import { suggestionHasSelectableItem } from '@/editor/extensions/suggestion-floating-ui';
+import { collectAllFiles } from '@/lib/acp/image-attachment';
import { cn } from '@/lib/utils';
function seedDocHasContent(doc: JSONContent | undefined): boolean {
@@ -33,8 +35,14 @@ interface ComposerEditorView {
dispatch: (tr: unknown) => void;
}
+export type ComposerAttachmentDropPolicy =
+ | { readonly kind: 'accept'; readonly onFiles: (files: readonly File[]) => void }
+ | { readonly kind: 'refuse'; readonly reason?: string }
+ | { readonly kind: 'host' };
+
export interface ComposerMentionInputHandle {
focus: () => void;
+ refuseDrop: (reason: string) => void;
focusEnd: () => void;
blur: () => void;
clear: () => void;
@@ -69,6 +77,7 @@ export function ComposerMentionInput({
disabled = false,
testId,
slashCommands,
+ attachmentDrop,
}: {
ref?: Ref<ComposerMentionInputHandle>;
ariaLabel: string;
@@ -83,9 +92,21 @@ export function ComposerMentionInput({
disabled?: boolean;
testId?: string;
slashCommands?: SlashCommandItem[] | null;
+ attachmentDrop: ComposerAttachmentDropPolicy;
}) {
const { t } = useLingui();
const [slashHint, setSlashHint] = useState<SlashTokenHint | null>(null);
+ const [dropRefusal, setDropRefusal] = useState<{ text: string; id: number } | null>(null);
+ const dropRefusalIdRef = useRef(0);
+ const refuseDrop = (reason: string) => {
+ dropRefusalIdRef.current += 1;
+ setDropRefusal({ text: reason, id: dropRefusalIdRef.current });
+ };
+ useEffect(() => {
+ if (dropRefusal === null) return;
+ const timer = setTimeout(() => setDropRefusal(null), 4000);
+ return () => clearTimeout(timer);
+ }, [dropRefusal]);
const onEmptyChangeRef = useRef(onEmptyChange);
const onContentChangeRef = useRef(onContentChange);
@@ -193,6 +214,10 @@ export function ComposerMentionInput({
ref,
() => ({
focus: () => editor?.commands.focus(),
+ refuseDrop: (reason: string) => {
+ dropRefusalIdRef.current += 1;
+ setDropRefusal({ text: reason, id: dropRefusalIdRef.current });
+ },
focusEnd: () => editor?.commands.focus('end'),
blur: () => editor?.commands.blur(),
clear: () => editor?.commands.clearContent(true),
@@ -235,10 +260,50 @@ export function ComposerMentionInput({
[editor],
);
+ const dropPolicy = attachmentDrop;
+ const dropSurfaceProps =
+ dropPolicy.kind === 'host'
+ ? {}
+ : {
+ onDragEnter: (event: DragEvent<HTMLDivElement>) => {
+ if (isExternalFileDrag(event)) event.preventDefault();
+ },
+ onDragOver: (event: DragEvent<HTMLDivElement>) => {
+ if (isExternalFileDrag(event)) {
+ event.preventDefault();
+ event.dataTransfer.dropEffect = 'copy';
+ }
+ },
+ onDrop: (event: DragEvent<HTMLDivElement>) => {
+ if (!isExternalFileDrag(event)) return;
+ event.preventDefault();
+ event.stopPropagation();
+ const files = collectAllFiles(event.dataTransfer);
+ if (files.length === 0) {
+ refuseDrop(t`Folders and empty files can't be attached — drop the files themselves.`);
+ return;
+ }
+ if (dropPolicy.kind === 'accept') {
+ dropPolicy.onFiles(files);
+ return;
+ }
+ refuseDrop(dropPolicy.reason ?? t`This composer doesn't accept attachments.`);
+ },
+ };
+
return (
<>
- {/* oxlint-disable-next-line ok/no-unportaled-editor-content -- standalone single-instance composer editor — not an Activity-pool document editor. EditorContent's own wrapper element still exclusively parents view.dom (the slash hint below is a sibling of that wrapper, never inside it), so the H6 cross-doc DOM vacuum the portal guards against (precedent #44) cannot apply here. */}
- <EditorContent editor={editor} className={className} />
+ {/* oxlint-disable-next-line ok/no-unportaled-editor-content -- standalone single-instance composer editor — not an Activity-pool document editor. EditorContent's own wrapper element still exclusively parents view.dom (every other node this component renders is a sibling of that wrapper, never inside it), so the H6 cross-doc DOM vacuum the portal guards against (precedent #44) cannot apply here. */}
+ <EditorContent editor={editor} className={className} {...dropSurfaceProps} />
+ {dropPolicy.kind !== 'host' ? (
+ <div role="status" aria-live="polite" data-testid="composer-drop-refusal">
+ {dropRefusal !== null ? (
+ <p key={dropRefusal.id} className="px-2.5 py-1 text-muted-foreground text-xs">
+ {dropRefusal.text}
+ </p>
+ ) : null}
+ </div>
+ ) : null}
{}
{slashCommands !== undefined ? (
<p
diff --git a/packages/app/src/editor/composer-drop-parity.dom.test.tsx b/packages/app/src/editor/composer-drop-parity.dom.test.tsx
new file mode 100644
index 000000000..c09463cc3
--- /dev/null
+++ b/packages/app/src/editor/composer-drop-parity.dom.test.tsx
@@ -0,0 +1,461 @@
+import * as actualLinguiMacro from '@lingui/react/macro';
+import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react';
+import type { ReactNode } from 'react';
+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
+import { setComposerDraftDoc } from '@/components/composer-draft-store';
+import {
+ type AgentThreadLaunchDetail,
+ subscribeToAgentThreadLaunchRequests,
+} from '@/components/handoff/thread-launch-events';
+import {
+ attachmentChipEvidence,
+ backfillElementFromPoint,
+ collectImageParts,
+ DROP_TEST_FILE_NAME,
+ DROP_TEST_PNG_BASE64,
+ dropImageOn,
+ dropRefusalText,
+ expectDragOverIsCancelled,
+ makeImageFile,
+} from '@/editor/composer-drop.test-helper';
+import { reloadEnabledAgentsFromStorage } from '@/lib/acp/enabled-agents';
+import { registerAgent, reloadRegisteredAgentsFromStorage } from '@/lib/acp/registered-agents';
+import { saveStickyAgent } from '@/lib/unified-agent-store';
+
+vi.doMock('@lingui/react/macro', () => ({
+ ...actualLinguiMacro,
+ Trans: ({ children }: { children: ReactNode }) => <>{children}</>,
+ useLingui: () => ({
+ t: (strings: TemplateStringsArray, ...values: unknown[]) =>
+ strings.reduce((acc, part, index) => `${acc}${part}${values[index] ?? ''}`, ''),
+ }),
+}));
+
+const toastMessages: string[] = [];
+vi.doMock('sonner', () => ({
+ toast: {
+ error: (message: string) => {
+ toastMessages.push(message);
+ },
+ info: (message: string) => {
+ toastMessages.push(message);
+ },
+ warning: (message: string) => {
+ toastMessages.push(message);
+ },
+ success: (message: string) => {
+ toastMessages.push(message);
+ },
+ },
+}));
+
+type MenuChild = {
+ children?: ReactNode;
+ disabled?: boolean;
+ onSelect?: () => void;
+ [key: string]: unknown;
+};
+vi.doMock('@/components/ui/dropdown-menu', () => ({
+ DropdownMenu: ({ children }: MenuChild) => <div>{children}</div>,
+ DropdownMenuTrigger: ({ children }: MenuChild) => <>{children}</>,
+ DropdownMenuContent: ({ children, ...props }: MenuChild) => (
+ <div role="menu" {...props}>
+ {children}
+ </div>
+ ),
+ DropdownMenuGroup: ({ children }: MenuChild) => <>{children}</>,
+ DropdownMenuItem: ({ children, disabled, onSelect, ...props }: MenuChild) => (
+ <button type="button" role="menuitem" disabled={disabled} onClick={onSelect} {...props}>
+ {children}
+ </button>
+ ),
+ DropdownMenuLabel: ({ children, ...props }: MenuChild) => <div {...props}>{children}</div>,
+ DropdownMenuSeparator: () => <hr data-testid="menu-separator" />,
+}));
+
+vi.doMock('@/components/handoff/OpenInAgentMenuItem', () => ({
+ TargetIcon: ({ id }: { id: string }) => <span data-testid={`target-icon-${id}`} />,
+}));
+
+let installStates: Record<string, { installed: boolean | null }> = {};
+vi.doMock('@/components/handoff/useInstalledAgents', () => ({
+ useInstalledAgents: () => ({ states: installStates, refresh: () => Promise.resolve() }),
+}));
+
+vi.doMock('@/lib/use-workspace', () => ({
+ useWorkspace: () => ({ contentDir: '/tmp/project', pathSeparator: '/' }),
+}));
+
+vi.doMock('@/lib/config-context', () => ({
+ useConfigContext: () => ({ merged: { appearance: { preview: { autoOpen: true } } } }),
+}));
+
+const dispatchCalls: Array<{ target: string; input: unknown }> = [];
+vi.doMock('@/components/handoff/useHandoffDispatch', async () => {
+ const actual = await vi.importActual<typeof import('@/components/handoff/useHandoffDispatch')>(
+ '@/components/handoff/useHandoffDispatch',
+ );
+ return {
+ ...actual,
+ useHandoffDispatch: () => ({
+ dispatch: (target: string, input: unknown) => {
+ dispatchCalls.push({ target, input });
+ return Promise.resolve({ ok: true });
+ },
+ reinstallCoworkSkill: () => Promise.resolve({ kind: 'already-installed' }),
+ }),
+ };
+});
+
+const startCommentSubscribers = new Set<() => void>();
+vi.doMock('@/comments/store', () => ({
+ createThread: () => {},
+ subscribeStartComment: (cb: () => void) => {
+ startCommentSubscribers.add(cb);
+ return () => startCommentSubscribers.delete(cb);
+ },
+ emitStartComment: () => {
+ for (const cb of startCommentSubscribers) cb();
+ },
+ editComment: () => {},
+ deleteThread: () => {},
+ clearActiveThread: () => {},
+ emitOpenThread: () => {},
+ reopenThread: () => {},
+ replaceOrphan: () => {},
+ setActiveThread: () => {},
+ toggleSending: () => {},
+ dispatchComments: async () => [],
+ subscribeCommentPosted: () => () => {},
+}));
+
+vi.doMock('@/comments/comment-chips', () => ({
+ propertyAddress: (key: string) => key,
+ revealThread: () => {},
+}));
+
+vi.doMock('@/editor/active-editor', async () => {
+ const actual =
+ await vi.importActual<typeof import('@/editor/active-editor')>('@/editor/active-editor');
+ return { ...actual, getVisibleEditorForDoc: () => null };
+});
+
+vi.doMock('@/comments/anchor-decorations', () => ({ setCommentDraftRange: () => {} }));
+
+vi.doMock('@/components/doc-panel-events', () => ({ requestDocPanelTab: () => {} }));
+
+const { TooltipProvider } = await import('@/components/ui/tooltip');
+const { ThreadCard } = await import('@/comments/ThreadCard');
+const { CommentSelectionAffordance } = await import('@/comments/CommentSelectionAffordance');
+const { UserMessageEditor } = await import('@/components/acp/UserMessageActions');
+const { CreatePromptComposer } = await import('@/components/empty-state/CreatePromptComposer');
+
+const DOC_TEXT = 'Toss the tofu with cornstarch.';
+const QUOTE_FROM = DOC_TEXT.indexOf('the tofu');
+const QUOTE_TO = QUOTE_FROM + 'the tofu'.length;
+
+function fakeEditor() {
+ return {
+ isDestroyed: false,
+ state: {
+ selection: {
+ from: QUOTE_FROM,
+ to: QUOTE_TO,
+ empty: false,
+ ranges: [{ $from: { pos: QUOTE_FROM }, $to: { pos: QUOTE_TO } }],
+ },
+ doc: {
+ nodesBetween: (from: number, to: number, fn: (node: unknown, pos: number) => void) => {
+ fn(
+ { isText: true, text: DOC_TEXT.slice(from, to), isBlock: false, isTextblock: false },
+ from,
+ );
+ },
+ content: { size: DOC_TEXT.length },
+ },
+ },
+ commands: { setTextSelection: () => {} },
+ };
+}
+
+function commentThread() {
+ return {
+ id: 't1',
+ docName: 'recipes/stir-fry',
+ target: { kind: 'body' as const },
+ anchor: { quote: 'the tofu', prefix: '', suffix: '', start: 0, end: 8 },
+ status: 'open' as const,
+ body: 'press it?',
+ createdAt: 1000,
+ updatedAt: 1000,
+ queued: true,
+ };
+}
+
+async function expectDropIsRefusedWithAReason(textbox: Element) {
+ expectDragOverIsCancelled(textbox);
+ dropImageOn(textbox);
+ await waitFor(() => {
+ expect(dropRefusalText()).not.toBe('');
+ });
+ expect(attachmentChipEvidence(DROP_TEST_FILE_NAME)).toBeNull();
+ expect(toastMessages).toEqual([]);
+}
+
+let consoleErrorSpy: ReturnType<typeof vi.spyOn>;
+
+beforeEach(() => {
+ backfillElementFromPoint();
+ consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(() => {});
+ installStates = {
+ 'claude-code': { installed: true },
+ codex: { installed: true },
+ cursor: { installed: true },
+ };
+ toastMessages.length = 0;
+ dispatchCalls.length = 0;
+ startCommentSubscribers.clear();
+ try {
+ window.localStorage.clear();
+ } catch {}
+ setComposerDraftDoc(null);
+ reloadRegisteredAgentsFromStorage();
+ reloadEnabledAgentsFromStorage();
+});
+
+afterEach(() => {
+ cleanup();
+ consoleErrorSpy.mockRestore();
+});
+
+describe('every ComposerMentionInput surface either refuses the drop with a reason or defers it to its host', () => {
+ test('comments ThreadCard edit composer', async () => {
+ render(
+ <TooltipProvider>
+ <ThreadCard
+ thread={commentThread()}
+ cardRef={() => {}}
+ focused={false}
+ active={false}
+ sending={false}
+ />
+ </TooltipProvider>,
+ );
+ screen.getByRole('button', { name: /edit this comment/i }).click();
+ const textbox = await screen.findByRole('textbox', { name: /edit this comment/i });
+
+ await expectDropIsRefusedWithAReason(textbox);
+ });
+
+ test('CommentSelectionAffordance comment composer', async () => {
+ const { emitStartComment } = await import('@/comments/store');
+ render(
+ <TooltipProvider>
+ <CommentSelectionAffordance
+ // biome-ignore lint/suspicious/noExplicitAny: structural editor double
+ editor={fakeEditor() as any}
+ docName="recipes/stir-fry"
+ />
+ </TooltipProvider>,
+ );
+ act(() => {
+ emitStartComment();
+ });
+ const textbox = await screen.findByRole('textbox', { name: /add a comment/i });
+
+ await expectDropIsRefusedWithAReason(textbox);
+ });
+
+ test('UserMessageEditor resend composer defers the drop to its host panel', async () => {
+ const hostDrops: string[] = [];
+ render(
+ <TooltipProvider>
+ {/* biome-ignore lint/a11y/noStaticElementInteractions: test-harness drop-target probe standing in for the host panel — drop is a pointer-only affordance, mirroring ThreadView's real drop host. */}
+ <div
+ onDrop={(event) => {
+ hostDrops.push(...Array.from(event.dataTransfer.files).map((file) => file.name));
+ }}
+ >
+ <UserMessageEditor
+ initialText="try again with the screenshot"
+ currentAgent={{ source: 'registry', id: 'claude-acp', name: 'Claude Agent' }}
+ canSendHere
+ onCancel={() => {}}
+ onSend={() => Promise.resolve()}
+ />
+ </div>
+ </TooltipProvider>,
+ );
+ const textbox = await screen.findByRole('textbox', { name: /edit and send again/i });
+
+ dropImageOn(textbox, makeImageFile());
+
+ expect(hostDrops).toEqual([DROP_TEST_FILE_NAME]);
+ expect(dropRefusalText()).toBe('');
+ expect(attachmentChipEvidence(DROP_TEST_FILE_NAME)).toBeNull();
+ });
+
+ test('empty-state CreatePromptComposer with a link-opened desktop target', async () => {
+ saveStickyAgent('cursor');
+ render(
+ <TooltipProvider>
+ <CreatePromptComposer scenario="new-project" />
+ </TooltipProvider>,
+ );
+ const textbox = await screen.findByRole('textbox', {
+ name: /describe the project you want to create/i,
+ });
+
+ await expectDropIsRefusedWithAReason(textbox);
+ expect(dropRefusalText()).toContain('opens via a link');
+ });
+});
+
+describe('the empty-state CreatePromptComposer with an in-app agent thread target', () => {
+ function renderCreateComposer() {
+ return render(
+ <TooltipProvider>
+ <CreatePromptComposer scenario="new-project" />
+ </TooltipProvider>,
+ );
+ }
+
+ test('a dropped image attaches as a pending chip instead of being refused', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ renderCreateComposer();
+ const textbox = await screen.findByRole('textbox', {
+ name: /describe the project you want to create/i,
+ });
+
+ expectDragOverIsCancelled(textbox);
+ dropImageOn(textbox);
+
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROP_TEST_FILE_NAME)).not.toBeNull();
+ });
+ expect(dropRefusalText()).toBe('');
+ expect(toastMessages).toEqual([]);
+ });
+
+ test('a dropped image reaches the launched thread intent as an image part', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ setComposerDraftDoc({
+ type: 'doc',
+ content: [
+ { type: 'paragraph', content: [{ type: 'text', text: 'a wiki for the screenshot' }] },
+ ],
+ });
+ const launches: AgentThreadLaunchDetail[] = [];
+ const unsubscribe = subscribeToAgentThreadLaunchRequests((detail) => launches.push(detail));
+ try {
+ renderCreateComposer();
+ const textbox = await screen.findByRole('textbox', {
+ name: /describe the project you want to create/i,
+ });
+
+ dropImageOn(textbox);
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROP_TEST_FILE_NAME)).not.toBeNull();
+ });
+
+ fireEvent.click(screen.getByTestId('create-with-agent'));
+
+ await waitFor(() => {
+ expect(launches).toHaveLength(1);
+ });
+ expect(collectImageParts(launches[0])).toContainEqual(
+ expect.objectContaining({
+ kind: 'image',
+ mimeType: 'image/png',
+ data: DROP_TEST_PNG_BASE64,
+ }),
+ );
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROP_TEST_FILE_NAME)).toBeNull();
+ });
+ } finally {
+ unsubscribe();
+ }
+ });
+
+ test('a drop on the card outside the text box attaches instead of falling through', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ renderCreateComposer();
+ await screen.findByRole('textbox', { name: /describe the project you want to create/i });
+
+ const dropTarget = screen.getByTestId('create-with-agent');
+ expectDragOverIsCancelled(dropTarget);
+ dropImageOn(dropTarget);
+
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROP_TEST_FILE_NAME)).not.toBeNull();
+ });
+ expect(dropRefusalText()).toBe('');
+ });
+
+ test('the card signals accept while a file is dragged over it and clears when the drag leaves', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ renderCreateComposer();
+ await screen.findByRole('textbox', { name: /describe the project you want to create/i });
+ const card = screen.getByTestId('create-prompt-card');
+ const dataTransfer = { types: ['Files'], files: [makeImageFile()], items: [] };
+
+ act(() => {
+ fireEvent.dragEnter(card, { dataTransfer });
+ });
+ expect(card.getAttribute('data-drag-active')).toBe('accept');
+
+ act(() => {
+ fireEvent.dragLeave(card, { dataTransfer });
+ });
+ expect(card.getAttribute('data-drag-active')).toBeNull();
+ });
+
+ test('the attach button is offered for an in-app agent and withheld for a link-opened target', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ renderCreateComposer();
+ await screen.findByRole('textbox', { name: /describe the project you want to create/i });
+ expect(screen.queryByTestId('create-attach-files')).not.toBeNull();
+
+ fireEvent.click(screen.getByTestId('create-agent-option-cursor'));
+
+ expect(screen.queryByTestId('create-attach-files')).toBeNull();
+ expect(screen.getByTestId('create-prompt-card').getAttribute('data-drag-active')).toBeNull();
+ });
+
+ test('attach then switch to a link-opened target refuses the send and keeps the image pending, never silently stripped', async () => {
+ registerAgent({ source: 'registry', id: 'claude-acp', name: 'Claude Agent' });
+ setComposerDraftDoc({
+ type: 'doc',
+ content: [
+ { type: 'paragraph', content: [{ type: 'text', text: 'a wiki for the screenshot' }] },
+ ],
+ });
+ const launches: AgentThreadLaunchDetail[] = [];
+ const unsubscribe = subscribeToAgentThreadLaunchRequests((detail) => launches.push(detail));
+ try {
+ renderCreateComposer();
+ const textbox = await screen.findByRole('textbox', {
+ name: /describe the project you want to create/i,
+ });
+ dropImageOn(textbox);
+ await waitFor(() => {
+ expect(attachmentChipEvidence(DROP_TEST_FILE_NAME)).not.toBeNull();
+ });
+
+ fireEvent.click(screen.getByTestId('create-agent-option-cursor'));
+ fireEvent.click(screen.getByTestId('create-with-agent'));
+
+ await waitFor(() => {
+ expect(toastMessages.some((text) => text.includes("doesn't accept attachments"))).toBe(
+ true,
+ );
+ });
+ expect(collectImageParts(dispatchCalls)).toEqual([]);
+ expect(collectImageParts(launches)).toEqual([]);
+ expect(attachmentChipEvidence(DROP_TEST_FILE_NAME)).not.toBeNull();
+ } finally {
+ unsubscribe();
+ }
+ });
+});
diff --git a/packages/app/src/editor/composer-drop.test-helper.ts b/packages/app/src/editor/composer-drop.test-helper.ts
new file mode 100644
index 000000000..76446acb7
--- /dev/null
+++ b/packages/app/src/editor/composer-drop.test-helper.ts
@@ -0,0 +1,105 @@
+import { act, createEvent, fireEvent, screen } from '@testing-library/react';
+import { expect } from 'vitest';
+
+const DROP_TEST_PNG_BYTES = [0x89, 0x50, 0x4e, 0x47];
+export const DROP_TEST_PNG_BASE64 = btoa(String.fromCharCode(...DROP_TEST_PNG_BYTES));
+export const DROP_TEST_FILE_NAME = 'drop-me.png';
+
+export function backfillElementFromPoint() {
+ const doc = document as Document & {
+ elementFromPoint?: (x: number, y: number) => Element | null;
+ };
+ if (typeof doc.elementFromPoint !== 'function') doc.elementFromPoint = () => null;
+}
+
+export function makeImageFile(name = DROP_TEST_FILE_NAME) {
+ return new File([new Uint8Array(DROP_TEST_PNG_BYTES)], name, { type: 'image/png' });
+}
+
+export function makeFilesDataTransfer(files: readonly File[]) {
+ return {
+ types: ['Files'],
+ files,
+ items: files.map((file) => ({ kind: 'file', type: file.type, getAsFile: () => file })),
+ dropEffect: 'none',
+ effectAllowed: 'all',
+ getData: () => '',
+ };
+}
+
+function dropFilesOn(element: Element, files: readonly File[]) {
+ const dataTransfer = makeFilesDataTransfer(files);
+ act(() => {
+ fireEvent.dragEnter(element, { dataTransfer });
+ fireEvent.dragOver(element, { dataTransfer });
+ fireEvent.drop(element, { dataTransfer });
+ });
+}
+
+export function dropImageOn(element: Element, file = makeImageFile()) {
+ dropFilesOn(element, [file]);
+}
+
+export function expectDragOverIsCancelled(element: Element, file = makeImageFile()) {
+ const dataTransfer = makeFilesDataTransfer([file]);
+ const event = createEvent.dragOver(element, { dataTransfer });
+ act(() => {
+ fireEvent(element, event);
+ });
+ expect(event.defaultPrevented).toBe(true);
+ expect(dataTransfer.dropEffect).toBe('copy');
+}
+
+function escapeForRegExp(value: string) {
+ return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
+}
+
+export function attachmentChipEvidence(name: string): HTMLElement | null {
+ const pattern = new RegExp(escapeForRegExp(name), 'i');
+ const isUploadPlaceholder = (element: HTMLElement) =>
+ element.closest('[data-testid$="-pending-upload"]') !== null;
+ const candidates = [
+ ...screen.queryAllByLabelText(pattern),
+ ...screen.queryAllByAltText(pattern),
+ ...screen.queryAllByText(pattern),
+ ].filter((element) => !isUploadPlaceholder(element));
+ if (candidates.length > 0) return candidates[0] ?? null;
+ return document.querySelector<HTMLElement>(
+ `[title*="${name}"]:not([data-testid$="-pending-upload"])`,
+ );
+}
+
+export function removeAttachmentButton(name: string): HTMLElement | undefined {
+ const pattern = new RegExp(escapeForRegExp(name), 'i');
+ return screen
+ .queryAllByRole('button', { name: /remove|delete|dismiss/i })
+ .find((button) => pattern.test(button.getAttribute('aria-label') ?? ''));
+}
+
+export function dropRefusalText(): string {
+ return Array.from(document.querySelectorAll('[data-testid="composer-drop-refusal"]'))
+ .map((el) => el.textContent?.trim() ?? '')
+ .join(' ')
+ .trim();
+}
+
+export function liveRegionTexts(): string[] {
+ return Array.from(document.querySelectorAll('[role="status"],[role="alert"],[aria-live]'))
+ .map((el) => el.textContent?.trim() ?? '')
+ .filter((text) => text !== '');
+}
+
+export function collectImageParts(
+ value: unknown,
+ seen = new Set<object>(),
+): Array<Record<string, unknown>> {
+ if (typeof value !== 'object' || value === null) return [];
+ if (seen.has(value)) return [];
+ seen.add(value);
+ if (Array.isArray(value)) {
+ return value.flatMap((item) => collectImageParts(item, seen));
+ }
+ const record = value as Record<string, unknown>;
+ const own = record.kind === 'image' ? [record] : [];
+ return [...own, ...Object.values(record).flatMap((nested) => collectImageParts(nested, seen))];
+}
diff --git a/packages/app/src/editor/composer-mention/composer-slash-input.dom.test.tsx b/packages/app/src/editor/composer-mention/composer-slash-input.dom.test.tsx
index ebbdcd41f..9fc708f01 100644
--- a/packages/app/src/editor/composer-mention/composer-slash-input.dom.test.tsx
+++ b/packages/app/src/editor/composer-mention/composer-slash-input.dom.test.tsx
@@ -51,6 +51,7 @@ function renderComposer(props?: {
const ref = createRef<ComposerMentionInputHandle>();
const utils = render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ref={ref}
ariaLabel="Message Agent"
onEmptyChange={() => {}}
@@ -158,6 +159,7 @@ describe('token decoration + hint line', () => {
const ref = createRef<ComposerMentionInputHandle>();
render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ref={ref}
ariaLabel="Message Agent"
onEmptyChange={() => {}}
@@ -188,6 +190,7 @@ describe('token decoration + hint line', () => {
expect(box.querySelector('.composer-slash-token')).toBeNull();
rerender(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ref={ref}
ariaLabel="Message Agent"
onEmptyChange={() => {}}
@@ -287,6 +290,7 @@ describe('picker lifecycle', () => {
const ref = createRef<ComposerMentionInputHandle>();
render(
<ComposerMentionInput
+ attachmentDrop={{ kind: 'host' }}
ref={ref}
ariaLabel="Message Agent"
onEmptyChange={() => {}}
diff --git a/packages/app/src/editor/use-composer-attachments.dom.test.tsx b/packages/app/src/editor/use-composer-attachments.dom.test.tsx
new file mode 100644
index 000000000..1592d75fa
--- /dev/null
+++ b/packages/app/src/editor/use-composer-attachments.dom.test.tsx
@@ -0,0 +1,242 @@
+import { act, renderHook, waitFor } from '@testing-library/react';
+import { afterEach, describe, expect, test, vi } from 'vitest';
+import { useComposerAttachments } from '@/editor/use-composer-attachments';
+import { MAX_TOTAL_ATTACHMENT_BYTES } from '@/lib/acp/image-attachment';
+
+const PNG_BYTES = [0x89, 0x50, 0x4e, 0x47];
+const PNG_BASE64 = btoa(String.fromCharCode(...PNG_BYTES));
+
+function pngFile(name: string) {
+ return new File([new Uint8Array(PNG_BYTES)], name, { type: 'image/png' });
+}
+
+function renderAttachments(onError: (message: string) => void = () => {}) {
+ return renderHook(() => useComposerAttachments({ onError }));
+}
+
+afterEach(() => {
+ vi.restoreAllMocks();
+});
+
+describe('useComposerAttachments', () => {
+ test('an allowed image becomes a pending attachment with its bytes base64-encoded', async () => {
+ const onError = vi.fn();
+ const { result } = renderAttachments(onError);
+
+ await act(async () => {
+ await result.current.ingestFiles([pngFile('shot.png')]);
+ });
+
+ await waitFor(() => {
+ expect(result.current.pendingAttachments).toHaveLength(1);
+ });
+ expect(result.current.pendingAttachments[0]).toMatchObject({
+ kind: 'image',
+ mimeType: 'image/png',
+ data: PNG_BASE64,
+ name: 'shot.png',
+ });
+ expect(onError).not.toHaveBeenCalled();
+ });
+
+ test('a disallowed image type is reported through onError and never attaches', async () => {
+ const onError = vi.fn();
+ const { result } = renderAttachments(onError);
+
+ await act(async () => {
+ await result.current.ingestFiles([
+ new File([new Uint8Array(PNG_BYTES)], 'scan.tiff', { type: 'image/tiff' }),
+ ]);
+ });
+
+ expect(onError).toHaveBeenCalledTimes(1);
+ expect(onError.mock.calls[0]?.[0]).toContain('image/tiff');
+ expect(result.current.pendingAttachments).toEqual([]);
+ });
+
+ test('a non-image file with no path resolver is reported, not silently dropped', async () => {
+ const onError = vi.fn();
+ const { result } = renderAttachments(onError);
+
+ await act(async () => {
+ await result.current.ingestFiles([new File(['notes'], 'notes.txt', { type: 'text/plain' })]);
+ });
+
+ expect(onError).toHaveBeenCalledTimes(1);
+ expect(onError.mock.calls[0]?.[0]).toContain("can't attach files by path");
+ expect(result.current.pendingAttachments).toEqual([]);
+ });
+
+ test('a batch of unattachable files is reported once, not once per file', async () => {
+ const onError = vi.fn();
+ const { result } = renderAttachments(onError);
+
+ await act(async () => {
+ await result.current.ingestFiles([
+ new File(['a'], 'a.txt', { type: 'text/plain' }),
+ new File(['b'], 'b.txt', { type: 'text/plain' }),
+ new File(['c'], 'c.txt', { type: 'text/plain' }),
+ ]);
+ });
+
+ expect(onError).toHaveBeenCalledTimes(1);
+ expect(onError.mock.calls[0]?.[0]).toContain('3');
+ expect(result.current.pendingAttachments).toEqual([]);
+ });
+
+ test('attachments past the per-message byte budget are refused instead of oversizing the frame', async () => {
+ const onError = vi.fn();
+ const { result } = renderAttachments(onError);
+ const halfBudget = new File(
+ [new Uint8Array(Math.ceil(MAX_TOTAL_ATTACHMENT_BYTES * 0.6))],
+ 'big.png',
+ {
+ type: 'image/png',
+ },
+ );
+ const second = new File(
+ [new Uint8Array(Math.ceil(MAX_TOTAL_ATTACHMENT_BYTES * 0.6))],
+ 'big2.png',
+ {
+ type: 'image/png',
+ },
+ );
+
+ await act(async () => {
+ await result.current.ingestFiles([halfBudget, second]);
+ });
+
+ await waitFor(() => {
+ expect(result.current.pendingAttachments).toHaveLength(1);
+ });
+ expect(result.current.pendingAttachments[0]).toMatchObject({ name: 'big.png' });
+ expect(onError).toHaveBeenCalledTimes(1);
+ expect(onError.mock.calls[0]?.[0]).toContain(
+ `${Math.round(MAX_TOTAL_ATTACHMENT_BYTES / 1024)} KB`,
+ );
+ });
+
+ test('an in-flight read shows a placeholder that clears once the attachment lands', async () => {
+ const { result } = renderAttachments();
+
+ let settled: Promise<void> | undefined;
+ act(() => {
+ settled = result.current.ingestFiles([pngFile('slow.png')]);
+ });
+ expect(result.current.pendingUploads).toHaveLength(1);
+ expect(result.current.pendingUploads[0]).toMatchObject({ name: 'slow.png' });
+
+ await act(async () => {
+ await settled;
+ });
+ expect(result.current.pendingUploads).toEqual([]);
+ expect(result.current.pendingAttachments).toHaveLength(1);
+ });
+
+ test('clearing mid-ingest keeps a late-resolving read from resurrecting the attachment', async () => {
+ const { result } = renderAttachments();
+
+ let settled: Promise<void> | undefined;
+ act(() => {
+ settled = result.current.ingestFiles([pngFile('late.png')]);
+ });
+ expect(result.current.pendingUploads).toHaveLength(1);
+
+ act(() => {
+ result.current.clear();
+ });
+ expect(result.current.pendingUploads).toEqual([]);
+ expect(result.current.pendingAttachments).toEqual([]);
+
+ await act(async () => {
+ await settled;
+ });
+ expect(result.current.pendingAttachments).toEqual([]);
+ expect(result.current.pendingUploads).toEqual([]);
+ });
+
+ test('a batch abandoned by clear() reports nothing for the files it threw away', async () => {
+ const onError = vi.fn();
+ const { result } = renderAttachments(onError);
+
+ let settled: Promise<void> | undefined;
+ act(() => {
+ settled = result.current.ingestFiles([
+ new File(['notes'], 'notes.txt', { type: 'text/plain' }),
+ ]);
+ });
+
+ act(() => {
+ result.current.clear();
+ });
+
+ await act(async () => {
+ await settled;
+ });
+ expect(onError).not.toHaveBeenCalled();
+ expect(result.current.pendingAttachments).toEqual([]);
+ });
+
+ test('a non-image workspace file attaches as a path reference', async () => {
+ const onError = vi.fn();
+ const { result } = renderHook(() =>
+ useComposerAttachments({
+ onError,
+ absPathOf: () => '/tmp/project/notes/readme.md',
+ workspaceContentDir: '/tmp/project',
+ pathSeparator: '/',
+ }),
+ );
+
+ await act(async () => {
+ await result.current.ingestFiles([
+ new File(['hello'], 'readme.md', { type: 'text/markdown' }),
+ ]);
+ });
+
+ expect(result.current.pendingAttachments).toEqual([
+ { kind: 'file', path: 'notes/readme.md', name: 'readme.md' },
+ ]);
+ expect(onError).not.toHaveBeenCalled();
+ });
+
+ test('a file whose bytes cannot be read is reported and skipped', async () => {
+ vi.spyOn(console, 'error').mockImplementation(() => {});
+ const onError = vi.fn();
+ const { result } = renderAttachments(onError);
+ const unreadable = { name: 'broken.png', type: 'image/png', size: 4 } as unknown as File;
+
+ await act(async () => {
+ await result.current.ingestFiles([unreadable, pngFile('after.png')]);
+ });
+
+ await waitFor(() => {
+ expect(result.current.pendingAttachments).toHaveLength(1);
+ });
+ expect(onError).toHaveBeenCalledTimes(1);
+ expect(onError.mock.calls[0]?.[0]).toContain('broken.png');
+ expect(result.current.pendingAttachments[0]).toMatchObject({ name: 'after.png' });
+ });
+
+ test('removeAt removes only the addressed attachment and clear empties the strip', async () => {
+ const { result } = renderAttachments();
+
+ await act(async () => {
+ await result.current.ingestFiles([pngFile('first.png'), pngFile('second.png')]);
+ });
+ await waitFor(() => {
+ expect(result.current.pendingAttachments).toHaveLength(2);
+ });
+
+ act(() => {
+ result.current.removeAt(0);
+ });
+ expect(result.current.pendingAttachments).toHaveLength(1);
+ expect(result.current.pendingAttachments[0]).toMatchObject({ name: 'second.png' });
+
+ act(() => {
+ result.current.clear();
+ });
+ expect(result.current.pendingAttachments).toEqual([]);
+ });
+});
diff --git a/packages/app/src/editor/use-composer-attachments.ts b/packages/app/src/editor/use-composer-attachments.ts
new file mode 100644
index 000000000..233a3b204
--- /dev/null
+++ b/packages/app/src/editor/use-composer-attachments.ts
@@ -0,0 +1,149 @@
+import type { AttachmentPart } from '@inkeep/open-knowledge-core/acp/thread-protocol';
+import { plural } from '@lingui/core/macro';
+import { useLingui } from '@lingui/react/macro';
+import { useRef, useState } from 'react';
+import {
+ attachmentBudgetKb,
+ describeImageError,
+ embeddedAttachmentBytes,
+ fileToAttachment,
+ MAX_TOTAL_ATTACHMENT_BYTES,
+ totalEmbeddedAttachmentBytes,
+} from '@/lib/acp/image-attachment';
+
+export interface UseComposerAttachmentsOptions {
+ readonly absPathOf?: (file: File) => string | null;
+ readonly workspaceContentDir?: string;
+ readonly pathSeparator?: '/' | '\\';
+ readonly onError: (message: string) => void;
+}
+
+interface ComposerPendingUpload {
+ readonly id: string;
+ readonly name: string;
+ readonly mimeType: string;
+}
+
+export interface ComposerAttachments {
+ readonly pendingAttachments: readonly AttachmentPart[];
+ readonly pendingUploads: readonly ComposerPendingUpload[];
+ readonly ingestFiles: (files: readonly File[]) => Promise<void>;
+ readonly removeAt: (index: number) => void;
+ readonly clear: () => void;
+}
+
+export function useComposerAttachments(
+ options: UseComposerAttachmentsOptions,
+): ComposerAttachments {
+ const { t } = useLingui();
+ const [pendingAttachments, setPendingAttachments] = useState<readonly AttachmentPart[]>([]);
+ const [pendingUploads, setPendingUploads] = useState<readonly ComposerPendingUpload[]>([]);
+ const attachmentsRef = useRef<readonly AttachmentPart[]>(pendingAttachments);
+ const generationRef = useRef(0);
+
+ const commit = (next: readonly AttachmentPart[], generation: number): void => {
+ if (generation !== generationRef.current) return;
+ attachmentsRef.current = next;
+ setPendingAttachments(next);
+ };
+
+ const ingestFiles = async (files: readonly File[]): Promise<void> => {
+ const generation = generationRef.current;
+ const report = (message: string): void => {
+ if (generation === generationRef.current) options.onError(message);
+ };
+ const placeholders = files.map((file) => ({
+ id: `${file.name}:${file.size}:${file.lastModified ?? 0}:${Math.random().toString(36).slice(2, 8)}`,
+ name: file.name || 'attachment',
+ mimeType: file.type || '',
+ }));
+ setPendingUploads((previous) => [...previous, ...placeholders]);
+ let outsideWorkspaceCount = 0;
+ let unknownPathCount = 0;
+ let tooLargeTotalCount = 0;
+ for (let i = 0; i < files.length; i += 1) {
+ const file = files[i];
+ const placeholderId = placeholders[i]?.id;
+ if (file === undefined || placeholderId === undefined) continue;
+ try {
+ const outcome = await fileToAttachment(file, {
+ absPathOf: options.absPathOf,
+ workspaceContentDir: options.workspaceContentDir,
+ pathSeparator: options.pathSeparator,
+ });
+ setPendingUploads((previous) => previous.filter((p) => p.id !== placeholderId));
+ if (!outcome.ok) {
+ if (outcome.error.kind === 'outside-workspace') outsideWorkspaceCount += 1;
+ else if (outcome.error.kind === 'unknown-path') unknownPathCount += 1;
+ else report(describeImageError(outcome.error));
+ continue;
+ }
+ const current = attachmentsRef.current;
+ if (
+ totalEmbeddedAttachmentBytes(current) + embeddedAttachmentBytes(outcome.part) >
+ MAX_TOTAL_ATTACHMENT_BYTES
+ ) {
+ tooLargeTotalCount += 1;
+ continue;
+ }
+ commit([...current, outcome.part], generation);
+ } catch (err) {
+ setPendingUploads((previous) => previous.filter((p) => p.id !== placeholderId));
+ const fileName = file.name || 'attachment';
+ console.error('[useComposerAttachments] failed to read attachment', fileName, err);
+ report(t`Couldn't read ${fileName}.`);
+ }
+ }
+ const skipTotal = outsideWorkspaceCount + unknownPathCount;
+ if (skipTotal > 0) {
+ if (unknownPathCount === 0) {
+ report(
+ t`${plural(outsideWorkspaceCount, {
+ one: 'Skipped # file outside the workspace.',
+ other: 'Skipped # files outside the workspace.',
+ })}`,
+ );
+ } else if (outsideWorkspaceCount === 0) {
+ report(
+ t`${plural(unknownPathCount, {
+ one: "Skipped # file — this browser can't attach files by path.",
+ other: "Skipped # files — this browser can't attach files by path.",
+ })}`,
+ );
+ } else {
+ report(
+ t`${plural(skipTotal, {
+ one: "Skipped # file that couldn't be attached.",
+ other: "Skipped # files that couldn't be attached.",
+ })}`,
+ );
+ }
+ }
+ if (tooLargeTotalCount > 0) {
+ const budgetKb = attachmentBudgetKb();
+ report(
+ t`${plural(tooLargeTotalCount, {
+ one: `Skipped # file — attachments can't total more than ${budgetKb} KB per message.`,
+ other: `Skipped # files — attachments can't total more than ${budgetKb} KB per message.`,
+ })}`,
+ );
+ }
+ };
+
+ return {
+ pendingAttachments,
+ pendingUploads,
+ ingestFiles,
+ removeAt: (index: number) => {
+ commit(
+ attachmentsRef.current.filter((_, i) => i !== index),
+ generationRef.current,
+ );
+ },
+ clear: () => {
+ generationRef.current += 1;
+ commit([], generationRef.current);
+ setPendingUploads([]);
+ },
+ };
+}
diff --git a/packages/app/src/lib/acp/agent-display.ts b/packages/app/src/lib/acp/agent-display.ts
new file mode 100644
index 000000000..1364500dc
--- /dev/null
+++ b/packages/app/src/lib/acp/agent-display.ts
@@ -0,0 +1,3 @@
+export function agentDisplayName(name: string): string {
+ return name.replace(/\s+Agent$/i, '');
+}
diff --git a/packages/app/src/lib/acp/image-attachment.dom.test.ts b/packages/app/src/lib/acp/image-attachment.dom.test.ts
index 98425364a..2f5fa613e 100644
--- a/packages/app/src/lib/acp/image-attachment.dom.test.ts
+++ b/packages/app/src/lib/acp/image-attachment.dom.test.ts
@@ -79,15 +79,17 @@ describe('describeImageError', () => {
);
});
- test('too-large names the observed size + limit in MB', () => {
+ test('too-large states the observed size and the per-attachment cap in the same unit, plus a remedy', () => {
const message = describeImageError({
kind: 'too-large',
sizeBytes: 8_000_000,
limitBytes: 5 * 1024 * 1024,
});
expect(message).toContain('too large');
- expect(message).toContain('7.6 MB');
- expect(message).toContain('5.0 MB');
+ expect(message).toContain('7813 KB');
+ expect(message).not.toContain('MB');
+ expect(message).toContain('each attachment is capped at 5120 KB');
+ expect(message).toContain('Crop or resize');
});
});
diff --git a/packages/app/src/lib/acp/image-attachment.ts b/packages/app/src/lib/acp/image-attachment.ts
index 48cd152d1..c74d571b7 100644
--- a/packages/app/src/lib/acp/image-attachment.ts
+++ b/packages/app/src/lib/acp/image-attachment.ts
@@ -1,4 +1,5 @@
import type { AttachmentPart } from '@inkeep/open-knowledge-core/acp/thread-protocol';
+import { t } from '@lingui/core/macro';
export const ALLOWED_IMAGE_MIMES: ReadonlySet<string> = new Set([
'image/png',
@@ -7,7 +8,24 @@ export const ALLOWED_IMAGE_MIMES: ReadonlySet<string> = new Set([
'image/webp',
]);
-export const MAX_IMAGE_BYTES = 700 * 1024;
+const EMBEDDED_ATTACHMENT_BYTE_LIMIT = 700 * 1024;
+
+export const MAX_IMAGE_BYTES = EMBEDDED_ATTACHMENT_BYTE_LIMIT;
+
+export const MAX_TOTAL_ATTACHMENT_BYTES = EMBEDDED_ATTACHMENT_BYTE_LIMIT;
+
+export function embeddedAttachmentBytes(part: AttachmentPart): number {
+ if (part.kind !== 'image' && part.kind !== 'blob') return 0;
+ return part.sizeBytes ?? part.data.length;
+}
+
+export function totalEmbeddedAttachmentBytes(parts: readonly AttachmentPart[]): number {
+ return parts.reduce((sum, part) => sum + embeddedAttachmentBytes(part), 0);
+}
+
+export function attachmentBudgetKb(): number {
+ return Math.round(MAX_TOTAL_ATTACHMENT_BYTES / 1024);
+}
export type ImageAttachmentError =
| { readonly kind: 'unsupported-type'; readonly mimeType: string }
@@ -19,19 +37,24 @@ export type FileAttachmentError = ImageAttachmentError;
export function describeImageError(error: ImageAttachmentError): string {
if (error.kind === 'unsupported-type') {
- if (error.mimeType.startsWith('image/')) {
- return `Only PNG, JPEG, GIF, and WebP images are supported (got ${error.mimeType}).`;
+ const mimeType = error.mimeType;
+ if (mimeType.startsWith('image/')) {
+ return t`Only PNG, JPEG, GIF, and WebP images are supported (got ${mimeType}).`;
}
- return `Unsupported file type: ${error.mimeType || 'unknown'}.`;
+ const fileType = mimeType || 'unknown';
+ return t`Unsupported file type: ${fileType}.`;
}
if (error.kind === 'outside-workspace') {
- return `${error.name} is outside the workspace. Move it into your project first.`;
+ const name = error.name;
+ return t`${name} is outside the workspace. Move it into your project first.`;
}
if (error.kind === 'unknown-path') {
- return `${error.name} has no resolvable path — the agent can only read files inside the workspace.`;
+ const name = error.name;
+ return t`${name} has no resolvable path — the agent can only read files inside the workspace.`;
}
- const mb = (error.limitBytes / (1024 * 1024)).toFixed(1);
- return `File is too large (${(error.sizeBytes / (1024 * 1024)).toFixed(1)} MB) — max ${mb} MB per attachment.`;
+ const limitKb = Math.round(error.limitBytes / 1024);
+ const sizeKb = Math.round(error.sizeBytes / 1024);
+ return t`File is too large (${sizeKb} KB) — each attachment is capped at ${limitKb} KB. Crop or resize it and try again.`;
}
async function encodeImageFile(file: File): Promise<{
diff --git a/packages/app/src/lib/acp/launch-agent-thread.test.ts b/packages/app/src/lib/acp/launch-agent-thread.test.ts
index 58df7202c..f3ba9a4c2 100644
--- a/packages/app/src/lib/acp/launch-agent-thread.test.ts
+++ b/packages/app/src/lib/acp/launch-agent-thread.test.ts
@@ -3,8 +3,26 @@ import { beforeEach, describe, expect, test, vi } from 'vitest';
const createThread = vi.fn();
const toastError = vi.fn((_message: string) => {});
+type StoreListener = () => void;
+const storeListeners = new Set<StoreListener>();
+let threadCapabilities: Record<string, { image?: boolean } | null> = {};
+
+function publishThreadUpdate(): void {
+ for (const listener of storeListeners) listener();
+}
+
vi.mock('@/lib/acp/thread-client', () => ({
- getAgentThreadClient: () => ({ createThread }),
+ getAgentThreadClient: () => ({
+ createThread,
+ subscribe: (listener: StoreListener) => {
+ storeListeners.add(listener);
+ return () => storeListeners.delete(listener);
+ },
+ getThread: (threadId: string) =>
+ threadId in threadCapabilities
+ ? { info: { promptCapabilities: threadCapabilities[threadId] } }
+ : null,
+ }),
ThreadChannelUnavailableError: class extends Error {},
}));
vi.mock('@/lib/acp/thread-draft-staging', () => ({ stageThreadDraft: vi.fn() }));
@@ -32,9 +50,22 @@ function deferred<T>(): {
return { promise, resolve, reject };
}
+function startedThread(threadId: string, agentName = 'Claude Agent') {
+ return { threadId, agent: { source: 'registry', id: 'claude-acp', name: agentName } };
+}
+
+const imagePart = {
+ kind: 'image' as const,
+ data: 'AAAA',
+ mimeType: 'image/png',
+ name: 'shot.png',
+};
+
beforeEach(() => {
createThread.mockReset();
toastError.mockClear();
+ storeListeners.clear();
+ threadCapabilities = {};
});
describe('launchAgentThread dedup guard', () => {
@@ -85,3 +116,63 @@ describe('launchAgentThread dedup guard', () => {
expect(await launchAgentThread(agent, 'prompt', null, null)).toBe('started');
});
});
+
+describe('a launch carrying images the agent turns out not to accept', () => {
+ test('says so once the handshake reports the capability, instead of dropping it silently', async () => {
+ createThread.mockResolvedValueOnce(startedThread('cap-1'));
+ await launchAgentThread(nextAgent(), 'describe this', null, null, null, [imagePart]);
+
+ expect(toastError).not.toHaveBeenCalled();
+
+ threadCapabilities['cap-1'] = {};
+ publishThreadUpdate();
+
+ expect(toastError).toHaveBeenCalledTimes(1);
+ expect(toastError.mock.calls[0]?.[0]).toContain("doesn't accept image attachments");
+ expect(toastError.mock.calls[0]?.[0]).toContain('Claude');
+ });
+
+ test('stays quiet when the agent does accept images', async () => {
+ createThread.mockResolvedValueOnce(startedThread('cap-2'));
+ await launchAgentThread(nextAgent(), 'describe this', null, null, null, [imagePart]);
+
+ threadCapabilities['cap-2'] = { image: true };
+ publishThreadUpdate();
+
+ expect(toastError).not.toHaveBeenCalled();
+ expect(storeListeners.size).toBe(0);
+ });
+
+ test('gives up the watch after the timeout, leaving no listener behind', async () => {
+ vi.useFakeTimers();
+ const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
+ try {
+ createThread.mockResolvedValueOnce(startedThread('cap-timeout'));
+ await launchAgentThread(nextAgent(), 'describe this', null, null, null, [imagePart]);
+ expect(storeListeners.size).toBe(1);
+
+ vi.advanceTimersByTime(60_000);
+
+ expect(storeListeners.size).toBe(0);
+ expect(warnSpy).toHaveBeenCalledTimes(1);
+
+ threadCapabilities['cap-timeout'] = {};
+ publishThreadUpdate();
+ expect(toastError).not.toHaveBeenCalled();
+ } finally {
+ warnSpy.mockRestore();
+ vi.useRealTimers();
+ }
+ });
+
+ test('never watches a launch that carried no images', async () => {
+ createThread.mockResolvedValueOnce(startedThread('cap-3'));
+ await launchAgentThread(nextAgent(), 'no attachments here', null, null);
+
+ expect(storeListeners.size).toBe(0);
+
+ threadCapabilities['cap-3'] = {};
+ publishThreadUpdate();
+ expect(toastError).not.toHaveBeenCalled();
+ });
+});
diff --git a/packages/app/src/lib/acp/launch-agent-thread.ts b/packages/app/src/lib/acp/launch-agent-thread.ts
index ab777d59b..13c1bf82e 100644
--- a/packages/app/src/lib/acp/launch-agent-thread.ts
+++ b/packages/app/src/lib/acp/launch-agent-thread.ts
@@ -1,13 +1,49 @@
-import type { AttachmentPart } from '@inkeep/open-knowledge-core/acp/thread-protocol';
+import type { AttachmentPart, ThreadInfo } from '@inkeep/open-knowledge-core/acp/thread-protocol';
import { t } from '@lingui/core/macro';
import { toast } from 'sonner';
+import { agentDisplayName } from '@/lib/acp/agent-display';
import { getAgentThreadClient, ThreadChannelUnavailableError } from '@/lib/acp/thread-client';
import { stageThreadDraft } from '@/lib/acp/thread-draft-staging';
const inflightLaunches = new Set<string>();
+const IMAGE_CAPABILITY_WATCH_MS = 60_000;
export type ThreadLaunchOutcome = 'started' | 'deduped' | 'failed';
+function warnWhenLaunchedImagesAreUnsupported(
+ info: ThreadInfo,
+ attachments: readonly AttachmentPart[] | undefined,
+): void {
+ if (attachments === undefined || !attachments.some((part) => part.kind === 'image')) return;
+ const client = getAgentThreadClient();
+ const agentName = agentDisplayName(info.agent.name);
+ let unsubscribe: (() => void) | null = null;
+ const timer = setTimeout(() => {
+ if (unsubscribe !== null) {
+ console.warn(
+ '[agent-threads] image capability still unknown for',
+ info.threadId,
+ 'after the watch window — skipping the attachment warning',
+ );
+ }
+ unsubscribe?.();
+ unsubscribe = null;
+ }, IMAGE_CAPABILITY_WATCH_MS);
+ const check = (): void => {
+ if (unsubscribe === null) return;
+ const capabilities = client.getThread(info.threadId)?.info.promptCapabilities;
+ if (capabilities === null || capabilities === undefined) return;
+ clearTimeout(timer);
+ unsubscribe();
+ unsubscribe = null;
+ if (capabilities.image !== true) {
+ toast.error(t`${agentName} doesn't accept image attachments.`);
+ }
+ };
+ unsubscribe = client.subscribe(check);
+ check();
+}
+
export function launchAgentThread(
agent: { source: 'registry' | 'custom'; id: string },
prompt: string | null,
@@ -28,6 +64,7 @@ export function launchAgentThread(
...(attachments !== undefined && attachments.length > 0 ? { attachments } : {}),
})
.then((info) => {
+ warnWhenLaunchedImagesAreUnsupported(info, attachments);
if (stageDraft != null) {
try {
stageThreadDraft(info.threadId, stageDraft);
diff --git a/packages/app/src/lib/note-window-main-actions.dom.test.ts b/packages/app/src/lib/note-window-main-actions.dom.test.ts
index 93c62209f..c7a9b3ff1 100644
--- a/packages/app/src/lib/note-window-main-actions.dom.test.ts
+++ b/packages/app/src/lib/note-window-main-actions.dom.test.ts
@@ -44,6 +44,7 @@ describe('note-window main action routing', () => {
prompt: 'Review this note',
docName: 'notes/alpha',
titleHint: 'Review',
+ attachments: null,
});
requestTerminalLaunch('Review this note', 'codex', { stage: false });
diff --git a/packages/app/src/locales/ar/messages.json b/packages/app/src/locales/ar/messages.json
index c73f1298a..8a4c88b0c 100644
--- a/packages/app/src/locales/ar/messages.json
+++ b/packages/app/src/locales/ar/messages.json
@@ -919,6 +919,7 @@
],
"9fhQRL": ["قناة بيتا"],
"9fvog2": ["المعاينة غير متاحة: ", ["errorDetail"]],
+ "9gu0n7": ["نوع ملف غير مدعوم: ", ["fileType"], "."],
"9hEdtC": [
"تعلّم هذه أدواتِك كيفية العمل مع OpenKnowledge. وهي موجودة في مجلد المشروع، لذا تُثبَّت لكل من يفتح المشروع."
],
@@ -1475,6 +1476,7 @@
"FjkaiT": ["تصغير"],
"Fjz6aJ": ["إرسال إلى محادثة جديدة"],
"FqGWeR": ["تعذّر الوصول إلى سجل الوكلاء."],
+ "FqMKq2": ["لا تُدعم سوى صور PNG وJPEG وGIF وWebP (تم استلام ", ["mimeType"], ")."],
"FqTpiN": ["ويكي الطيور"],
"Fqr8BP": [
"عارض PDF متعدد الصفحات بعناصر تحكم في شريط الأدوات (صور مصغّرة، تنقل بين الصفحات، تكبير)."
@@ -1517,6 +1519,7 @@
"G7-rf8": ["خطأ في صيغة النمط: ", ["message"]],
"G7bn_N": ["تشغيل وكيل"],
"G7cMuO": ["معاينة HTML"],
+ "G7gMiG": [["0"], " يعمل في الطرفية ولا يقبل المرفقات — اختر وكيلًا داخل التطبيق بدلًا من ذلك."],
"G8t9NN": ["إضافة خاصية"],
"GA-UkN": ["نوع ", ["keyName"], ": ", ["typeLabel"], ". انقر للتغيير."],
"GAohqx": ["حذف العمود"],
@@ -1577,6 +1580,7 @@
"GemPfn": ["فشل تحليل استجابة خطأ الروابط الصادرة (HTTP ", ["status"], ")"],
"Gfr4fu": ["لا يستطيع الخادم فتح المستندات"],
"GhjUB_": ["أُعيد الاتصال"],
+ "Gi8Akx": ["لم يُعدّ أي وكيل بعد — لإرفاق الملفات، أضف وكيلًا داخل التطبيق من «اتصالات الوكلاء»."],
"GidGkh": ["التحديث من المصدر"],
"GifIjR": [
"لم يتم تثبيت المهارة «",
@@ -1841,6 +1845,7 @@
"تعذّر على OpenKnowledge قراءة terminal.shell في .ok/local/config.yml. سيتم استخدام صدفة Windows متاحة بدلًا منها."
],
"K9J00P": ["فشل الاستنساخ — خطأ في الاتصال"],
+ "K9ViCA": [["name"], " خارج مساحة العمل. انقله إلى مشروعك أولًا."],
"KDrbNG": ["بحث OpenKnowledge عن روابط ", ["subject"]],
"KDuPiY": ["يجري رفع ", ["fileName"]],
"KDw4GX": ["أعد المحاولة"],
@@ -1868,6 +1873,13 @@
"KZLdgR": ["راجع <0>#design-docs</0> لأحدث المواصفات."],
"K_vT1F": ["المزامنة مع المصدر البعيد"],
"KaFCD3": ["افتح هذا الرابط في تبويب جديد واطوِ الرسم البياني."],
+ "Kb08WL": [
+ "الملف كبير جدًا (",
+ ["sizeKb"],
+ " KB) — الحد الأقصى لكل مرفق ",
+ ["limitKb"],
+ " KB. قص الملف أو صغّر حجمه ثم أعد المحاولة."
+ ],
"Kbz9RK": ["رقم المنفذ الثابت"],
"Kdvukk": ["لا تنطبق فحوصات Markdown على هذا الملف."],
"KeXgA-": ["تعذر العثور على ذلك المقطع — ربما تغير النص الذي كان عليه."],
@@ -2065,6 +2077,20 @@
"M92_0q": ["إغلاق التعليق"],
"M9597s": ["يجري تحضير رابط المشاركة..."],
"MBKkUy": ["skills.sh غير متاح؛ تُعرض نتائج GitHub (بلا ترتيب حسب التثبيت)."],
+ "MBfjUk": [
+ [
+ "0",
+ "plural",
+ {
+ "zero": ["لا مرفقات يجري رفعها"],
+ "one": ["يجري رفع مرفق واحد"],
+ "two": ["يجري رفع مرفقين"],
+ "few": ["يجري رفع ", "#", " مرفقات"],
+ "many": ["يجري رفع ", "#", " مرفقًا"],
+ "other": ["يجري رفع ", "#", " مرفق"]
+ }
+ ]
+ ],
"MCjC9A": ["حذف ", ["deleteDescriptorLabel"]],
"MDBJwN": ["صعب الاستخدام"],
"MDZSJe": ["متى ينفّذ الوكيل عمله المجدول."],
@@ -2636,6 +2662,7 @@
}
]
],
+ "SgAFuo": ["لا يمكن إرفاق الملفات هنا."],
"SgKLfA": ["غير متصل بـ GitHub."],
"Sh3Qkg": ["لا توجد فروع مطابقة."],
"Si7mIR": ["إنشاء تقرير"],
@@ -3549,6 +3576,7 @@
"أثناء تسجيل خروجك، يجري التحقق من التحديثات كل 3 دقائق على الأكثر بغض النظر عن هذا الإعداد."
],
"cIptmH": ["في تطبيق Claude Desktop"],
+ "cK5W4m": [["0"], " يفتح عبر رابط ولا يقبل المرفقات — اختر وكيلًا داخل التطبيق بدلًا من ذلك."],
"cLP0Lf": ["مصدر مهارة بعيد"],
"cLn264": ["تعذّرت قراءة ملف السمة هذا"],
"cMMb6H": ["تم تثبيت ", ["imported"], "، لكن فشل ", ["failed"], ": ", ["failedNames"]],
@@ -3653,6 +3681,20 @@
"d6qW27": [["agentName"], " أبلغ: ", ["headline"]],
"dCforW": ["فشلت كتابة هذا الملف. راجع سجل OpenKnowledge لمعرفة السبب."],
"dD7NPy": ["المخطط"],
+ "dDBZ0j": [
+ [
+ "0",
+ "plural",
+ {
+ "zero": ["لا مرفقات جاهزة للإرسال"],
+ "one": ["مرفق واحد جاهز للإرسال"],
+ "two": ["مرفقان جاهزان للإرسال"],
+ "few": ["#", " مرفقات جاهزة للإرسال"],
+ "many": ["#", " مرفقًا جاهزًا للإرسال"],
+ "other": ["#", " مرفق جاهز للإرسال"]
+ }
+ ]
+ ],
"dDpCOp": ["نجحت إعادة التسمية لكن الشريط الجانبي قد يكون قديمًا — حدّث لإعادة المزامنة"],
"dEgA5A": ["إلغاء"],
"dFrqBg": ["مكوّن ", ["0"], " الإضافي"],
@@ -3671,6 +3713,52 @@
"dOHMA0": ["فشل النقل"],
"dOxPd4": ["حاشية"],
"dQHSCs": ["تحويل (حذف الأصل)"],
+ "dRCAgQ": [
+ [
+ "tooLargeTotalCount",
+ "plural",
+ {
+ "zero": [
+ "تم تخطي ",
+ "#",
+ " ملف — لا يمكن أن يتجاوز إجمالي المرفقات ",
+ ["budgetKb"],
+ " KB لكل رسالة."
+ ],
+ "one": [
+ "تم تخطي ملف — لا يمكن أن يتجاوز إجمالي المرفقات ",
+ ["budgetKb"],
+ " KB لكل رسالة."
+ ],
+ "two": [
+ "تم تخطي ملفين — لا يمكن أن يتجاوز إجمالي المرفقات ",
+ ["budgetKb"],
+ " KB لكل رسالة."
+ ],
+ "few": [
+ "تم تخطي ",
+ "#",
+ " ملفات — لا يمكن أن يتجاوز إجمالي المرفقات ",
+ ["budgetKb"],
+ " KB لكل رسالة."
+ ],
+ "many": [
+ "تم تخطي ",
+ "#",
+ " ملفًا — لا يمكن أن يتجاوز إجمالي المرفقات ",
+ ["budgetKb"],
+ " KB لكل رسالة."
+ ],
+ "other": [
+ "تم تخطي ",
+ "#",
+ " ملف — لا يمكن أن يتجاوز إجمالي المرفقات ",
+ ["budgetKb"],
+ " KB لكل رسالة."
+ ]
+ }
+ ]
+ ],
"dSORvE": ["يوقف التشغيل الحالي ويرسل هذا بدلاً منه"],
"dT-HIQ": ["مراجع مباشرة كثيرة جدًا في هذه الصفحة. لم يتم تحميل هذه اللوحة."],
"dTaauv": ["السبب: ", ["reason"]],
@@ -4940,6 +5028,10 @@
"q63KUv": ["إضافة MCP ومهارة"],
"q7F5am": ["العنوان"],
"q8aCbb": ["نسختان من «", ["0"], "» — المصدر مقابل ", ["editor"]],
+ "q8tKSU": [
+ ["name"],
+ " ليس له مسار يمكن تحديده — لا يستطيع الوكيل قراءة سوى الملفات الموجودة داخل مساحة العمل."
+ ],
"qAQVSD": ["لم تكن استجابة عناوين الصفحة بصيغة JSON"],
"qAhFeg": [
["userName"],
@@ -4980,6 +5072,7 @@
"qTT48-": [
"روابط Wiki مثل [[Page]] — طريقة مدعومة للربط هنا، لكن القارئ الخارجي لا يحل أي شيء ويعرض الأقواس."
],
+ "qTULIf": ["لا يقبل هذا الوكيل المرفقات — أزلها أو اختر وكيلًا داخل التطبيق."],
"qTcVwj": ["استعرض أو ارفع مهارة لهذا المشروع."],
"qTcZZu": ["فشل تحميل الوسوم. اضغط <0>Esc</0> وأعد الفتح للمحاولة مرة أخرى."],
"qX-ABr": ["أو لاستخدام تسجيل الدخول عبر المتصفح بدلًا من ذلك:"],
@@ -5057,6 +5150,7 @@
],
"rJVoVX": ["نتائج بحث المصدر"],
"rJm8-2": ["تعذّر الوصول إلى الحافظة — السمة موجودة في المربع أدناه."],
+ "rNi1kZ": ["لا يمكن إرفاق المجلدات والملفات الفارغة — أفلت الملفات نفسها."],
"rNifQd": ["إزالة الخاصية"],
"rQAQus": ["تعذّر حفظ القالب: ", ["error"]],
"rQRrkB": ["أمس"],
@@ -5493,6 +5587,9 @@
"vPLUCm": ["الصورة ", ["identity"], " مفقودة. انتقل إلى المرجع."],
"vPXOUw": ["تبديل عرض المصدر"],
"vQIVHc": ["خصائص المجلد"],
+ "vQOuVY": [
+ "المرفقات غير متاحة بعد في نوافذ الملاحظات — استخدم النافذة الرئيسية لإرفاق الملفات."
+ ],
"vUP_HF": [
"بدون أداة ذكاء اصطناعي متصلة، لن يتم تثبيت ",
[
diff --git a/packages/app/src/locales/ar/messages.po b/packages/app/src/locales/ar/messages.po
index 16191291b..5e57209b6 100644
--- a/packages/app/src/locales/ar/messages.po
+++ b/packages/app/src/locales/ar/messages.po
@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid " · references only (no embedded contents)"
msgstr " · مراجع فقط (بدون محتوى مضمن)"
@@ -146,6 +146,12 @@ msgstr "(قد يكون بعضها مخفيًا بالفعل بقواعد أخر
msgid "(symlink)"
msgstr "(رابط رمزي)"
+#. placeholder {0}: pendingAttachments.length
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+msgstr "{0, plural, zero {لا مرفقات جاهزة للإرسال} one {مرفق واحد جاهز للإرسال} two {مرفقان جاهزان للإرسال} few {# مرفقات جاهزة للإرسال} many {# مرفقًا جاهزًا للإرسال} other {# مرفق جاهز للإرسال}}"
+
#. placeholder {0}: preview.backlinkCount
#: src/editor/link-preview/InternalDocPreviewCard.tsx
msgid "{0, plural, one {# backlink} other {# backlinks}}"
@@ -260,6 +266,13 @@ msgstr "{0, plural, zero {إضافات} one {إضافة} two {إضافتان} fe
msgid "{0, plural, one {Skill} other {Skills}}"
msgstr "{0, plural, zero {مهارات} one {مهارة} two {مهارتان} few {مهارات} many {مهارةً} other {مهارة}}"
+#. placeholder {0}: pendingUploads.length
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+msgstr "{0, plural, zero {لا مرفقات يجري رفعها} one {يجري رفع مرفق واحد} two {يجري رفع مرفقين} few {يجري رفع # مرفقات} many {يجري رفع # مرفقًا} other {يجري رفع # مرفق}}"
+
#. placeholder {0}: sibling.name
#: src/lib/acp/config-value-hints.ts
msgid "{0} · default"
@@ -353,6 +366,12 @@ msgstr "تم تحديد {0} من {1} مشروع"
msgid "{0} of {1} selected"
msgstr "تم تحديد {0} من {1}"
+#. placeholder {0}: resolvedTarget.displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} يفتح عبر رابط ولا يقبل المرفقات — اختر وكيلًا داخل التطبيق بدلًا من ذلك."
+
#. placeholder {0}: siblings.length
#: src/components/SkillPluginBundleBanner.tsx
msgid "{0} other skills by this publisher"
@@ -381,6 +400,12 @@ msgstr "خصائص {0}"
msgid "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
msgstr "يقرأ {0} هذه المهارة عبر {poolRootRel}. انقر لإيقاف حصول {1} على «{2}» — يحتفظ {subRoot} بمهاراته الأخرى لكنه يتوقف عن متابعة {poolRootRel}."
+#. placeholder {0}: TERMINAL_CLIS[selection.cli].displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} يعمل في الطرفية ولا يقبل المرفقات — اختر وكيلًا داخل التطبيق بدلًا من ذلك."
+
#. placeholder {0}: formatToolList( [f.host, ...following.map((o) => o.host)].map(hostLabel), i18n.locale, )
#: src/components/settings/SkillTargetsPicker.tsx
msgid "{0} share this folder."
@@ -510,6 +535,7 @@ msgid "{agentName} couldn't start."
msgstr "تعذّر تشغيل {agentName}."
#: src/components/acp/ThreadView.tsx
+#: src/lib/acp/launch-agent-thread.ts
msgid "{agentName} doesn't accept image attachments."
msgstr "{agentName} لا يقبل مرفقات الصور."
@@ -860,6 +886,14 @@ msgstr "قبل {minutes} دقيقة"
msgid "{name} CLI"
msgstr "واجهة {name} السطرية"
+#: src/lib/acp/image-attachment.ts
+msgid "{name} has no resolvable path — the agent can only read files inside the workspace."
+msgstr "{name} ليس له مسار يمكن تحديده — لا يستطيع الوكيل قراءة سوى الملفات الموجودة داخل مساحة العمل."
+
+#: src/lib/acp/image-attachment.ts
+msgid "{name} is outside the workspace. Move it into your project first."
+msgstr "{name} خارج مساحة العمل. انقله إلى مشروعك أولًا."
+
#: src/components/GraphPanel.tsx
msgid "{nodeCount, plural, one {# node} other {# nodes}}"
msgstr "{nodeCount, plural, zero {# عقدة} one {عقدة واحدة} two {عقدتان} few {# عقد} many {# عقدةً} other {# عقدة}}"
@@ -873,6 +907,7 @@ msgid "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
msgstr "{openedWorktreeCount, plural, zero {أشجار عمل} one {شجرة عمل} two {شجرتا عمل} few {أشجار عمل} many {شجرة عمل} other {شجرة عمل}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
msgstr "{outsideWorkspaceCount, plural, zero {تم تخطي # ملف خارج مساحة العمل.} one {تم تخطي ملف خارج مساحة العمل.} two {تم تخطي ملفين خارج مساحة العمل.} few {تم تخطي # ملفات خارج مساحة العمل.} many {تم تخطي # ملفًا خارج مساحة العمل.} other {تم تخطي # ملف خارج مساحة العمل.}}"
@@ -975,6 +1010,7 @@ msgid "{skillCount, plural, one {skill} other {skills}}"
msgstr "{skillCount, plural, zero {مهارات} one {مهارة} two {مهارتان} few {مهارات} many {مهارةً} other {مهارة}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
msgstr "{skipTotal, plural, zero {تم تخطي # ملف تعذر إرفاقه.} one {تم تخطي ملف تعذر إرفاقه.} two {تم تخطي ملفين تعذر إرفاقهما.} few {تم تخطي # ملفات تعذر إرفاقها.} many {تم تخطي # ملفًا تعذر إرفاقه.} other {تم تخطي # ملف تعذر إرفاقه.}}"
@@ -1019,6 +1055,11 @@ msgstr "{templateCount, plural, zero {قوالب} one {قالب} two {قالبا
msgid "{tokens, plural, one {token} other {tokens}}"
msgstr "{tokens, plural, zero {رموز} one {رمز} two {رمزان} few {رموز} many {رمزًا} other {رمز}}"
+#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
+msgid "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+msgstr "{tooLargeTotalCount, plural, zero {تم تخطي # ملف — لا يمكن أن يتجاوز إجمالي المرفقات {budgetKb} KB لكل رسالة.} one {تم تخطي ملف — لا يمكن أن يتجاوز إجمالي المرفقات {budgetKb} KB لكل رسالة.} two {تم تخطي ملفين — لا يمكن أن يتجاوز إجمالي المرفقات {budgetKb} KB لكل رسالة.} few {تم تخطي # ملفات — لا يمكن أن يتجاوز إجمالي المرفقات {budgetKb} KB لكل رسالة.} many {تم تخطي # ملفًا — لا يمكن أن يتجاوز إجمالي المرفقات {budgetKb} KB لكل رسالة.} other {تم تخطي # ملف — لا يمكن أن يتجاوز إجمالي المرفقات {budgetKb} KB لكل رسالة.}}"
+
#: src/components/file-tree-problem-indicators.ts
msgid "{total, plural, one {# problem} other {# problems}}"
msgstr "{total, plural, zero {# مشكلة} one {# مشكلة} two {# مشكلتان} few {# مشكلات} many {# مشكلة} other {# مشكلة}}"
@@ -1028,6 +1069,7 @@ msgid "{truncatedShownCount, plural, one {Showing the first item in one folder
msgstr "{truncatedShownCount, plural, zero {يجري عرض أول {formattedCount} عنصر في مجلد واحد — بقية ذلك المجلد مخفية.} one {يجري عرض أول عنصر في مجلد واحد — بقية ذلك المجلد مخفية.} two {يجري عرض أول عنصرين في مجلد واحد — بقية ذلك المجلد مخفية.} few {يجري عرض أول {formattedCount} عناصر في مجلد واحد — بقية ذلك المجلد مخفية.} many {يجري عرض أول {formattedCount} عنصرًا في مجلد واحد — بقية ذلك المجلد مخفية.} other {يجري عرض أول {formattedCount} عنصر في مجلد واحد — بقية ذلك المجلد مخفية.}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
msgstr "{unknownPathCount, plural, zero {تم تخطي # ملف — لا يمكن لهذا المتصفح إرفاق الملفات عبر المسار.} one {تم تخطي ملف — لا يمكن لهذا المتصفح إرفاق الملفات عبر المسار.} two {تم تخطي ملفين — لا يمكن لهذا المتصفح إرفاق الملفات عبر المسار.} few {تم تخطي # ملفات — لا يمكن لهذا المتصفح إرفاق الملفات عبر المسار.} many {تم تخطي # ملفًا — لا يمكن لهذا المتصفح إرفاق الملفات عبر المسار.} other {تم تخطي # ملف — لا يمكن لهذا المتصفح إرفاق الملفات عبر المسار.}}"
@@ -2072,7 +2114,7 @@ msgstr "اقتراحات الأصول"
msgid "Asset: {title}"
msgstr "الأصل: {title}"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid "Attach a file"
msgstr "إرفاق ملف"
@@ -2085,6 +2127,10 @@ msgstr "إرفاق صور"
msgid "Attachments"
msgstr "المرفقات"
+#: src/components/BottomComposer.tsx
+msgid "Attachments aren't available in note windows yet — use the main window to attach files."
+msgstr "المرفقات غير متاحة بعد في نوافذ الملاحظات — استخدم النافذة الرئيسية لإرفاق الملفات."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Attachments must total under 3 MB."
@@ -4052,6 +4098,7 @@ msgid "Couldn't reach the Open Knowledge server to upload {fileName}."
msgstr "تعذّر الوصول إلى خادم Open Knowledge لرفع {fileName}."
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "Couldn't read {fileName}."
msgstr "تعذّرت قراءة {fileName}."
@@ -6042,6 +6089,10 @@ msgstr "منطقة إفلات الملفات"
msgid "File duplicated"
msgstr "تم تكرار الملف"
+#: src/lib/acp/image-attachment.ts
+msgid "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+msgstr "الملف كبير جدًا ({sizeKb} KB) — الحد الأقصى لكل مرفق {limitKb} KB. قص الملف أو صغّر حجمه ثم أعد المحاولة."
+
#: src/components/NewItemDialog.tsx
msgid "File name"
msgstr "اسم الملف"
@@ -6243,6 +6294,13 @@ msgstr "تم نسخ رابط مشاركة المجلد."
msgid "Folder target: {linkTitle}. Click to open the overview."
msgstr "الوجهة المجلدية: {linkTitle}. انقر لفتح النظرة العامة."
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "Folders and empty files can't be attached — drop the files themselves."
+msgstr "لا يمكن إرفاق المجلدات والملفات الفارغة — أفلت الملفات نفسها."
+
#: src/components/acp/ThreadView.tsx
msgid "Follow the agent's edits"
msgstr "تابع تعديلات الوكيل"
@@ -8632,6 +8690,11 @@ msgstr "لم يُعدّ أي وكيل بعد — اختر واحدًا من قا
msgid "no agents — saved, not installed anywhere"
msgstr "بدون وكلاء — تُحفظ ولا تُثبَّت في أي مكان"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+msgstr "لم يُعدّ أي وكيل بعد — لإرفاق الملفات، أضف وكيلًا داخل التطبيق من «اتصالات الوكلاء»."
+
#: src/components/settings/AgentConnectionsSection.tsx
msgid "No agents available."
msgstr "لا يوجد وكلاء متاحون."
@@ -9201,6 +9264,10 @@ msgstr "أنا فقط"
msgid "Only modified"
msgstr "المعدَّل فقط"
+#: src/lib/acp/image-attachment.ts
+msgid "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+msgstr "لا تُدعم سوى صور PNG وJPEG وGIF وWebP (تم استلام {mimeType})."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Only PNG, JPEG, or WebP images are allowed."
@@ -10869,7 +10936,7 @@ msgstr "إزالة"
#. placeholder {0}: file.name
#. placeholder {0}: image.name
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/PendingImageStrip.tsx
#: src/components/ImageAttachments.tsx
msgid "Remove {0}"
msgstr "إزالة {0}"
@@ -13773,6 +13840,11 @@ msgstr "شُورك هذا {targetNoun} من الفرع <0>{shareBranch}</0>. و
msgid "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
msgstr "شُورك هذا {targetNoun} من الفرع <0>{shareBranch}</0>. وأنت حاليًا على <1>{currentLabel}</1>."
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "This agent doesn't accept attachments — remove them or choose an in-app agent."
+msgstr "لا يقبل هذا الوكيل المرفقات — أزلها أو اختر وكيلًا داخل التطبيق."
+
#: src/editor/composer-mention/ComposerSlashMenu.tsx
msgid "This agent doesn't offer slash commands"
msgstr "هذا الوكيل لا يقدم أوامر الشرطة المائلة"
@@ -13828,6 +13900,12 @@ msgstr "يمكن ضبط هذا في الإعدادات > أدوات الذكاء
msgid "This comment is on the whole property"
msgstr "هذا التعليق على الخاصية بأكملها"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "This composer doesn't accept attachments."
+msgstr "لا يمكن إرفاق الملفات هنا."
+
#: src/components/DiffViewBoundary.tsx
msgid "This conflict is resolved."
msgstr "تم حل هذا التعارض."
@@ -14654,6 +14732,10 @@ msgstr "تعذّر حل الملف {identity}. انتقل إلى المرجع."
msgid "Unresolvable image {identity}. Go to reference."
msgstr "تعذّر حل الصورة {identity}. انتقل إلى المرجع."
+#: src/lib/acp/image-attachment.ts
+msgid "Unsupported file type: {fileType}."
+msgstr "نوع ملف غير مدعوم: {fileType}."
+
#: src/components/BugReportHistory.tsx
msgid "Untitled report"
msgstr "تقرير بلا عنوان"
@@ -14794,6 +14876,7 @@ msgstr "رُفع باسم «{0}» — الاسم «{1}» كان مأخوذًا."
msgid "Uploading"
msgstr "يجري الرفع"
+#: src/components/acp/PendingImageStrip.tsx
#: src/editor/image-upload/index.ts
msgid "Uploading {fileName}"
msgstr "يجري رفع {fileName}"
diff --git a/packages/app/src/locales/bn/messages.json b/packages/app/src/locales/bn/messages.json
index 4672748e2..f5cf3ae0d 100644
--- a/packages/app/src/locales/bn/messages.json
+++ b/packages/app/src/locales/bn/messages.json
@@ -787,6 +787,7 @@
],
"9fhQRL": ["বিটা চ্যানেল"],
"9fvog2": ["প্রাকদর্শন অনুপলব্ধ: ", ["errorDetail"]],
+ "9gu0n7": ["অসমর্থিত ফাইলের ধরন: ", ["fileType"], "।"],
"9hEdtC": [
"এটি আপনার AI টুলকে OpenKnowledge-এর সঙ্গে কাজ করতে শেখায়। এটি প্রকল্প ফোল্ডারে থাকে, তাই যিনিই প্রকল্প খুলবেন তাঁর জন্য ইনস্টল হয়।"
],
@@ -1268,6 +1269,7 @@
"FjkaiT": ["ছোট করুন"],
"Fjz6aJ": ["নতুন চ্যাটে পাঠান"],
"FqGWeR": ["এজেন্ট রেজিস্ট্রির নাগাল পাওয়া যায়নি।"],
+ "FqMKq2": ["শুধু PNG, JPEG, GIF ও WebP ছবি সমর্থিত (", ["mimeType"], " পাওয়া গেছে)।"],
"FqTpiN": ["পাখি উইকি"],
"Fqr8BP": ["টুলবার নিয়ন্ত্রণসহ বহু-পাতার PDF দর্শক (থাম্বনেইল, পাতা নেভিগেশন, জুম)।"],
"Fqx38P": ["কী বাধা হয়ে দাঁড়িয়েছিল?"],
@@ -1297,6 +1299,7 @@
"G7-rf8": ["প্যাটার্নের বাক্যরীতি ত্রুটি: ", ["message"]],
"G7bn_N": ["একটি এজেন্ট শুরু করুন"],
"G7cMuO": ["HTML প্রাকদর্শন"],
+ "G7gMiG": [["0"], " টার্মিনালে চলে এবং সংযুক্তি গ্রহণ করে না — এর বদলে অ্যাপের ভেতরের এজেন্ট বেছে নিন।"],
"G8t9NN": ["একটি প্রপার্টি যোগ করুন"],
"GA-UkN": [["keyName"], " ধরন: ", ["typeLabel"], "। বদলাতে ক্লিক করুন।"],
"GAohqx": ["কলাম মুছুন"],
@@ -1351,6 +1354,9 @@
"GemPfn": ["বহির্গামী লিংকের ত্রুটি সাড়া পড়তে ব্যর্থ (HTTP ", ["status"], ")"],
"Gfr4fu": ["সার্ভার নথি খুলতে পারছে না"],
"GhjUB_": ["পুনরায় যুক্ত হয়েছে"],
+ "Gi8Akx": [
+ "এখনও কোনো এজেন্ট সেট আপ করা নেই — ফাইল সংযুক্ত করতে «এজেন্ট সংযোগ» থেকে অ্যাপের ভেতরের একটি এজেন্ট যোগ করুন।"
+ ],
"GidGkh": ["উৎস থেকে হালনাগাদ করুন"],
"GifIjR": [
"“",
@@ -1574,6 +1580,7 @@
"OpenKnowledge .ok/local/config.yml-এ terminal.shell পড়তে পারেনি। পরিবর্তে একটি উপলভ্য Windows শেল ব্যবহার করা হচ্ছে।"
],
"K9J00P": ["ক্লোন ব্যর্থ — সংযোগ ত্রুটি"],
+ "K9ViCA": [["name"], " ওয়ার্কস্পেসের বাইরে আছে। আগে এটি আপনার প্রকল্পে সরান।"],
"KDrbNG": ["OpenKnowledge ", ["subject"], " এর লিংক খুঁজেছে"],
"KDuPiY": [["fileName"], " আপলোড করা হচ্ছে"],
"KDw4GX": ["আবার চেষ্টা করুন"],
@@ -1603,6 +1610,13 @@
"KZLdgR": ["সর্বশেষ স্পেকের জন্য <0>#design-docs</0> দেখুন।"],
"K_vT1F": ["আপস্ট্রিম সিঙ্ক"],
"KaFCD3": ["এই লিংকটি নতুন ট্যাবে খুলুন এবং গ্রাফ গুটিয়ে নিন।"],
+ "Kb08WL": [
+ "ফাইলটি খুব বড় (",
+ ["sizeKb"],
+ " KB) — প্রতিটি সংযুক্তির সীমা ",
+ ["limitKb"],
+ " KB। ফাইলটি ক্রপ করুন বা আকার ছোট করে আবার চেষ্টা করুন।"
+ ],
"Kbz9RK": ["নির্দিষ্ট পোর্ট নম্বর"],
"Kdvukk": ["Markdown যাচাই এই ফাইলে প্রযোজ্য নয়।"],
"KeXgA-": ["সেই অংশটি খুঁজে পাওয়া যায়নি — এটি যে লেখায় ছিল তা পরিবর্তিত হয়ে থাকতে পারে।"],
@@ -1747,6 +1761,9 @@
"M92_0q": ["মন্তব্য বন্ধ করুন"],
"M9597s": ["শেয়ার URL প্রস্তুত করা হচ্ছে…"],
"MBKkUy": ["skills.sh পাওয়া যাচ্ছে না; GitHub-এর ফলাফল দেখানো হচ্ছে (ইনস্টল অনুযায়ী ক্রম নেই)।"],
+ "MBfjUk": [
+ ["0", "plural", { "one": ["#", " সংযুক্তি আপলোড হচ্ছে"], "other": ["#", " সংযুক্তি আপলোড হচ্ছে"] }]
+ ],
"MCjC9A": [["deleteDescriptorLabel"], " মুছুন"],
"MDBJwN": ["ব্যবহার করা কঠিন"],
"MDZSJe": ["এজেন্ট কখন তার নির্ধারিত কাজ চালায়।"],
@@ -2279,6 +2296,7 @@
],
"ScwcF2": ["এই জায়গায় আগে থেকেই একটি প্রকল্প আছে। অন্য মূল ফোল্ডার বাছুন।"],
"Sg-6Bo": [["errorCount", "plural", { "one": ["#", " ত্রুটি"], "other": ["#", " ত্রুটি"] }]],
+ "SgAFuo": ["এখানে ফাইল যুক্ত করা যায় না।"],
"SgKLfA": ["GitHub-এর সঙ্গে যুক্ত নয়।"],
"Sh3Qkg": ["মিলে যাওয়া কোনো ব্রাঞ্চ নেই।"],
"Si7mIR": ["রিপোর্ট তৈরি করুন"],
@@ -3061,6 +3079,10 @@
"cHhH3i": ["একটি প্রয়োজনীয় git টুল"],
"cIFYZn": ["আপনি সাইন আউট থাকা অবস্থায় এই সেটিং যা-ই হোক, আপডেট সর্বোচ্চ প্রতি 3 মিনিটে একবার দেখা হয়।"],
"cIptmH": ["Claude Desktop App-এ"],
+ "cK5W4m": [
+ ["0"],
+ " একটি লিংকের মাধ্যমে খোলে এবং সংযুক্তি গ্রহণ করে না — এর বদলে অ্যাপের ভেতরের এজেন্ট বেছে নিন।"
+ ],
"cLP0Lf": ["রিমোট স্কিল উৎস"],
"cLn264": ["এই থিম ফাইলটি পড়া যায়নি"],
"cMMb6H": [["imported"], "টি ইনস্টল হয়েছে, কিন্তু ", ["failed"], "টি ব্যর্থ: ", ["failedNames"]],
@@ -3135,6 +3157,13 @@
"d6qW27": [["agentName"], " জানিয়েছে: ", ["headline"]],
"dCforW": ["এই ফাইলটি লেখা যায়নি। কারণ জানতে OpenKnowledge লগ দেখুন।"],
"dD7NPy": ["রূপরেখা"],
+ "dDBZ0j": [
+ [
+ "0",
+ "plural",
+ { "one": ["#", " সংযুক্তি পাঠানোর জন্য প্রস্তুত"], "other": ["#", " সংযুক্তি পাঠানোর জন্য প্রস্তুত"] }
+ ]
+ ],
"dDpCOp": ["নাম বদলানো সফল হয়েছে কিন্তু সাইডবার পুরোনো হতে পারে — আবার সিঙ্ক করতে সতেজ করুন"],
"dEgA5A": ["বাতিল করুন"],
"dFrqBg": [["0"], " প্লাগইন"],
@@ -3153,6 +3182,26 @@
"dOHMA0": ["সরাতে ব্যর্থ"],
"dOxPd4": ["পাদটীকা"],
"dQHSCs": ["রূপান্তর করুন (মূলটি মুছে দিন)"],
+ "dRCAgQ": [
+ [
+ "tooLargeTotalCount",
+ "plural",
+ {
+ "one": [
+ "#",
+ " ফাইল বাদ দেওয়া হয়েছে — প্রতি বার্তায় সংযুক্তির মোট আকার ",
+ ["budgetKb"],
+ " KB-এর বেশি হতে পারে না।"
+ ],
+ "other": [
+ "#",
+ " ফাইল বাদ দেওয়া হয়েছে — প্রতি বার্তায় সংযুক্তির মোট আকার ",
+ ["budgetKb"],
+ " KB-এর বেশি হতে পারে না।"
+ ]
+ }
+ ]
+ ],
"dSORvE": ["বর্তমান কাজ থামিয়ে এর বদলে এটি পাঠায়"],
"dT-HIQ": ["এই পাতায় অনেক বেশি লাইভ রেফারেন্স। এই বোর্ডটি লোড করা হয়নি।"],
"dTaauv": ["কারণ: ", ["reason"]],
@@ -4259,6 +4308,7 @@
"q63KUv": ["MCP ও স্কিল যোগ করুন"],
"q7F5am": ["শিরোনাম"],
"q8aCbb": ["\"", ["0"], "\"-এর দুটি সংস্করণ — উৎস বনাম ", ["editor"]],
+ "q8tKSU": [["name"], "-এর কোনো সমাধানযোগ্য পাথ নেই — এজেন্ট শুধু ওয়ার্কস্পেসের ভেতরের ফাইল পড়তে পারে।"],
"qAQVSD": ["পাতার শিরোনামের সাড়া JSON ছিল না"],
"qAhFeg": [
["userName"],
@@ -4288,6 +4338,7 @@
"qTT48-": [
"উইকি-লিঙ্ক যেমন [[Page]] — এখানে লিঙ্ক করার একটি সমর্থিত উপায়, কিন্তু একজন বহিরাগত পাঠক কিছুই সমাধান করে না এবং বন্ধনী দেখায়।"
],
+ "qTULIf": ["এই এজেন্ট সংযুক্তি গ্রহণ করে না — সেগুলো সরান বা অ্যাপের ভেতরের এজেন্ট বেছে নিন।"],
"qTcVwj": ["এই প্রকল্পের জন্য কোনো স্কিল ব্রাউজ বা আপলোড করুন।"],
"qTcZZu": ["ট্যাগ লোড করতে ব্যর্থ। <0>Esc</0> চেপে আবার খুলে চেষ্টা করুন।"],
"qX-ABr": ["নয়তো বদলে ব্রাউজার সাইন-ইন ব্যবহার করতে:"],
@@ -4354,6 +4405,7 @@
],
"rJVoVX": ["সোর্স খোঁজার ফলাফল"],
"rJm8-2": ["ক্লিপবোর্ডে পৌঁছানো যায়নি — থিমটি নিচের বাক্সে আছে।"],
+ "rNi1kZ": ["ফোল্ডার ও খালি ফাইল সংযুক্ত করা যায় না — ফাইলগুলো নিজেই ফেলুন।"],
"rNifQd": ["প্রপার্টি সরান"],
"rQAQus": ["টেমপ্লেট সংরক্ষণ করা যায়নি: ", ["error"]],
"rQRrkB": ["গতকাল"],
@@ -4718,6 +4770,7 @@
"vPLUCm": ["অনুপস্থিত ছবি ", ["identity"], "। রেফারেন্সে যান।"],
"vPXOUw": ["সোর্স দৃশ্য চালু বা বন্ধ করুন"],
"vQIVHc": ["ফোল্ডার প্রপার্টি"],
+ "vQOuVY": ["নোট উইন্ডোতে সংযুক্তি এখনো পাওয়া যায় না — ফাইল যুক্ত করতে মূল উইন্ডো ব্যবহার করুন।"],
"vUP_HF": [
"সংযুক্ত AI টুল ছাড়া প্যাকের ",
["packSkillCount", "plural", { "one": ["#", " স্কিল"], "other": ["#", " স্কিল"] }],
diff --git a/packages/app/src/locales/bn/messages.po b/packages/app/src/locales/bn/messages.po
index a7ac3dd87..7620a418f 100644
--- a/packages/app/src/locales/bn/messages.po
+++ b/packages/app/src/locales/bn/messages.po
@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid " · references only (no embedded contents)"
msgstr " · শুধু রেফারেন্স (কোনো এম্বেড করা বিষয়বস্তু নেই)"
@@ -146,6 +146,12 @@ msgstr "(কিছু হয়তো অন্য নিয়মে আগে
msgid "(symlink)"
msgstr "(সিমলিংক)"
+#. placeholder {0}: pendingAttachments.length
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+msgstr "{0, plural, one {# সংযুক্তি পাঠানোর জন্য প্রস্তুত} other {# সংযুক্তি পাঠানোর জন্য প্রস্তুত}}"
+
#. placeholder {0}: preview.backlinkCount
#: src/editor/link-preview/InternalDocPreviewCard.tsx
msgid "{0, plural, one {# backlink} other {# backlinks}}"
@@ -260,6 +266,13 @@ msgstr "{0, plural, one {প্লাগইন} other {প্লাগইন}}"
msgid "{0, plural, one {Skill} other {Skills}}"
msgstr "{0, plural, one {স্কিল} other {স্কিল}}"
+#. placeholder {0}: pendingUploads.length
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+msgstr "{0, plural, one {# সংযুক্তি আপলোড হচ্ছে} other {# সংযুক্তি আপলোড হচ্ছে}}"
+
#. placeholder {0}: sibling.name
#: src/lib/acp/config-value-hints.ts
msgid "{0} · default"
@@ -353,6 +366,12 @@ msgstr "{1}টির মধ্যে {0}টি প্রকল্প নির
msgid "{0} of {1} selected"
msgstr "{1}টির মধ্যে {0}টি নির্বাচিত"
+#. placeholder {0}: resolvedTarget.displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} একটি লিংকের মাধ্যমে খোলে এবং সংযুক্তি গ্রহণ করে না — এর বদলে অ্যাপের ভেতরের এজেন্ট বেছে নিন।"
+
#. placeholder {0}: siblings.length
#: src/components/SkillPluginBundleBanner.tsx
msgid "{0} other skills by this publisher"
@@ -381,6 +400,12 @@ msgstr "{0} প্রপার্টি"
msgid "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
msgstr "{0} এই স্কিলটি {poolRootRel}-এর মাধ্যমে পড়ে। {1}-কে \"{2}\" পাওয়া বন্ধ করতে ক্লিক করুন — {subRoot} তার অন্য স্কিলগুলো রাখবে কিন্তু {poolRootRel} অনুসরণ করা বন্ধ করবে।"
+#. placeholder {0}: TERMINAL_CLIS[selection.cli].displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} টার্মিনালে চলে এবং সংযুক্তি গ্রহণ করে না — এর বদলে অ্যাপের ভেতরের এজেন্ট বেছে নিন।"
+
#. placeholder {0}: formatToolList( [f.host, ...following.map((o) => o.host)].map(hostLabel), i18n.locale, )
#: src/components/settings/SkillTargetsPicker.tsx
msgid "{0} share this folder."
@@ -510,6 +535,7 @@ msgid "{agentName} couldn't start."
msgstr "{agentName} শুরু হতে পারেনি।"
#: src/components/acp/ThreadView.tsx
+#: src/lib/acp/launch-agent-thread.ts
msgid "{agentName} doesn't accept image attachments."
msgstr "{agentName} ছবি সংযুক্তি গ্রহণ করে না।"
@@ -860,6 +886,14 @@ msgstr "{minutes} মিনিট আগে"
msgid "{name} CLI"
msgstr "{name} CLI"
+#: src/lib/acp/image-attachment.ts
+msgid "{name} has no resolvable path — the agent can only read files inside the workspace."
+msgstr "{name}-এর কোনো সমাধানযোগ্য পাথ নেই — এজেন্ট শুধু ওয়ার্কস্পেসের ভেতরের ফাইল পড়তে পারে।"
+
+#: src/lib/acp/image-attachment.ts
+msgid "{name} is outside the workspace. Move it into your project first."
+msgstr "{name} ওয়ার্কস্পেসের বাইরে আছে। আগে এটি আপনার প্রকল্পে সরান।"
+
#: src/components/GraphPanel.tsx
msgid "{nodeCount, plural, one {# node} other {# nodes}}"
msgstr "{nodeCount, plural, one {# নোড} other {# নোড}}"
@@ -873,6 +907,7 @@ msgid "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
msgstr "{openedWorktreeCount, plural, one {ওয়ার্কট্রি} other {ওয়ার্কট্রি}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
msgstr "{outsideWorkspaceCount, plural, one {ওয়ার্কস্পেসের বাইরের # ফাইল বাদ দেওয়া হয়েছে।} other {ওয়ার্কস্পেসের বাইরের # ফাইল বাদ দেওয়া হয়েছে।}}"
@@ -975,6 +1010,7 @@ msgid "{skillCount, plural, one {skill} other {skills}}"
msgstr "{skillCount, plural, one {স্কিল} other {স্কিল}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
msgstr "{skipTotal, plural, one {# ফাইল বাদ দেওয়া হয়েছে যা সংযুক্ত করা যায়নি।} other {# ফাইল বাদ দেওয়া হয়েছে যা সংযুক্ত করা যায়নি।}}"
@@ -1019,6 +1055,11 @@ msgstr "{templateCount, plural, one {টেমপ্লেট} other {টেম
msgid "{tokens, plural, one {token} other {tokens}}"
msgstr "{tokens, plural, one {টোকেন} other {টোকেন}}"
+#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
+msgid "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+msgstr "{tooLargeTotalCount, plural, one {# ফাইল বাদ দেওয়া হয়েছে — প্রতি বার্তায় সংযুক্তির মোট আকার {budgetKb} KB-এর বেশি হতে পারে না।} other {# ফাইল বাদ দেওয়া হয়েছে — প্রতি বার্তায় সংযুক্তির মোট আকার {budgetKb} KB-এর বেশি হতে পারে না।}}"
+
#: src/components/file-tree-problem-indicators.ts
msgid "{total, plural, one {# problem} other {# problems}}"
msgstr "{total, plural, one {# সমস্যা} other {# সমস্যা}}"
@@ -1028,6 +1069,7 @@ msgid "{truncatedShownCount, plural, one {Showing the first item in one folder
msgstr "{truncatedShownCount, plural, one {একটি ফোল্ডারের প্রথম আইটেম দেখানো হচ্ছে — সেই ফোল্ডারের বাকিটা লুকানো।} other {একটি ফোল্ডারের প্রথম {formattedCount}টি আইটেম দেখানো হচ্ছে — সেই ফোল্ডারের বাকিটা লুকানো।}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
msgstr "{unknownPathCount, plural, one {# ফাইল বাদ দেওয়া হয়েছে — এই ব্রাউজার পাথ দ্বারা ফাইল সংযুক্ত করতে পারে না।} other {# ফাইল বাদ দেওয়া হয়েছে — এই ব্রাউজার পাথ দ্বারা ফাইল সংযুক্ত করতে পারে না।}}"
@@ -2068,7 +2110,7 @@ msgstr "অ্যাসেট পরামর্শ"
msgid "Asset: {title}"
msgstr "সম্পদ: {title}"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid "Attach a file"
msgstr "একটি ফাইল সংযুক্ত করুন"
@@ -2081,6 +2123,10 @@ msgstr "ছবি সংযুক্ত করুন"
msgid "Attachments"
msgstr "সংযুক্তি"
+#: src/components/BottomComposer.tsx
+msgid "Attachments aren't available in note windows yet — use the main window to attach files."
+msgstr "নোট উইন্ডোতে সংযুক্তি এখনো পাওয়া যায় না — ফাইল যুক্ত করতে মূল উইন্ডো ব্যবহার করুন।"
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Attachments must total under 3 MB."
@@ -4048,6 +4094,7 @@ msgid "Couldn't reach the Open Knowledge server to upload {fileName}."
msgstr "{fileName} আপলোড করতে Open Knowledge সার্ভারের নাগাল পাওয়া যায়নি।"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "Couldn't read {fileName}."
msgstr "{fileName} পড়া যায়নি।"
@@ -6038,6 +6085,10 @@ msgstr "ফাইল ফেলার জায়গা"
msgid "File duplicated"
msgstr "ফাইলের প্রতিলিপি হয়েছে"
+#: src/lib/acp/image-attachment.ts
+msgid "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+msgstr "ফাইলটি খুব বড় ({sizeKb} KB) — প্রতিটি সংযুক্তির সীমা {limitKb} KB। ফাইলটি ক্রপ করুন বা আকার ছোট করে আবার চেষ্টা করুন।"
+
#: src/components/NewItemDialog.tsx
msgid "File name"
msgstr "ফাইলের নাম"
@@ -6239,6 +6290,13 @@ msgstr "ফোল্ডার শেয়ার লিংক কপি কর
msgid "Folder target: {linkTitle}. Click to open the overview."
msgstr "ফোল্ডার লক্ষ্য: {linkTitle}। সংক্ষিপ্তসার খুলতে ক্লিক করুন।"
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "Folders and empty files can't be attached — drop the files themselves."
+msgstr "ফোল্ডার ও খালি ফাইল সংযুক্ত করা যায় না — ফাইলগুলো নিজেই ফেলুন।"
+
#: src/components/acp/ThreadView.tsx
msgid "Follow the agent's edits"
msgstr "এজেন্টের সম্পাদনা অনুসরণ করুন"
@@ -8628,6 +8686,11 @@ msgstr "এখনও কোনো এজেন্ট সেট আপ করা
msgid "no agents — saved, not installed anywhere"
msgstr "কোনো এজেন্ট নেই — সংরক্ষিত, কোথাও ইনস্টল হয়নি"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+msgstr "এখনও কোনো এজেন্ট সেট আপ করা নেই — ফাইল সংযুক্ত করতে «এজেন্ট সংযোগ» থেকে অ্যাপের ভেতরের একটি এজেন্ট যোগ করুন।"
+
#: src/components/settings/AgentConnectionsSection.tsx
msgid "No agents available."
msgstr "কোনো এজেন্ট নেই।"
@@ -9197,6 +9260,10 @@ msgstr "শুধু আমার"
msgid "Only modified"
msgstr "কেবল পরিবর্তিত"
+#: src/lib/acp/image-attachment.ts
+msgid "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+msgstr "শুধু PNG, JPEG, GIF ও WebP ছবি সমর্থিত ({mimeType} পাওয়া গেছে)।"
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Only PNG, JPEG, or WebP images are allowed."
@@ -10865,7 +10932,7 @@ msgstr "সরান"
#. placeholder {0}: file.name
#. placeholder {0}: image.name
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/PendingImageStrip.tsx
#: src/components/ImageAttachments.tsx
msgid "Remove {0}"
msgstr "{0} সরান"
@@ -13769,6 +13836,11 @@ msgstr "এই {targetNoun} ব্রাঞ্চ <0>{shareBranch}</0> থেক
msgid "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
msgstr "এই {targetNoun} ব্রাঞ্চ <0>{shareBranch}</0> থেকে ভাগ করা হয়েছিল। আপনি এখন <1>{currentLabel}</1>-এ আছেন।"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "This agent doesn't accept attachments — remove them or choose an in-app agent."
+msgstr "এই এজেন্ট সংযুক্তি গ্রহণ করে না — সেগুলো সরান বা অ্যাপের ভেতরের এজেন্ট বেছে নিন।"
+
#: src/editor/composer-mention/ComposerSlashMenu.tsx
msgid "This agent doesn't offer slash commands"
msgstr "এই এজেন্ট স্ল্যাশ কমান্ড দেয় না"
@@ -13824,6 +13896,12 @@ msgstr "এটি Settings > AI tools & CLI-তে কনফিগার কর
msgid "This comment is on the whole property"
msgstr "এই মন্তব্যটি পুরো প্রপার্টির উপর"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "This composer doesn't accept attachments."
+msgstr "এখানে ফাইল যুক্ত করা যায় না।"
+
#: src/components/DiffViewBoundary.tsx
msgid "This conflict is resolved."
msgstr "এই দ্বন্দ্বটি সমাধান হয়েছে।"
@@ -14650,6 +14728,10 @@ msgstr "সমাধান করা যায় না এমন ফাইল
msgid "Unresolvable image {identity}. Go to reference."
msgstr "সমাধান করা যায় না এমন ছবি {identity}। রেফারেন্সে যান।"
+#: src/lib/acp/image-attachment.ts
+msgid "Unsupported file type: {fileType}."
+msgstr "অসমর্থিত ফাইলের ধরন: {fileType}।"
+
#: src/components/BugReportHistory.tsx
msgid "Untitled report"
msgstr "শিরোনামহীন রিপোর্ট"
@@ -14790,6 +14872,7 @@ msgstr "\"{0}\" হিসেবে আপলোড হয়েছে — \"{1}\
msgid "Uploading"
msgstr "আপলোড করা হচ্ছে"
+#: src/components/acp/PendingImageStrip.tsx
#: src/editor/image-upload/index.ts
msgid "Uploading {fileName}"
msgstr "{fileName} আপলোড করা হচ্ছে"
diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.json
index 167da7003..92d031aba 100644
--- a/packages/app/src/locales/en/messages.json
+++ b/packages/app/src/locales/en/messages.json
@@ -808,6 +808,7 @@
],
"9fhQRL": ["Beta channel"],
"9fvog2": ["Preview unavailable: ", ["errorDetail"]],
+ "9gu0n7": ["Unsupported file type: ", ["fileType"], "."],
"9hEdtC": [
"This one teaches your AI tools how to work with OpenKnowledge. It lives in the project folder, so it installs for everyone who opens the project."
],
@@ -1301,6 +1302,7 @@
"FjkaiT": ["Zoom out"],
"Fjz6aJ": ["Send to a new chat"],
"FqGWeR": ["Couldn't reach the agent registry."],
+ "FqMKq2": ["Only PNG, JPEG, GIF, and WebP images are supported (got ", ["mimeType"], ")."],
"FqTpiN": ["Bird wiki"],
"Fqr8BP": ["Multi-page PDF viewer with toolbar controls (thumbnails, page nav, zoom)."],
"Fqx38P": ["What got in the way?"],
@@ -1328,6 +1330,10 @@
"G7-rf8": ["Pattern syntax error: ", ["message"]],
"G7bn_N": ["Start an agent"],
"G7cMuO": ["HTML preview"],
+ "G7gMiG": [
+ ["0"],
+ " runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+ ],
"G8t9NN": ["Add a property"],
"GA-UkN": [["keyName"], " type: ", ["typeLabel"], ". Click to change."],
"GAohqx": ["Delete column"],
@@ -1389,6 +1395,9 @@
"GemPfn": ["Failed to parse forward-links error response (HTTP ", ["status"], ")"],
"Gfr4fu": ["Server can't open documents"],
"GhjUB_": ["Reconnected"],
+ "Gi8Akx": [
+ "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+ ],
"GidGkh": ["Update from source"],
"GifIjR": [
"Skill \"",
@@ -1619,6 +1628,7 @@
"OpenKnowledge couldn't read terminal.shell in .ok/local/config.yml. Using an available Windows shell instead."
],
"K9J00P": ["Clone failed — connection error"],
+ "K9ViCA": [["name"], " is outside the workspace. Move it into your project first."],
"KDrbNG": ["OpenKnowledge looked up links for ", ["subject"]],
"KDuPiY": ["Uploading ", ["fileName"]],
"KDw4GX": ["Try again"],
@@ -1648,6 +1658,13 @@
"KZLdgR": ["See <0>#design-docs</0> for the latest specs."],
"K_vT1F": ["Upstream sync"],
"KaFCD3": ["Open this link in a new tab and collapse the graph."],
+ "Kb08WL": [
+ "File is too large (",
+ ["sizeKb"],
+ " KB) — each attachment is capped at ",
+ ["limitKb"],
+ " KB. Crop or resize it and try again."
+ ],
"Kbz9RK": ["Fixed port number"],
"Kdvukk": ["Markdown checks do not apply to this file."],
"KeXgA-": ["Couldn't find that passage — the text it was on may have changed."],
@@ -1801,6 +1818,13 @@
"M92_0q": ["Close comment"],
"M9597s": ["Preparing share URL..."],
"MBKkUy": ["skills.sh is unavailable; showing GitHub results (no install ranking)."],
+ "MBfjUk": [
+ [
+ "0",
+ "plural",
+ { "one": ["Uploading ", "#", " attachment"], "other": ["Uploading ", "#", " attachments"] }
+ ]
+ ],
"MCjC9A": ["Delete ", ["deleteDescriptorLabel"]],
"MDBJwN": ["Hard to use"],
"MDZSJe": ["When the agent runs its scheduled work."],
@@ -2332,6 +2356,7 @@
],
"ScwcF2": ["A project already exists at this location. Pick a different parent folder."],
"Sg-6Bo": [["errorCount", "plural", { "one": ["#", " error"], "other": ["#", " errors"] }]],
+ "SgAFuo": ["This composer doesn't accept attachments."],
"SgKLfA": ["Not connected to GitHub."],
"Sh3Qkg": ["No matching branches."],
"Si7mIR": ["Create report"],
@@ -3126,6 +3151,10 @@
"While you're signed out, updates are checked at most every 3 minutes regardless of this setting."
],
"cIptmH": ["In the Claude Desktop App"],
+ "cK5W4m": [
+ ["0"],
+ " opens via a link and doesn't accept attachments — choose an in-app agent instead."
+ ],
"cLP0Lf": ["Remote skill source"],
"cLn264": ["This theme file couldn’t be read"],
"cMMb6H": ["Installed ", ["imported"], ", but ", ["failed"], " failed: ", ["failedNames"]],
@@ -3208,6 +3237,16 @@
"d6qW27": [["agentName"], " reported: ", ["headline"]],
"dCforW": ["Writing this file failed. Check the OpenKnowledge log for the reason."],
"dD7NPy": ["Outline"],
+ "dDBZ0j": [
+ [
+ "0",
+ "plural",
+ {
+ "one": ["#", " attachment is ready to send"],
+ "other": ["#", " attachments are ready to send"]
+ }
+ ]
+ ],
"dDpCOp": ["Rename succeeded but the sidebar may be out of date — refresh to resync"],
"dEgA5A": ["Cancel"],
"dFrqBg": [["0"], " plugin"],
@@ -3226,6 +3265,28 @@
"dOHMA0": ["Failed to move"],
"dOxPd4": ["Footnote"],
"dQHSCs": ["Convert (delete original)"],
+ "dRCAgQ": [
+ [
+ "tooLargeTotalCount",
+ "plural",
+ {
+ "one": [
+ "Skipped ",
+ "#",
+ " file — attachments can't total more than ",
+ ["budgetKb"],
+ " KB per message."
+ ],
+ "other": [
+ "Skipped ",
+ "#",
+ " files — attachments can't total more than ",
+ ["budgetKb"],
+ " KB per message."
+ ]
+ }
+ ]
+ ],
"dSORvE": ["Stops the current run and sends this instead"],
"dT-HIQ": ["Too many live references on this page. This board was not loaded."],
"dTaauv": ["Reason: ", ["reason"]],
@@ -4387,6 +4448,10 @@
"q63KUv": ["Add MCP & skill"],
"q7F5am": ["title"],
"q8aCbb": ["Two versions of \"", ["0"], "\" — source vs ", ["editor"]],
+ "q8tKSU": [
+ ["name"],
+ " has no resolvable path — the agent can only read files inside the workspace."
+ ],
"qAQVSD": ["Page headings response was not JSON"],
"qAhFeg": [
["userName"],
@@ -4416,6 +4481,7 @@
"qTT48-": [
"Wiki-links like [[Page]] — a supported way to link here, but an external reader resolves nothing and shows the brackets."
],
+ "qTULIf": ["This agent doesn't accept attachments — remove them or choose an in-app agent."],
"qTcVwj": ["Browse or upload a skill for this project."],
"qTcZZu": ["Failed to load tags. Press <0>Esc</0> and re-open to retry."],
"qX-ABr": ["Or to use browser sign-in instead:"],
@@ -4490,6 +4556,7 @@
],
"rJVoVX": ["Source find results"],
"rJm8-2": ["Couldn’t reach the clipboard — the theme is in the box below."],
+ "rNi1kZ": ["Folders and empty files can't be attached — drop the files themselves."],
"rNifQd": ["Remove property"],
"rQAQus": ["Couldn't save template: ", ["error"]],
"rQRrkB": ["yesterday"],
@@ -4868,6 +4935,9 @@
"vPLUCm": ["Missing image ", ["identity"], ". Go to reference."],
"vPXOUw": ["Toggle source view"],
"vQIVHc": ["Folder properties"],
+ "vQOuVY": [
+ "Attachments aren't available in note windows yet — use the main window to attach files."
+ ],
"vUP_HF": [
"Without a connected AI tool, the pack's ",
["packSkillCount", "plural", { "one": ["#", " skill"], "other": ["#", " skills"] }],
diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.po
index 20b5525ff..27642d3a1 100644
--- a/packages/app/src/locales/en/messages.po
+++ b/packages/app/src/locales/en/messages.po
@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid " · references only (no embedded contents)"
msgstr " · references only (no embedded contents)"
@@ -146,6 +146,12 @@ msgstr "(some may already be hidden by other rules)"
msgid "(symlink)"
msgstr "(symlink)"
+#. placeholder {0}: pendingAttachments.length
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+msgstr "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+
#. placeholder {0}: preview.backlinkCount
#: src/editor/link-preview/InternalDocPreviewCard.tsx
msgid "{0, plural, one {# backlink} other {# backlinks}}"
@@ -260,6 +266,13 @@ msgstr "{0, plural, one {Plugin} other {Plugins}}"
msgid "{0, plural, one {Skill} other {Skills}}"
msgstr "{0, plural, one {Skill} other {Skills}}"
+#. placeholder {0}: pendingUploads.length
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+msgstr "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+
#. placeholder {0}: sibling.name
#: src/lib/acp/config-value-hints.ts
msgid "{0} · default"
@@ -353,6 +366,12 @@ msgstr "{0} of {1} projects selected"
msgid "{0} of {1} selected"
msgstr "{0} of {1} selected"
+#. placeholder {0}: resolvedTarget.displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+
#. placeholder {0}: siblings.length
#: src/components/SkillPluginBundleBanner.tsx
msgid "{0} other skills by this publisher"
@@ -381,6 +400,12 @@ msgstr "{0} Properties"
msgid "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
msgstr "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
+#. placeholder {0}: TERMINAL_CLIS[selection.cli].displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+
#. placeholder {0}: formatToolList( [f.host, ...following.map((o) => o.host)].map(hostLabel), i18n.locale, )
#: src/components/settings/SkillTargetsPicker.tsx
msgid "{0} share this folder."
@@ -510,6 +535,7 @@ msgid "{agentName} couldn't start."
msgstr "{agentName} couldn't start."
#: src/components/acp/ThreadView.tsx
+#: src/lib/acp/launch-agent-thread.ts
msgid "{agentName} doesn't accept image attachments."
msgstr "{agentName} doesn't accept image attachments."
@@ -860,6 +886,14 @@ msgstr "{minutes}m ago"
msgid "{name} CLI"
msgstr "{name} CLI"
+#: src/lib/acp/image-attachment.ts
+msgid "{name} has no resolvable path — the agent can only read files inside the workspace."
+msgstr "{name} has no resolvable path — the agent can only read files inside the workspace."
+
+#: src/lib/acp/image-attachment.ts
+msgid "{name} is outside the workspace. Move it into your project first."
+msgstr "{name} is outside the workspace. Move it into your project first."
+
#: src/components/GraphPanel.tsx
msgid "{nodeCount, plural, one {# node} other {# nodes}}"
msgstr "{nodeCount, plural, one {# node} other {# nodes}}"
@@ -873,6 +907,7 @@ msgid "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
msgstr "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
msgstr "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
@@ -975,6 +1010,7 @@ msgid "{skillCount, plural, one {skill} other {skills}}"
msgstr "{skillCount, plural, one {skill} other {skills}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
msgstr "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
@@ -1019,6 +1055,11 @@ msgstr "{templateCount, plural, one {template} other {templates}}"
msgid "{tokens, plural, one {token} other {tokens}}"
msgstr "{tokens, plural, one {token} other {tokens}}"
+#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
+msgid "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+msgstr "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+
#: src/components/file-tree-problem-indicators.ts
msgid "{total, plural, one {# problem} other {# problems}}"
msgstr "{total, plural, one {# problem} other {# problems}}"
@@ -1028,6 +1069,7 @@ msgid "{truncatedShownCount, plural, one {Showing the first item in one folder
msgstr "{truncatedShownCount, plural, one {Showing the first item in one folder — the rest of that folder is hidden.} other {Showing the first {formattedCount} items in one folder — the rest of that folder is hidden.}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
msgstr "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
@@ -2072,7 +2114,7 @@ msgstr "Asset suggestions"
msgid "Asset: {title}"
msgstr "Asset: {title}"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid "Attach a file"
msgstr "Attach a file"
@@ -2085,6 +2127,10 @@ msgstr "Attach images"
msgid "Attachments"
msgstr "Attachments"
+#: src/components/BottomComposer.tsx
+msgid "Attachments aren't available in note windows yet — use the main window to attach files."
+msgstr "Attachments aren't available in note windows yet — use the main window to attach files."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Attachments must total under 3 MB."
@@ -4052,6 +4098,7 @@ msgid "Couldn't reach the Open Knowledge server to upload {fileName}."
msgstr "Couldn't reach the Open Knowledge server to upload {fileName}."
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "Couldn't read {fileName}."
msgstr "Couldn't read {fileName}."
@@ -6042,6 +6089,10 @@ msgstr "File drop zone"
msgid "File duplicated"
msgstr "File duplicated"
+#: src/lib/acp/image-attachment.ts
+msgid "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+msgstr "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+
#: src/components/NewItemDialog.tsx
msgid "File name"
msgstr "File name"
@@ -6243,6 +6294,13 @@ msgstr "Folder share link copied."
msgid "Folder target: {linkTitle}. Click to open the overview."
msgstr "Folder target: {linkTitle}. Click to open the overview."
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "Folders and empty files can't be attached — drop the files themselves."
+msgstr "Folders and empty files can't be attached — drop the files themselves."
+
#: src/components/acp/ThreadView.tsx
msgid "Follow the agent's edits"
msgstr "Follow the agent's edits"
@@ -8632,6 +8690,11 @@ msgstr "No agent is set up yet — pick one from the send menu."
msgid "no agents — saved, not installed anywhere"
msgstr "no agents — saved, not installed anywhere"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+msgstr "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+
#: src/components/settings/AgentConnectionsSection.tsx
msgid "No agents available."
msgstr "No agents available."
@@ -9201,6 +9264,10 @@ msgstr "Only me"
msgid "Only modified"
msgstr "Only modified"
+#: src/lib/acp/image-attachment.ts
+msgid "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+msgstr "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Only PNG, JPEG, or WebP images are allowed."
@@ -10869,7 +10936,7 @@ msgstr "Remove"
#. placeholder {0}: file.name
#. placeholder {0}: image.name
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/PendingImageStrip.tsx
#: src/components/ImageAttachments.tsx
msgid "Remove {0}"
msgstr "Remove {0}"
@@ -13773,6 +13840,11 @@ msgstr "This {targetNoun} was shared from branch <0>{shareBranch}</0>. It doesn'
msgid "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
msgstr "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "This agent doesn't accept attachments — remove them or choose an in-app agent."
+msgstr "This agent doesn't accept attachments — remove them or choose an in-app agent."
+
#: src/editor/composer-mention/ComposerSlashMenu.tsx
msgid "This agent doesn't offer slash commands"
msgstr "This agent doesn't offer slash commands"
@@ -13828,6 +13900,12 @@ msgstr "This can be configured in Settings > AI tools & CLI"
msgid "This comment is on the whole property"
msgstr "This comment is on the whole property"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "This composer doesn't accept attachments."
+msgstr "This composer doesn't accept attachments."
+
#: src/components/DiffViewBoundary.tsx
msgid "This conflict is resolved."
msgstr "This conflict is resolved."
@@ -14654,6 +14732,10 @@ msgstr "Unresolvable file {identity}. Go to reference."
msgid "Unresolvable image {identity}. Go to reference."
msgstr "Unresolvable image {identity}. Go to reference."
+#: src/lib/acp/image-attachment.ts
+msgid "Unsupported file type: {fileType}."
+msgstr "Unsupported file type: {fileType}."
+
#: src/components/BugReportHistory.tsx
msgid "Untitled report"
msgstr "Untitled report"
@@ -14794,6 +14876,7 @@ msgstr "Uploaded as \"{0}\" — the name \"{1}\" was taken."
msgid "Uploading"
msgstr "Uploading"
+#: src/components/acp/PendingImageStrip.tsx
#: src/editor/image-upload/index.ts
msgid "Uploading {fileName}"
msgstr "Uploading {fileName}"
diff --git a/packages/app/src/locales/es/messages.json b/packages/app/src/locales/es/messages.json
index 9b7c956e9..0ac96c3ad 100644
--- a/packages/app/src/locales/es/messages.json
+++ b/packages/app/src/locales/es/messages.json
@@ -943,6 +943,7 @@
],
"9fhQRL": ["Canal beta"],
"9fvog2": ["Vista previa no disponible: ", ["errorDetail"]],
+ "9gu0n7": ["Tipo de archivo no admitido: ", ["fileType"], "."],
"9hEdtC": [
"Esta enseña a tus herramientas de IA a trabajar con OpenKnowledge. Vive en la carpeta del proyecto, así que se instala para todos los que abran el proyecto."
],
@@ -1502,6 +1503,7 @@
"FjkaiT": ["Alejar"],
"Fjz6aJ": ["Enviar a un chat nuevo"],
"FqGWeR": ["No se pudo contactar con el registro de agentes."],
+ "FqMKq2": ["Solo se admiten imágenes PNG, JPEG, GIF y WebP (se recibió ", ["mimeType"], ")."],
"FqTpiN": ["Wiki de aves"],
"Fqr8BP": [
"Visor de PDF de varias páginas con controles en la barra de herramientas (miniaturas, navegación de páginas, zoom)."
@@ -1543,6 +1545,10 @@
"G7-rf8": ["Error de sintaxis en el patrón: ", ["message"]],
"G7bn_N": ["Iniciar un agente"],
"G7cMuO": ["Vista previa del HTML"],
+ "G7gMiG": [
+ ["0"],
+ " se ejecuta en una terminal y no acepta adjuntos — elige un agente integrado en la app."
+ ],
"G8t9NN": ["Añadir una propiedad"],
"GA-UkN": ["Tipo de ", ["keyName"], ": ", ["typeLabel"], ". Haz clic para cambiarlo."],
"GAohqx": ["Eliminar columna"],
@@ -1608,6 +1614,9 @@
],
"Gfr4fu": ["El servidor no puede abrir documentos"],
"GhjUB_": ["Reconectado"],
+ "Gi8Akx": [
+ "Todavía no hay ningún agente configurado: para adjuntar archivos, añade un agente integrado en la app desde Conexiones de agentes."
+ ],
"GidGkh": ["Actualizar desde el origen"],
"GifIjR": [
"No se instaló la skill «",
@@ -1886,6 +1895,7 @@
"OpenKnowledge no pudo leer terminal.shell en .ok/local/config.yml. Se usará un shell de Windows disponible."
],
"K9J00P": ["No se pudo clonar: error de conexión"],
+ "K9ViCA": [["name"], " está fuera del espacio de trabajo. Muévelo primero a tu proyecto."],
"KDrbNG": ["OpenKnowledge consultó los enlaces de ", ["subject"]],
"KDuPiY": ["Subiendo ", ["fileName"]],
"KDw4GX": ["Inténtalo de nuevo"],
@@ -1915,6 +1925,13 @@
"KZLdgR": ["Consulta <0>#design-docs</0> para ver las últimas especificaciones."],
"K_vT1F": ["Sincronización con el remoto"],
"KaFCD3": ["Abre este enlace en una pestaña nueva y contrae el grafo."],
+ "Kb08WL": [
+ "El archivo es demasiado grande (",
+ ["sizeKb"],
+ " KB) — cada adjunto tiene un límite de ",
+ ["limitKb"],
+ " KB. Recórtalo o redimensiónalo y vuelve a intentarlo."
+ ],
"Kbz9RK": ["Número de puerto fijo"],
"Kdvukk": ["Las comprobaciones de Markdown no se aplican a este archivo."],
"KeXgA-": [
@@ -2099,6 +2116,17 @@
"MBKkUy": [
"skills.sh no está disponible; se muestran resultados de GitHub (sin clasificación por instalaciones)."
],
+ "MBfjUk": [
+ [
+ "0",
+ "plural",
+ {
+ "one": ["Subiendo ", "#", " adjunto"],
+ "many": ["Subiendo ", "#", " adjuntos"],
+ "other": ["Subiendo ", "#", " adjuntos"]
+ }
+ ]
+ ],
"MCjC9A": ["Eliminar ", ["deleteDescriptorLabel"]],
"MDBJwN": ["Difícil de usar"],
"MDZSJe": ["Cuándo ejecuta el agente su trabajo programado."],
@@ -2682,6 +2710,7 @@
{ "one": ["#", " error"], "many": ["#", " errores"], "other": ["#", " errores"] }
]
],
+ "SgAFuo": ["Aquí no se pueden adjuntar archivos."],
"SgKLfA": ["No hay conexión con GitHub."],
"Sh3Qkg": ["Ninguna rama coincide."],
"Si7mIR": ["Crear informe"],
@@ -3623,6 +3652,10 @@
"Mientras tengas la sesión cerrada, las actualizaciones se buscan como mucho cada 3 minutos, independientemente de este ajuste."
],
"cIptmH": ["En la aplicación Claude Desktop"],
+ "cK5W4m": [
+ ["0"],
+ " se abre mediante un enlace y no acepta adjuntos — elige un agente integrado en la app."
+ ],
"cLP0Lf": ["Origen remoto de habilidades"],
"cLn264": ["No se pudo leer este archivo de tema"],
"cMMb6H": [
@@ -3721,6 +3754,17 @@
"No se pudo escribir este archivo. Consulta el registro de OpenKnowledge para conocer el motivo."
],
"dD7NPy": ["Esquema"],
+ "dDBZ0j": [
+ [
+ "0",
+ "plural",
+ {
+ "one": ["#", " adjunto listo para enviar"],
+ "many": ["#", " adjuntos listos para enviar"],
+ "other": ["#", " adjuntos listos para enviar"]
+ }
+ ]
+ ],
"dDpCOp": [
"Se renombró correctamente, pero puede que la barra lateral esté desactualizada; actualízala para resincronizar"
],
@@ -3741,6 +3785,35 @@
"dOHMA0": ["No se pudo mover"],
"dOxPd4": ["Nota al pie"],
"dQHSCs": ["Convertir (eliminar el original)"],
+ "dRCAgQ": [
+ [
+ "tooLargeTotalCount",
+ "plural",
+ {
+ "one": [
+ "Se omitió ",
+ "#",
+ " archivo — los adjuntos no pueden superar ",
+ ["budgetKb"],
+ " KB en total por mensaje."
+ ],
+ "many": [
+ "Se omitieron ",
+ "#",
+ " archivos — los adjuntos no pueden superar ",
+ ["budgetKb"],
+ " KB en total por mensaje."
+ ],
+ "other": [
+ "Se omitieron ",
+ "#",
+ " archivos — los adjuntos no pueden superar ",
+ ["budgetKb"],
+ " KB en total por mensaje."
+ ]
+ }
+ ]
+ ],
"dSORvE": ["Detiene la ejecución actual y envía esto en su lugar"],
"dT-HIQ": ["Demasiadas referencias en vivo en esta página. Esta pizarra no se cargó."],
"dTaauv": ["Motivo: ", ["reason"]],
@@ -5036,6 +5109,10 @@
"q63KUv": ["Añadir MCP y habilidad"],
"q7F5am": ["título"],
"q8aCbb": ["Dos versiones de \"", ["0"], "\": el origen frente a ", ["editor"]],
+ "q8tKSU": [
+ ["name"],
+ " no tiene una ruta resoluble — el agente solo puede leer archivos dentro del espacio de trabajo."
+ ],
"qAQVSD": ["La respuesta de los encabezados de página no era JSON"],
"qAhFeg": [
["userName"],
@@ -5071,6 +5148,7 @@
"qTT48-": [
"Enlaces wiki como [[Page]]: una forma compatible de vincular aquí, pero un lector externo no resuelve nada y muestra los corchetes."
],
+ "qTULIf": ["Este agente no acepta adjuntos — quítalos o elige un agente integrado en la app."],
"qTcVwj": ["Busca o sube una habilidad para este proyecto."],
"qTcZZu": [
"No se pudieron cargar las etiquetas. Pulsa <0>Esc</0> y vuelve a abrirlo para reintentarlo."
@@ -5156,6 +5234,7 @@
],
"rJVoVX": ["Resultados de búsqueda en el código"],
"rJm8-2": ["No se pudo acceder al portapapeles — el tema está en el cuadro de abajo."],
+ "rNi1kZ": ["No se pueden adjuntar carpetas ni archivos vacíos — suelta los archivos en sí."],
"rNifQd": ["Quitar la propiedad"],
"rQAQus": ["No se pudo guardar la plantilla: ", ["error"]],
"rQRrkB": ["ayer"],
@@ -5572,6 +5651,9 @@
"vPLUCm": ["Falta la imagen ", ["identity"], ". Ir a la referencia."],
"vPXOUw": ["Mostrar u ocultar la vista de código"],
"vQIVHc": ["Propiedades de la carpeta"],
+ "vQOuVY": [
+ "Los adjuntos aún no están disponibles en las ventanas de notas — usa la ventana principal para adjuntar archivos."
+ ],
"vUP_HF": [
"Sin una herramienta de IA conectada, no se instalarán ",
[
diff --git a/packages/app/src/locales/es/messages.po b/packages/app/src/locales/es/messages.po
index 159fc4f2c..c5c9f4a82 100644
--- a/packages/app/src/locales/es/messages.po
+++ b/packages/app/src/locales/es/messages.po
@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid " · references only (no embedded contents)"
msgstr " · solo referencias (sin contenido incrustado)"
@@ -146,6 +146,12 @@ msgstr "(puede que otras reglas ya oculten algunos)"
msgid "(symlink)"
msgstr "(enlace simbólico)"
+#. placeholder {0}: pendingAttachments.length
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+msgstr "{0, plural, one {# adjunto listo para enviar} many {# adjuntos listos para enviar} other {# adjuntos listos para enviar}}"
+
#. placeholder {0}: preview.backlinkCount
#: src/editor/link-preview/InternalDocPreviewCard.tsx
msgid "{0, plural, one {# backlink} other {# backlinks}}"
@@ -260,6 +266,13 @@ msgstr "{0, plural, one {Complemento} many {Complementos} other {Complementos}}"
msgid "{0, plural, one {Skill} other {Skills}}"
msgstr "{0, plural, one {Habilidad} many {Habilidades} other {Habilidades}}"
+#. placeholder {0}: pendingUploads.length
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+msgstr "{0, plural, one {Subiendo # adjunto} many {Subiendo # adjuntos} other {Subiendo # adjuntos}}"
+
#. placeholder {0}: sibling.name
#: src/lib/acp/config-value-hints.ts
msgid "{0} · default"
@@ -353,6 +366,12 @@ msgstr "{0} de {1} proyectos seleccionados"
msgid "{0} of {1} selected"
msgstr "{0} de {1} seleccionados"
+#. placeholder {0}: resolvedTarget.displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} se abre mediante un enlace y no acepta adjuntos — elige un agente integrado en la app."
+
#. placeholder {0}: siblings.length
#: src/components/SkillPluginBundleBanner.tsx
msgid "{0} other skills by this publisher"
@@ -381,6 +400,12 @@ msgstr "Propiedades de {0}"
msgid "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
msgstr "{0} lee esta habilidad a través de {poolRootRel}. Haz clic para que {1} deje de recibir \"{2}\": {subRoot} conserva sus demás habilidades pero deja de seguir a {poolRootRel}."
+#. placeholder {0}: TERMINAL_CLIS[selection.cli].displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} se ejecuta en una terminal y no acepta adjuntos — elige un agente integrado en la app."
+
#. placeholder {0}: formatToolList( [f.host, ...following.map((o) => o.host)].map(hostLabel), i18n.locale, )
#: src/components/settings/SkillTargetsPicker.tsx
msgid "{0} share this folder."
@@ -510,6 +535,7 @@ msgid "{agentName} couldn't start."
msgstr "{agentName} no pudo iniciarse."
#: src/components/acp/ThreadView.tsx
+#: src/lib/acp/launch-agent-thread.ts
msgid "{agentName} doesn't accept image attachments."
msgstr "{agentName} no acepta adjuntos de imagen."
@@ -860,6 +886,14 @@ msgstr "hace {minutes} min"
msgid "{name} CLI"
msgstr "CLI de {name}"
+#: src/lib/acp/image-attachment.ts
+msgid "{name} has no resolvable path — the agent can only read files inside the workspace."
+msgstr "{name} no tiene una ruta resoluble — el agente solo puede leer archivos dentro del espacio de trabajo."
+
+#: src/lib/acp/image-attachment.ts
+msgid "{name} is outside the workspace. Move it into your project first."
+msgstr "{name} está fuera del espacio de trabajo. Muévelo primero a tu proyecto."
+
#: src/components/GraphPanel.tsx
msgid "{nodeCount, plural, one {# node} other {# nodes}}"
msgstr "{nodeCount, plural, one {# nodo} many {# nodos} other {# nodos}}"
@@ -873,6 +907,7 @@ msgid "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
msgstr "{openedWorktreeCount, plural, one {worktree} many {worktrees} other {worktrees}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
msgstr "{outsideWorkspaceCount, plural, one {Se omitió # archivo fuera del espacio de trabajo.} many {Se omitieron # archivos fuera del espacio de trabajo.} other {Se omitieron # archivos fuera del espacio de trabajo.}}"
@@ -975,6 +1010,7 @@ msgid "{skillCount, plural, one {skill} other {skills}}"
msgstr "{skillCount, plural, one {habilidad} many {habilidades} other {habilidades}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
msgstr "{skipTotal, plural, one {Se omitió # archivo que no se pudo adjuntar.} many {Se omitieron # archivos que no se pudieron adjuntar.} other {Se omitieron # archivos que no se pudieron adjuntar.}}"
@@ -1019,6 +1055,11 @@ msgstr "{templateCount, plural, one {plantilla} many {plantillas} other {plantil
msgid "{tokens, plural, one {token} other {tokens}}"
msgstr "{tokens, plural, one {token} many {tokens} other {tokens}}"
+#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
+msgid "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+msgstr "{tooLargeTotalCount, plural, one {Se omitió # archivo — los adjuntos no pueden superar {budgetKb} KB en total por mensaje.} many {Se omitieron # archivos — los adjuntos no pueden superar {budgetKb} KB en total por mensaje.} other {Se omitieron # archivos — los adjuntos no pueden superar {budgetKb} KB en total por mensaje.}}"
+
#: src/components/file-tree-problem-indicators.ts
msgid "{total, plural, one {# problem} other {# problems}}"
msgstr "{total, plural, one {# problema} many {# problemas} other {# problemas}}"
@@ -1028,6 +1069,7 @@ msgid "{truncatedShownCount, plural, one {Showing the first item in one folder
msgstr "{truncatedShownCount, plural, one {Se muestra el primer elemento de una carpeta; el resto de esa carpeta está oculto.} many {Se muestran los primeros {formattedCount} elementos de una carpeta; el resto de esa carpeta está oculto.} other {Se muestran los primeros {formattedCount} elementos de una carpeta; el resto de esa carpeta está oculto.}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
msgstr "{unknownPathCount, plural, one {Se omitió # archivo: este navegador no puede adjuntar archivos por ruta.} many {Se omitieron # archivos: este navegador no puede adjuntar archivos por ruta.} other {Se omitieron # archivos: este navegador no puede adjuntar archivos por ruta.}}"
@@ -2072,7 +2114,7 @@ msgstr "Sugerencias de recursos"
msgid "Asset: {title}"
msgstr "Recurso: {title}"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid "Attach a file"
msgstr "Adjuntar un archivo"
@@ -2085,6 +2127,10 @@ msgstr "Adjuntar imágenes"
msgid "Attachments"
msgstr "Adjuntos"
+#: src/components/BottomComposer.tsx
+msgid "Attachments aren't available in note windows yet — use the main window to attach files."
+msgstr "Los adjuntos aún no están disponibles en las ventanas de notas — usa la ventana principal para adjuntar archivos."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Attachments must total under 3 MB."
@@ -4052,6 +4098,7 @@ msgid "Couldn't reach the Open Knowledge server to upload {fileName}."
msgstr "No se pudo contactar con el servidor de Open Knowledge para subir {fileName}."
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "Couldn't read {fileName}."
msgstr "No se pudo leer {fileName}."
@@ -6042,6 +6089,10 @@ msgstr "Zona para soltar archivos"
msgid "File duplicated"
msgstr "Archivo duplicado"
+#: src/lib/acp/image-attachment.ts
+msgid "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+msgstr "El archivo es demasiado grande ({sizeKb} KB) — cada adjunto tiene un límite de {limitKb} KB. Recórtalo o redimensiónalo y vuelve a intentarlo."
+
#: src/components/NewItemDialog.tsx
msgid "File name"
msgstr "Nombre del archivo"
@@ -6243,6 +6294,13 @@ msgstr "Se copió el enlace para compartir la carpeta."
msgid "Folder target: {linkTitle}. Click to open the overview."
msgstr "Carpeta de destino: {linkTitle}. Haz clic para abrir la vista general."
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "Folders and empty files can't be attached — drop the files themselves."
+msgstr "No se pueden adjuntar carpetas ni archivos vacíos — suelta los archivos en sí."
+
#: src/components/acp/ThreadView.tsx
msgid "Follow the agent's edits"
msgstr "Seguir las ediciones del agente"
@@ -8632,6 +8690,11 @@ msgstr "Todavía no hay ningún agente configurado: elige uno en el menú de env
msgid "no agents — saved, not installed anywhere"
msgstr "sin agentes — guardadas, no instaladas en ningún sitio"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+msgstr "Todavía no hay ningún agente configurado: para adjuntar archivos, añade un agente integrado en la app desde Conexiones de agentes."
+
#: src/components/settings/AgentConnectionsSection.tsx
msgid "No agents available."
msgstr "No hay agentes disponibles."
@@ -9201,6 +9264,10 @@ msgstr "Solo yo"
msgid "Only modified"
msgstr "Solo los modificados"
+#: src/lib/acp/image-attachment.ts
+msgid "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+msgstr "Solo se admiten imágenes PNG, JPEG, GIF y WebP (se recibió {mimeType})."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Only PNG, JPEG, or WebP images are allowed."
@@ -10869,7 +10936,7 @@ msgstr "Quitar"
#. placeholder {0}: file.name
#. placeholder {0}: image.name
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/PendingImageStrip.tsx
#: src/components/ImageAttachments.tsx
msgid "Remove {0}"
msgstr "Quitar {0}"
@@ -13773,6 +13840,11 @@ msgstr "Este {targetNoun} se compartió desde la rama <0>{shareBranch}</0>. No e
msgid "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
msgstr "Este {targetNoun} se compartió desde la rama <0>{shareBranch}</0>. Ahora mismo estás en <1>{currentLabel}</1>."
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "This agent doesn't accept attachments — remove them or choose an in-app agent."
+msgstr "Este agente no acepta adjuntos — quítalos o elige un agente integrado en la app."
+
#: src/editor/composer-mention/ComposerSlashMenu.tsx
msgid "This agent doesn't offer slash commands"
msgstr "Este agente no ofrece comandos de barra"
@@ -13828,6 +13900,12 @@ msgstr "Esto se puede configurar en Ajustes > Herramientas de IA y CLI"
msgid "This comment is on the whole property"
msgstr "Este comentario es sobre toda la propiedad"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "This composer doesn't accept attachments."
+msgstr "Aquí no se pueden adjuntar archivos."
+
#: src/components/DiffViewBoundary.tsx
msgid "This conflict is resolved."
msgstr "Este conflicto está resuelto."
@@ -14654,6 +14732,10 @@ msgstr "No se puede resolver el archivo {identity}. Ir a la referencia."
msgid "Unresolvable image {identity}. Go to reference."
msgstr "No se puede resolver la imagen {identity}. Ir a la referencia."
+#: src/lib/acp/image-attachment.ts
+msgid "Unsupported file type: {fileType}."
+msgstr "Tipo de archivo no admitido: {fileType}."
+
#: src/components/BugReportHistory.tsx
msgid "Untitled report"
msgstr "Informe sin título"
@@ -14794,6 +14876,7 @@ msgstr "Se subió como \"{0}\": el nombre \"{1}\" ya estaba ocupado."
msgid "Uploading"
msgstr "Subiendo"
+#: src/components/acp/PendingImageStrip.tsx
#: src/editor/image-upload/index.ts
msgid "Uploading {fileName}"
msgstr "Subiendo {fileName}"
diff --git a/packages/app/src/locales/fr/messages.json b/packages/app/src/locales/fr/messages.json
index 304decc37..68e298b3d 100644
--- a/packages/app/src/locales/fr/messages.json
+++ b/packages/app/src/locales/fr/messages.json
@@ -970,6 +970,7 @@
],
"9fhQRL": ["Canal bêta"],
"9fvog2": ["Aperçu indisponible : ", ["errorDetail"]],
+ "9gu0n7": ["Type de fichier non pris en charge : ", ["fileType"], "."],
"9hEdtC": [
"Celle-ci apprend à vos outils IA à travailler avec OpenKnowledge. Elle vit dans le dossier du projet, elle s'installe donc pour toute personne qui ouvre le projet."
],
@@ -1534,6 +1535,11 @@
"FjkaiT": ["Zoom arrière"],
"Fjz6aJ": ["Envoyer dans un nouveau chat"],
"FqGWeR": ["Impossible de joindre le registre des agents."],
+ "FqMKq2": [
+ "Seules les images PNG, JPEG, GIF et WebP sont prises en charge (",
+ ["mimeType"],
+ " reçu)."
+ ],
"FqTpiN": ["Wiki des oiseaux"],
"Fqr8BP": ["Visionneuse PDF multipage avec barre d'outils (miniatures, navigation, zoom)."],
"Fqx38P": ["Qu'est-ce qui vous a gêné ?"],
@@ -1573,6 +1579,10 @@
"G7-rf8": ["Erreur de syntaxe du motif : ", ["message"]],
"G7bn_N": ["Démarrer un agent"],
"G7cMuO": ["Aperçu HTML"],
+ "G7gMiG": [
+ ["0"],
+ " s'exécute dans un terminal et n'accepte pas les pièces jointes — choisissez un agent intégré à l'app."
+ ],
"G8t9NN": ["Ajouter une propriété"],
"GA-UkN": ["Type de ", ["keyName"], " : ", ["typeLabel"], ". Cliquez pour changer."],
"GAohqx": ["Supprimer la colonne"],
@@ -1640,6 +1650,9 @@
],
"Gfr4fu": ["Le serveur ne peut pas ouvrir de documents"],
"GhjUB_": ["Reconnecté"],
+ "Gi8Akx": [
+ "Aucun agent n'est encore configuré — pour joindre des fichiers, ajoutez un agent intégré à l'app dans Connexions des agents."
+ ],
"GidGkh": ["Mettre à jour depuis la source"],
"GifIjR": [
"La compétence « ",
@@ -1916,6 +1929,10 @@
"OpenKnowledge n’a pas pu lire terminal.shell dans .ok/local/config.yml. Un shell Windows disponible sera utilisé à la place."
],
"K9J00P": ["Échec du clonage — erreur de connexion"],
+ "K9ViCA": [
+ ["name"],
+ " se trouve hors de l'espace de travail. Déplacez-le d'abord dans votre projet."
+ ],
"KDrbNG": ["OpenKnowledge a consulté les liens de ", ["subject"]],
"KDuPiY": ["Envoi de ", ["fileName"]],
"KDw4GX": ["Réessayer"],
@@ -1945,6 +1962,13 @@
"KZLdgR": ["Voir <0>#design-docs</0> pour les dernières spécifications."],
"K_vT1F": ["Synchronisation amont"],
"KaFCD3": ["Ouvre ce lien dans un nouvel onglet et réduit le graphe."],
+ "Kb08WL": [
+ "Le fichier est trop volumineux (",
+ ["sizeKb"],
+ " KB) — chaque pièce jointe est limitée à ",
+ ["limitKb"],
+ " KB. Recadrez-le ou réduisez sa taille, puis réessayez."
+ ],
"Kbz9RK": ["Numéro de port fixe"],
"Kdvukk": ["Les vérifications Markdown ne s’appliquent pas à ce fichier."],
"KeXgA-": [
@@ -2129,6 +2153,17 @@
"MBKkUy": [
"skills.sh est indisponible ; affichage des résultats GitHub (sans classement par installations)."
],
+ "MBfjUk": [
+ [
+ "0",
+ "plural",
+ {
+ "one": ["Envoi de ", "#", " pièce jointe"],
+ "many": ["Envoi de ", "#", " pièces jointes"],
+ "other": ["Envoi de ", "#", " pièces jointes"]
+ }
+ ]
+ ],
"MCjC9A": ["Supprimer ", ["deleteDescriptorLabel"]],
"MDBJwN": ["Difficile à utiliser"],
"MDZSJe": ["Quand l'agent effectue son travail planifié."],
@@ -2709,6 +2744,7 @@
{ "one": ["#", " erreur"], "many": ["#", " erreurs"], "other": ["#", " erreurs"] }
]
],
+ "SgAFuo": ["Impossible de joindre des fichiers ici."],
"SgKLfA": ["Non connecté à GitHub."],
"Sh3Qkg": ["Aucune branche correspondante."],
"Si7mIR": ["Créer un rapport"],
@@ -3661,6 +3697,10 @@
"Tant que vous êtes déconnecté, les mises à jour sont recherchées au plus toutes les 3 minutes, quel que soit ce réglage."
],
"cIptmH": ["Dans l'application Claude Desktop"],
+ "cK5W4m": [
+ ["0"],
+ " s'ouvre via un lien et n'accepte pas les pièces jointes — choisissez un agent intégré à l'app."
+ ],
"cLP0Lf": ["Source de compétence distante"],
"cLn264": ["Impossible de lire ce fichier de thème"],
"cMMb6H": [["imported"], " installées, mais ", ["failed"], " ont échoué : ", ["failedNames"]],
@@ -3758,6 +3798,17 @@
"L'écriture de ce fichier a échoué. Consultez le journal d'OpenKnowledge pour en connaître la raison."
],
"dD7NPy": ["Plan"],
+ "dDBZ0j": [
+ [
+ "0",
+ "plural",
+ {
+ "one": ["#", " pièce jointe prête à envoyer"],
+ "many": ["#", " pièces jointes prêtes à envoyer"],
+ "other": ["#", " pièces jointes prêtes à envoyer"]
+ }
+ ]
+ ],
"dDpCOp": [
"Renommage réussi, mais la barre latérale n'est peut-être pas à jour — actualisez pour resynchroniser"
],
@@ -3778,6 +3829,32 @@
"dOHMA0": ["Échec du déplacement"],
"dOxPd4": ["Note de bas de page"],
"dQHSCs": ["Convertir (supprimer l'original)"],
+ "dRCAgQ": [
+ [
+ "tooLargeTotalCount",
+ "plural",
+ {
+ "one": [
+ "#",
+ " fichier ignoré — les pièces jointes ne peuvent pas dépasser ",
+ ["budgetKb"],
+ " KB au total par message."
+ ],
+ "many": [
+ "#",
+ " fichiers ignorés — les pièces jointes ne peuvent pas dépasser ",
+ ["budgetKb"],
+ " KB au total par message."
+ ],
+ "other": [
+ "#",
+ " fichiers ignorés — les pièces jointes ne peuvent pas dépasser ",
+ ["budgetKb"],
+ " KB au total par message."
+ ]
+ }
+ ]
+ ],
"dSORvE": ["Arrête l’exécution en cours et envoie ceci à la place"],
"dT-HIQ": ["Trop de références en direct sur cette page. Ce tableau n'a pas été chargé."],
"dTaauv": ["Raison : ", ["reason"]],
@@ -5095,6 +5172,10 @@
"q63KUv": ["Ajouter MCP et la compétence"],
"q7F5am": ["titre"],
"q8aCbb": ["Deux versions de « ", ["0"], " » — source contre ", ["editor"]],
+ "q8tKSU": [
+ ["name"],
+ " n'a pas de chemin résoluble — l'agent ne peut lire que les fichiers situés dans l'espace de travail."
+ ],
"qAQVSD": ["La réponse des titres de page n'était pas du JSON"],
"qAhFeg": [
["userName"],
@@ -5130,6 +5211,9 @@
"qTT48-": [
"Liens wiki comme [[Page]] — un moyen pris en charge de créer un lien ici, mais un lecteur externe ne résout rien et affiche les parenthèses."
],
+ "qTULIf": [
+ "Cet agent n'accepte pas les pièces jointes — retirez-les ou choisissez un agent intégré à l'app."
+ ],
"qTcVwj": ["Parcourez ou envoyez une compétence pour ce projet."],
"qTcZZu": [
"Échec du chargement des étiquettes. Appuyez sur <0>Échap</0> puis rouvrez pour réessayer."
@@ -5219,6 +5303,9 @@
"rJm8-2": [
"Impossible d’accéder au presse-papiers — le thème se trouve dans la zone ci-dessous."
],
+ "rNi1kZ": [
+ "Les dossiers et les fichiers vides ne peuvent pas être joints — déposez les fichiers eux-mêmes."
+ ],
"rNifQd": ["Retirer la propriété"],
"rQAQus": ["Impossible d'enregistrer le modèle : ", ["error"]],
"rQRrkB": ["hier"],
@@ -5634,6 +5721,9 @@
"vPLUCm": ["Image ", ["identity"], " manquante. Accéder à la référence."],
"vPXOUw": ["Basculer l'affichage de la source"],
"vQIVHc": ["Propriétés du dossier"],
+ "vQOuVY": [
+ "Les pièces jointes ne sont pas encore disponibles dans les fenêtres de notes — utilisez la fenêtre principale pour joindre des fichiers."
+ ],
"vUP_HF": [
"Sans outil d'IA connecté, ",
[
diff --git a/packages/app/src/locales/fr/messages.po b/packages/app/src/locales/fr/messages.po
index 6a388bd29..220ebd92d 100644
--- a/packages/app/src/locales/fr/messages.po
+++ b/packages/app/src/locales/fr/messages.po
@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid " · references only (no embedded contents)"
msgstr " · références seulement (pas de contenu intégré)"
@@ -146,6 +146,12 @@ msgstr "(certains sont peut-être déjà masqués par d'autres règles)"
msgid "(symlink)"
msgstr "(lien symbolique)"
+#. placeholder {0}: pendingAttachments.length
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+msgstr "{0, plural, one {# pièce jointe prête à envoyer} many {# pièces jointes prêtes à envoyer} other {# pièces jointes prêtes à envoyer}}"
+
#. placeholder {0}: preview.backlinkCount
#: src/editor/link-preview/InternalDocPreviewCard.tsx
msgid "{0, plural, one {# backlink} other {# backlinks}}"
@@ -260,6 +266,13 @@ msgstr "{0, plural, one {Extension} many {Extensions} other {Extensions}}"
msgid "{0, plural, one {Skill} other {Skills}}"
msgstr "{0, plural, one {Compétence} many {Compétences} other {Compétences}}"
+#. placeholder {0}: pendingUploads.length
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+msgstr "{0, plural, one {Envoi de # pièce jointe} many {Envoi de # pièces jointes} other {Envoi de # pièces jointes}}"
+
#. placeholder {0}: sibling.name
#: src/lib/acp/config-value-hints.ts
msgid "{0} · default"
@@ -353,6 +366,12 @@ msgstr "{0} projet(s) sélectionné(s) sur {1}"
msgid "{0} of {1} selected"
msgstr "{0} sélectionné(s) sur {1}"
+#. placeholder {0}: resolvedTarget.displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} s'ouvre via un lien et n'accepte pas les pièces jointes — choisissez un agent intégré à l'app."
+
#. placeholder {0}: siblings.length
#: src/components/SkillPluginBundleBanner.tsx
msgid "{0} other skills by this publisher"
@@ -381,6 +400,12 @@ msgstr "Propriétés de {0}"
msgid "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
msgstr "{0} lit cette compétence via {poolRootRel}. Cliquez pour que {1} cesse de recevoir « {2} » — {subRoot} garde ses autres compétences mais ne suit plus {poolRootRel}."
+#. placeholder {0}: TERMINAL_CLIS[selection.cli].displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} s'exécute dans un terminal et n'accepte pas les pièces jointes — choisissez un agent intégré à l'app."
+
#. placeholder {0}: formatToolList( [f.host, ...following.map((o) => o.host)].map(hostLabel), i18n.locale, )
#: src/components/settings/SkillTargetsPicker.tsx
msgid "{0} share this folder."
@@ -510,6 +535,7 @@ msgid "{agentName} couldn't start."
msgstr "{agentName} n’a pas pu démarrer."
#: src/components/acp/ThreadView.tsx
+#: src/lib/acp/launch-agent-thread.ts
msgid "{agentName} doesn't accept image attachments."
msgstr "{agentName} n'accepte pas les pièces jointes d'image."
@@ -860,6 +886,14 @@ msgstr "il y a {minutes} min"
msgid "{name} CLI"
msgstr "CLI {name}"
+#: src/lib/acp/image-attachment.ts
+msgid "{name} has no resolvable path — the agent can only read files inside the workspace."
+msgstr "{name} n'a pas de chemin résoluble — l'agent ne peut lire que les fichiers situés dans l'espace de travail."
+
+#: src/lib/acp/image-attachment.ts
+msgid "{name} is outside the workspace. Move it into your project first."
+msgstr "{name} se trouve hors de l'espace de travail. Déplacez-le d'abord dans votre projet."
+
#: src/components/GraphPanel.tsx
msgid "{nodeCount, plural, one {# node} other {# nodes}}"
msgstr "{nodeCount, plural, one {# nœud} many {# nœuds} other {# nœuds}}"
@@ -873,6 +907,7 @@ msgid "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
msgstr "{openedWorktreeCount, plural, one {worktree} many {worktrees} other {worktrees}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
msgstr "{outsideWorkspaceCount, plural, one {# fichier hors de l'espace de travail ignoré.} many {# fichiers hors de l'espace de travail ignorés.} other {# fichiers hors de l'espace de travail ignorés.}}"
@@ -975,6 +1010,7 @@ msgid "{skillCount, plural, one {skill} other {skills}}"
msgstr "{skillCount, plural, one {compétence} many {compétences} other {compétences}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
msgstr "{skipTotal, plural, one {# fichier ignoré, impossible à joindre.} many {# fichiers ignorés, impossibles à joindre.} other {# fichiers ignorés, impossibles à joindre.}}"
@@ -1019,6 +1055,11 @@ msgstr "{templateCount, plural, one {modèle} many {modèles} other {modèles}}"
msgid "{tokens, plural, one {token} other {tokens}}"
msgstr "{tokens, plural, one {token} many {tokens} other {tokens}}"
+#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
+msgid "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+msgstr "{tooLargeTotalCount, plural, one {# fichier ignoré — les pièces jointes ne peuvent pas dépasser {budgetKb} KB au total par message.} many {# fichiers ignorés — les pièces jointes ne peuvent pas dépasser {budgetKb} KB au total par message.} other {# fichiers ignorés — les pièces jointes ne peuvent pas dépasser {budgetKb} KB au total par message.}}"
+
#: src/components/file-tree-problem-indicators.ts
msgid "{total, plural, one {# problem} other {# problems}}"
msgstr "{total, plural, one {# problème} many {# problèmes} other {# problèmes}}"
@@ -1028,6 +1069,7 @@ msgid "{truncatedShownCount, plural, one {Showing the first item in one folder
msgstr "{truncatedShownCount, plural, one {Affichage du premier élément d'un dossier — le reste de ce dossier est masqué.} many {Affichage des {formattedCount} premiers éléments d'un dossier — le reste de ce dossier est masqué.} other {Affichage des {formattedCount} premiers éléments d'un dossier — le reste de ce dossier est masqué.}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
msgstr "{unknownPathCount, plural, one {# fichier ignoré — ce navigateur ne peut pas joindre les fichiers par chemin.} many {# fichiers ignorés — ce navigateur ne peut pas joindre les fichiers par chemin.} other {# fichiers ignorés — ce navigateur ne peut pas joindre les fichiers par chemin.}}"
@@ -2072,7 +2114,7 @@ msgstr "Suggestions de ressources"
msgid "Asset: {title}"
msgstr "Ressource : {title}"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid "Attach a file"
msgstr "Joindre un fichier"
@@ -2085,6 +2127,10 @@ msgstr "Joindre des images"
msgid "Attachments"
msgstr "Pièces jointes"
+#: src/components/BottomComposer.tsx
+msgid "Attachments aren't available in note windows yet — use the main window to attach files."
+msgstr "Les pièces jointes ne sont pas encore disponibles dans les fenêtres de notes — utilisez la fenêtre principale pour joindre des fichiers."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Attachments must total under 3 MB."
@@ -4052,6 +4098,7 @@ msgid "Couldn't reach the Open Knowledge server to upload {fileName}."
msgstr "Impossible de joindre le serveur Open Knowledge pour envoyer {fileName}."
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "Couldn't read {fileName}."
msgstr "Impossible de lire {fileName}."
@@ -6042,6 +6089,10 @@ msgstr "Zone de dépôt de fichiers"
msgid "File duplicated"
msgstr "Fichier dupliqué"
+#: src/lib/acp/image-attachment.ts
+msgid "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+msgstr "Le fichier est trop volumineux ({sizeKb} KB) — chaque pièce jointe est limitée à {limitKb} KB. Recadrez-le ou réduisez sa taille, puis réessayez."
+
#: src/components/NewItemDialog.tsx
msgid "File name"
msgstr "Nom du fichier"
@@ -6243,6 +6294,13 @@ msgstr "Lien de partage du dossier copié."
msgid "Folder target: {linkTitle}. Click to open the overview."
msgstr "Dossier cible : {linkTitle}. Cliquez pour ouvrir la synthèse."
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "Folders and empty files can't be attached — drop the files themselves."
+msgstr "Les dossiers et les fichiers vides ne peuvent pas être joints — déposez les fichiers eux-mêmes."
+
#: src/components/acp/ThreadView.tsx
msgid "Follow the agent's edits"
msgstr "Suivre les modifications de l'agent"
@@ -8632,6 +8690,11 @@ msgstr "Aucun agent n'est encore configuré — choisissez-en un dans le menu d'
msgid "no agents — saved, not installed anywhere"
msgstr "aucun agent — enregistrées, installées nulle part"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+msgstr "Aucun agent n'est encore configuré — pour joindre des fichiers, ajoutez un agent intégré à l'app dans Connexions des agents."
+
#: src/components/settings/AgentConnectionsSection.tsx
msgid "No agents available."
msgstr "Aucun agent disponible."
@@ -9201,6 +9264,10 @@ msgstr "Moi uniquement"
msgid "Only modified"
msgstr "Modifiées uniquement"
+#: src/lib/acp/image-attachment.ts
+msgid "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+msgstr "Seules les images PNG, JPEG, GIF et WebP sont prises en charge ({mimeType} reçu)."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Only PNG, JPEG, or WebP images are allowed."
@@ -10869,7 +10936,7 @@ msgstr "Retirer"
#. placeholder {0}: file.name
#. placeholder {0}: image.name
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/PendingImageStrip.tsx
#: src/components/ImageAttachments.tsx
msgid "Remove {0}"
msgstr "Retirer {0}"
@@ -13773,6 +13840,11 @@ msgstr "Ce {targetNoun} a été partagé depuis la branche <0>{shareBranch}</0>.
msgid "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
msgstr "Ce {targetNoun} a été partagé depuis la branche <0>{shareBranch}</0>. Vous êtes actuellement sur <1>{currentLabel}</1>."
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "This agent doesn't accept attachments — remove them or choose an in-app agent."
+msgstr "Cet agent n'accepte pas les pièces jointes — retirez-les ou choisissez un agent intégré à l'app."
+
#: src/editor/composer-mention/ComposerSlashMenu.tsx
msgid "This agent doesn't offer slash commands"
msgstr "Cet agent ne propose pas de commandes slash"
@@ -13828,6 +13900,12 @@ msgstr "Cela se configure dans Paramètres > Outils IA et CLI"
msgid "This comment is on the whole property"
msgstr "Ce commentaire porte sur toute la propriété"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "This composer doesn't accept attachments."
+msgstr "Impossible de joindre des fichiers ici."
+
#: src/components/DiffViewBoundary.tsx
msgid "This conflict is resolved."
msgstr "Ce conflit est résolu."
@@ -14654,6 +14732,10 @@ msgstr "Fichier {identity} impossible à résoudre. Accéder à la référence."
msgid "Unresolvable image {identity}. Go to reference."
msgstr "Image {identity} impossible à résoudre. Accéder à la référence."
+#: src/lib/acp/image-attachment.ts
+msgid "Unsupported file type: {fileType}."
+msgstr "Type de fichier non pris en charge : {fileType}."
+
#: src/components/BugReportHistory.tsx
msgid "Untitled report"
msgstr "Rapport sans titre"
@@ -14794,6 +14876,7 @@ msgstr "Envoyé sous « {0} » — le nom « {1} » était déjà pris."
msgid "Uploading"
msgstr "Envoi en cours"
+#: src/components/acp/PendingImageStrip.tsx
#: src/editor/image-upload/index.ts
msgid "Uploading {fileName}"
msgstr "Envoi de {fileName}"
diff --git a/packages/app/src/locales/hi/messages.json b/packages/app/src/locales/hi/messages.json
index 0c87393c1..797e51a25 100644
--- a/packages/app/src/locales/hi/messages.json
+++ b/packages/app/src/locales/hi/messages.json
@@ -791,6 +791,7 @@
],
"9fhQRL": ["बीटा चैनल"],
"9fvog2": ["पूर्वावलोकन अनुपलब्ध: ", ["errorDetail"]],
+ "9gu0n7": ["असमर्थित फ़ाइल प्रकार: ", ["fileType"], "।"],
"9hEdtC": [
"यह आपके AI टूल को OpenKnowledge के साथ काम करना सिखाती है। यह प्रोजेक्ट फ़ोल्डर में रहती है, इसलिए यह हर उस व्यक्ति के लिए इंस्टॉल होती है जो प्रोजेक्ट खोलता है।"
],
@@ -1276,6 +1277,7 @@
"FjkaiT": ["छोटा करें"],
"Fjz6aJ": ["नई चैट में भेजें"],
"FqGWeR": ["एजेंट रजिस्ट्री तक नहीं पहुँचा जा सका।"],
+ "FqMKq2": ["केवल PNG, JPEG, GIF और WebP छवियाँ समर्थित हैं (", ["mimeType"], " मिला)।"],
"FqTpiN": ["पक्षी विकी"],
"Fqr8BP": ["टूलबार नियंत्रणों वाला बहु-पृष्ठ PDF दर्शक (थंबनेल, पेज नेविगेशन, ज़ूम)।"],
"Fqx38P": ["क्या रुकावट बनी?"],
@@ -1301,6 +1303,7 @@
"G7-rf8": ["पैटर्न वाक्यविन्यास त्रुटि: ", ["message"]],
"G7bn_N": ["एक एजेंट शुरू करें"],
"G7cMuO": ["HTML पूर्वावलोकन"],
+ "G7gMiG": [["0"], " टर्मिनल में चलता है और अनुलग्नक स्वीकार नहीं करता — इसके बजाय ऐप के भीतर का एजेंट चुनें।"],
"G8t9NN": ["एक प्रॉपर्टी जोड़ें"],
"GA-UkN": [["keyName"], " प्रकार: ", ["typeLabel"], ". बदलने के लिए क्लिक करें।"],
"GAohqx": ["कॉलम हटाएँ"],
@@ -1355,6 +1358,7 @@
"GemPfn": ["आगे जाने वाले लिंक की त्रुटि प्रतिक्रिया पढ़ने में विफल (HTTP ", ["status"], ")"],
"Gfr4fu": ["सर्वर दस्तावेज़ नहीं खोल सकता"],
"GhjUB_": ["फिर से जुड़ गया"],
+ "Gi8Akx": ["अभी कोई एजेंट सेट अप नहीं है — फ़ाइलें संलग्न करने के लिए एजेंट कनेक्शन में ऐप के भीतर का एजेंट जोड़ें।"],
"GidGkh": ["स्रोत से अपडेट करें"],
"GifIjR": [
"स्किल “",
@@ -1580,6 +1584,7 @@
"OpenKnowledge .ok/local/config.yml में terminal.shell नहीं पढ़ सका। इसके बजाय उपलब्ध Windows शेल का उपयोग किया जा रहा है।"
],
"K9J00P": ["क्लोन विफल — कनेक्शन त्रुटि"],
+ "K9ViCA": [["name"], " कार्यक्षेत्र के बाहर है। पहले इसे अपने प्रोजेक्ट में ले जाएँ।"],
"KDrbNG": ["OpenKnowledge ने ", ["subject"], " के लिंक खोजे"],
"KDuPiY": [["fileName"], " अपलोड की जा रही है"],
"KDw4GX": ["फिर कोशिश करें"],
@@ -1609,6 +1614,13 @@
"KZLdgR": ["नवीनतम स्पेक के लिए <0>#design-docs</0> देखें।"],
"K_vT1F": ["अपस्ट्रीम सिंक"],
"KaFCD3": ["इस लिंक को नए टैब में खोलें और ग्राफ़ समेटें।"],
+ "Kb08WL": [
+ "फ़ाइल बहुत बड़ी है (",
+ ["sizeKb"],
+ " KB) — हर अनुलग्नक की सीमा ",
+ ["limitKb"],
+ " KB है। इसे क्रॉप करें या आकार छोटा करके फिर से आज़माएँ।"
+ ],
"Kbz9RK": ["निश्चित port संख्या"],
"Kdvukk": ["Markdown जाँच इस फ़ाइल पर लागू नहीं होती है।"],
"KeXgA-": ["वह अंश नहीं मिल सका — जिस पाठ पर वह था वह बदल गया हो सकता है।"],
@@ -1756,6 +1768,13 @@
"M92_0q": ["टिप्पणी बंद करें"],
"M9597s": ["साझा URL तैयार किया जा रहा है…"],
"MBKkUy": ["skills.sh अनुपलब्ध है; GitHub के परिणाम दिखाए जा रहे हैं (इंस्टॉल के अनुसार क्रम नहीं)।"],
+ "MBfjUk": [
+ [
+ "0",
+ "plural",
+ { "one": ["#", " अनुलग्नक अपलोड हो रहा है"], "other": ["#", " अनुलग्नक अपलोड हो रहे हैं"] }
+ ]
+ ],
"MCjC9A": [["deleteDescriptorLabel"], " हटाएँ"],
"MDBJwN": ["उपयोग करना कठिन"],
"MDZSJe": ["एजेंट अपना निर्धारित काम कब करता है।"],
@@ -2273,6 +2292,7 @@
],
"ScwcF2": ["इस स्थान पर एक प्रोजेक्ट पहले से मौजूद है। कोई दूसरा मूल फ़ोल्डर चुनें।"],
"Sg-6Bo": [["errorCount", "plural", { "one": ["#", " त्रुटि"], "other": ["#", " त्रुटियाँ"] }]],
+ "SgAFuo": ["यहाँ फ़ाइलें अटैच नहीं की जा सकतीं।"],
"SgKLfA": ["GitHub से जुड़ा नहीं।"],
"Sh3Qkg": ["कोई मेल खाती ब्रांच नहीं।"],
"Si7mIR": ["रिपोर्ट बनाएँ"],
@@ -3053,6 +3073,7 @@
"cHhH3i": ["एक आवश्यक git टूल"],
"cIFYZn": ["जब तक आप साइन आउट हैं, इस सेटिंग के बावजूद अपडेट अधिकतम हर 3 मिनट में जाँचे जाते हैं।"],
"cIptmH": ["Claude Desktop App में"],
+ "cK5W4m": [["0"], " एक लिंक से खुलता है और अनुलग्नक स्वीकार नहीं करता — इसके बजाय ऐप के भीतर का एजेंट चुनें।"],
"cLP0Lf": ["रिमोट स्किल स्रोत"],
"cLn264": ["यह थीम फ़ाइल पढ़ी नहीं जा सकी"],
"cMMb6H": [["imported"], " इंस्टॉल की गईं, पर ", ["failed"], " विफल रहीं: ", ["failedNames"]],
@@ -3127,6 +3148,13 @@
"d6qW27": [["agentName"], " ने बताया: ", ["headline"]],
"dCforW": ["यह फ़ाइल लिखने में विफल रहा। कारण जानने के लिए OpenKnowledge लॉग देखें।"],
"dD7NPy": ["रूपरेखा"],
+ "dDBZ0j": [
+ [
+ "0",
+ "plural",
+ { "one": ["#", " अनुलग्नक भेजने के लिए तैयार है"], "other": ["#", " अनुलग्नक भेजने के लिए तैयार हैं"] }
+ ]
+ ],
"dDpCOp": ["नाम बदल गया पर साइडबार पुराना हो सकता है — फिर से सिंक करने के लिए ताज़ा करें"],
"dEgA5A": ["रद्द करें"],
"dFrqBg": [["0"], " प्लगइन"],
@@ -3145,6 +3173,26 @@
"dOHMA0": ["हिलाने में विफल"],
"dOxPd4": ["फ़ुटनोट"],
"dQHSCs": ["बदलें (मूल हटाएँ)"],
+ "dRCAgQ": [
+ [
+ "tooLargeTotalCount",
+ "plural",
+ {
+ "one": [
+ "#",
+ " फ़ाइल छोड़ी गई — प्रति संदेश अनुलग्नक कुल ",
+ ["budgetKb"],
+ " KB से अधिक नहीं हो सकते।"
+ ],
+ "other": [
+ "#",
+ " फ़ाइलें छोड़ी गईं — प्रति संदेश अनुलग्नक कुल ",
+ ["budgetKb"],
+ " KB से अधिक नहीं हो सकते।"
+ ]
+ }
+ ]
+ ],
"dSORvE": ["मौजूदा प्रक्रिया रोककर इसके बजाय यह भेजता है"],
"dT-HIQ": ["इस पेज पर बहुत अधिक लाइव संदर्भ हैं। यह बोर्ड लोड नहीं किया गया।"],
"dTaauv": ["कारण: ", ["reason"]],
@@ -4258,6 +4306,10 @@
"q63KUv": ["MCP और स्किल जोड़ें"],
"q7F5am": ["शीर्षक"],
"q8aCbb": ["\"", ["0"], "\" के दो संस्करण — स्रोत बनाम ", ["editor"]],
+ "q8tKSU": [
+ ["name"],
+ " का कोई हल करने योग्य पथ नहीं है — एजेंट केवल कार्यक्षेत्र के भीतर की फ़ाइलें पढ़ सकता है।"
+ ],
"qAQVSD": ["पेज शीर्षकों की प्रतिक्रिया JSON नहीं थी"],
"qAhFeg": [
["userName"],
@@ -4287,6 +4339,7 @@
"qTT48-": [
"[[Page]] जैसे विकी-लिंक - यहां लिंक करने का एक समर्थित तरीका है, लेकिन एक बाहरी पाठक कुछ भी हल नहीं करता है और कोष्ठक दिखाता है।"
],
+ "qTULIf": ["यह एजेंट अनुलग्नक स्वीकार नहीं करता — उन्हें हटाएँ या ऐप के भीतर का एजेंट चुनें।"],
"qTcVwj": ["इस प्रोजेक्ट के लिए कोई स्किल ब्राउज़ करें या अपलोड करें।"],
"qTcZZu": ["टैग लोड करने में विफल। <0>Esc</0> दबाएँ और फिर कोशिश करने के लिए दोबारा खोलें।"],
"qX-ABr": ["या इसके बजाय ब्राउज़र साइन-इन उपयोग करने के लिए:"],
@@ -4343,6 +4396,7 @@
"rIFV5h": [["0"], " प्लगइन ये स्किलें अपने कैश से देता है — OK इन्हें कभी संपादित या अपडेट नहीं करता।"],
"rJVoVX": ["स्रोत खोज के परिणाम"],
"rJm8-2": ["क्लिपबोर्ड तक नहीं पहुँचा जा सका — थीम नीचे दिए गए बॉक्स में है।"],
+ "rNi1kZ": ["फ़ोल्डर और खाली फ़ाइलें संलग्न नहीं की जा सकतीं — फ़ाइलें स्वयं छोड़ें।"],
"rNifQd": ["प्रॉपर्टी हटाएँ"],
"rQAQus": ["टेम्पलेट नहीं सहेजा जा सका: ", ["error"]],
"rQRrkB": ["कल"],
@@ -4706,6 +4760,7 @@
"vPLUCm": ["गुम चित्र ", ["identity"], "। संदर्भ पर जाएँ।"],
"vPXOUw": ["स्रोत दृश्य चालू या बंद करें"],
"vQIVHc": ["फ़ोल्डर प्रॉपर्टी"],
+ "vQOuVY": ["नोट विंडो में अनुलग्नक अभी उपलब्ध नहीं हैं — फ़ाइलें जोड़ने के लिए मुख्य विंडो का उपयोग करें।"],
"vUP_HF": [
"किसी कनेक्टेड AI टूल के बिना पैक के ",
["packSkillCount", "plural", { "one": ["#", " स्किल"], "other": ["#", " स्किल"] }],
diff --git a/packages/app/src/locales/hi/messages.po b/packages/app/src/locales/hi/messages.po
index 870fee395..22439326b 100644
--- a/packages/app/src/locales/hi/messages.po
+++ b/packages/app/src/locales/hi/messages.po
@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid " · references only (no embedded contents)"
msgstr " · केवल संदर्भ (कोई एम्बेडेड सामग्री नहीं)"
@@ -146,6 +146,12 @@ msgstr "(कुछ पहले से ही अन्य नियमों
msgid "(symlink)"
msgstr "(सिमलिंक)"
+#. placeholder {0}: pendingAttachments.length
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+msgstr "{0, plural, one {# अनुलग्नक भेजने के लिए तैयार है} other {# अनुलग्नक भेजने के लिए तैयार हैं}}"
+
#. placeholder {0}: preview.backlinkCount
#: src/editor/link-preview/InternalDocPreviewCard.tsx
msgid "{0, plural, one {# backlink} other {# backlinks}}"
@@ -260,6 +266,13 @@ msgstr "{0, plural, one {प्लगइन} other {प्लगइन}}"
msgid "{0, plural, one {Skill} other {Skills}}"
msgstr "{0, plural, one {स्किल} other {स्किल}}"
+#. placeholder {0}: pendingUploads.length
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+msgstr "{0, plural, one {# अनुलग्नक अपलोड हो रहा है} other {# अनुलग्नक अपलोड हो रहे हैं}}"
+
#. placeholder {0}: sibling.name
#: src/lib/acp/config-value-hints.ts
msgid "{0} · default"
@@ -353,6 +366,12 @@ msgstr "{1} में से {0} प्रोजेक्ट चुने गए
msgid "{0} of {1} selected"
msgstr "{1} में से {0} चुने गए"
+#. placeholder {0}: resolvedTarget.displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} एक लिंक से खुलता है और अनुलग्नक स्वीकार नहीं करता — इसके बजाय ऐप के भीतर का एजेंट चुनें।"
+
#. placeholder {0}: siblings.length
#: src/components/SkillPluginBundleBanner.tsx
msgid "{0} other skills by this publisher"
@@ -381,6 +400,12 @@ msgstr "{0} प्रॉपर्टी"
msgid "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
msgstr "{0} इस स्किल को {poolRootRel} के ज़रिए पढ़ता है। {1} को \"{2}\" मिलना रोकने के लिए क्लिक करें — {subRoot} अपनी बाकी स्किल रखेगा पर {poolRootRel} का अनुसरण बंद कर देगा।"
+#. placeholder {0}: TERMINAL_CLIS[selection.cli].displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} टर्मिनल में चलता है और अनुलग्नक स्वीकार नहीं करता — इसके बजाय ऐप के भीतर का एजेंट चुनें।"
+
#. placeholder {0}: formatToolList( [f.host, ...following.map((o) => o.host)].map(hostLabel), i18n.locale, )
#: src/components/settings/SkillTargetsPicker.tsx
msgid "{0} share this folder."
@@ -510,6 +535,7 @@ msgid "{agentName} couldn't start."
msgstr "{agentName} शुरू नहीं हो सका।"
#: src/components/acp/ThreadView.tsx
+#: src/lib/acp/launch-agent-thread.ts
msgid "{agentName} doesn't accept image attachments."
msgstr "{agentName} छवि अनुलग्नक स्वीकार नहीं करता।"
@@ -860,6 +886,14 @@ msgstr "{minutes} मिनट पहले"
msgid "{name} CLI"
msgstr "{name} CLI"
+#: src/lib/acp/image-attachment.ts
+msgid "{name} has no resolvable path — the agent can only read files inside the workspace."
+msgstr "{name} का कोई हल करने योग्य पथ नहीं है — एजेंट केवल कार्यक्षेत्र के भीतर की फ़ाइलें पढ़ सकता है।"
+
+#: src/lib/acp/image-attachment.ts
+msgid "{name} is outside the workspace. Move it into your project first."
+msgstr "{name} कार्यक्षेत्र के बाहर है। पहले इसे अपने प्रोजेक्ट में ले जाएँ।"
+
#: src/components/GraphPanel.tsx
msgid "{nodeCount, plural, one {# node} other {# nodes}}"
msgstr "{nodeCount, plural, one {# नोड} other {# नोड}}"
@@ -873,6 +907,7 @@ msgid "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
msgstr "{openedWorktreeCount, plural, one {वर्कट्री} other {वर्कट्री}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
msgstr "{outsideWorkspaceCount, plural, one {वर्कस्पेस के बाहर की # फ़ाइल छोड़ी गई।} other {वर्कस्पेस के बाहर की # फ़ाइलें छोड़ी गईं।}}"
@@ -975,6 +1010,7 @@ msgid "{skillCount, plural, one {skill} other {skills}}"
msgstr "{skillCount, plural, one {स्किल} other {स्किल}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
msgstr "{skipTotal, plural, one {# फ़ाइल छोड़ी गई जो अटैच नहीं की जा सकी।} other {# फ़ाइलें छोड़ी गईं जो अटैच नहीं की जा सकीं।}}"
@@ -1019,6 +1055,11 @@ msgstr "{templateCount, plural, one {टेम्पलेट} other {टेम
msgid "{tokens, plural, one {token} other {tokens}}"
msgstr "{tokens, plural, one {टोकन} other {टोकन}}"
+#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
+msgid "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+msgstr "{tooLargeTotalCount, plural, one {# फ़ाइल छोड़ी गई — प्रति संदेश अनुलग्नक कुल {budgetKb} KB से अधिक नहीं हो सकते।} other {# फ़ाइलें छोड़ी गईं — प्रति संदेश अनुलग्नक कुल {budgetKb} KB से अधिक नहीं हो सकते।}}"
+
#: src/components/file-tree-problem-indicators.ts
msgid "{total, plural, one {# problem} other {# problems}}"
msgstr "{total, plural, one {# समस्या} other {# समस्याएँ}}"
@@ -1028,6 +1069,7 @@ msgid "{truncatedShownCount, plural, one {Showing the first item in one folder
msgstr "{truncatedShownCount, plural, one {एक फ़ोल्डर का पहला आइटम दिखाया जा रहा है — उस फ़ोल्डर का बाकी हिस्सा छिपा है।} other {एक फ़ोल्डर के पहले {formattedCount} आइटम दिखाए जा रहे हैं — उस फ़ोल्डर का बाकी हिस्सा छिपा है।}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
msgstr "{unknownPathCount, plural, one {# फ़ाइल छोड़ी गई — यह ब्राउज़र पथ द्वारा फ़ाइलें अटैच नहीं कर सकता।} other {# फ़ाइलें छोड़ी गईं — यह ब्राउज़र पथ द्वारा फ़ाइलें अटैच नहीं कर सकता।}}"
@@ -2068,7 +2110,7 @@ msgstr "एसेट सुझाव"
msgid "Asset: {title}"
msgstr "एसेट: {title}"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid "Attach a file"
msgstr "फ़ाइल संलग्न करें"
@@ -2081,6 +2123,10 @@ msgstr "छवियाँ संलग्न करें"
msgid "Attachments"
msgstr "संलग्नक"
+#: src/components/BottomComposer.tsx
+msgid "Attachments aren't available in note windows yet — use the main window to attach files."
+msgstr "नोट विंडो में अनुलग्नक अभी उपलब्ध नहीं हैं — फ़ाइलें जोड़ने के लिए मुख्य विंडो का उपयोग करें।"
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Attachments must total under 3 MB."
@@ -4048,6 +4094,7 @@ msgid "Couldn't reach the Open Knowledge server to upload {fileName}."
msgstr "{fileName} अपलोड करने के लिए Open Knowledge सर्वर तक नहीं पहुँचा जा सका।"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "Couldn't read {fileName}."
msgstr "{fileName} पढ़ नहीं सका।"
@@ -6038,6 +6085,10 @@ msgstr "फ़ाइल छोड़ने का क्षेत्र"
msgid "File duplicated"
msgstr "फ़ाइल की नकल बनाई गई"
+#: src/lib/acp/image-attachment.ts
+msgid "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+msgstr "फ़ाइल बहुत बड़ी है ({sizeKb} KB) — हर अनुलग्नक की सीमा {limitKb} KB है। इसे क्रॉप करें या आकार छोटा करके फिर से आज़माएँ।"
+
#: src/components/NewItemDialog.tsx
msgid "File name"
msgstr "फ़ाइल का नाम"
@@ -6239,6 +6290,13 @@ msgstr "फ़ोल्डर साझा करने का लिंक क
msgid "Folder target: {linkTitle}. Click to open the overview."
msgstr "फ़ोल्डर लक्ष्य: {linkTitle}. सिंहावलोकन खोलने के लिए क्लिक करें।"
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "Folders and empty files can't be attached — drop the files themselves."
+msgstr "फ़ोल्डर और खाली फ़ाइलें संलग्न नहीं की जा सकतीं — फ़ाइलें स्वयं छोड़ें।"
+
#: src/components/acp/ThreadView.tsx
msgid "Follow the agent's edits"
msgstr "एजेंट के संपादन का अनुसरण करें"
@@ -8628,6 +8686,11 @@ msgstr "अभी कोई एजेंट सेट अप नहीं है
msgid "no agents — saved, not installed anywhere"
msgstr "कोई एजेंट नहीं — सहेजी गईं, कहीं इंस्टॉल नहीं"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+msgstr "अभी कोई एजेंट सेट अप नहीं है — फ़ाइलें संलग्न करने के लिए एजेंट कनेक्शन में ऐप के भीतर का एजेंट जोड़ें।"
+
#: src/components/settings/AgentConnectionsSection.tsx
msgid "No agents available."
msgstr "कोई एजेंट उपलब्ध नहीं।"
@@ -9197,6 +9260,10 @@ msgstr "केवल मेरे लिए"
msgid "Only modified"
msgstr "केवल संशोधित"
+#: src/lib/acp/image-attachment.ts
+msgid "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+msgstr "केवल PNG, JPEG, GIF और WebP छवियाँ समर्थित हैं ({mimeType} मिला)।"
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Only PNG, JPEG, or WebP images are allowed."
@@ -10865,7 +10932,7 @@ msgstr "हटाएँ"
#. placeholder {0}: file.name
#. placeholder {0}: image.name
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/PendingImageStrip.tsx
#: src/components/ImageAttachments.tsx
msgid "Remove {0}"
msgstr "{0} हटाएँ"
@@ -13769,6 +13836,11 @@ msgstr "यह {targetNoun} ब्रांच <0>{shareBranch}</0> से स
msgid "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
msgstr "यह {targetNoun} ब्रांच <0>{shareBranch}</0> से साझा किया गया था। आप फ़िलहाल <1>{currentLabel}</1> पर हैं।"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "This agent doesn't accept attachments — remove them or choose an in-app agent."
+msgstr "यह एजेंट अनुलग्नक स्वीकार नहीं करता — उन्हें हटाएँ या ऐप के भीतर का एजेंट चुनें।"
+
#: src/editor/composer-mention/ComposerSlashMenu.tsx
msgid "This agent doesn't offer slash commands"
msgstr "यह एजेंट स्लैश कमांड नहीं देता"
@@ -13824,6 +13896,12 @@ msgstr "इसे Settings > AI tools & CLI में कॉन्फ़िग
msgid "This comment is on the whole property"
msgstr "यह टिप्पणी पूरी प्रॉपर्टी पर है"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "This composer doesn't accept attachments."
+msgstr "यहाँ फ़ाइलें अटैच नहीं की जा सकतीं।"
+
#: src/components/DiffViewBoundary.tsx
msgid "This conflict is resolved."
msgstr "यह विरोध हल हो गया है।"
@@ -14650,6 +14728,10 @@ msgstr "हल न की जा सकने वाली फ़ाइल {iden
msgid "Unresolvable image {identity}. Go to reference."
msgstr "हल न की जा सकने वाला चित्र {identity}। संदर्भ पर जाएँ।"
+#: src/lib/acp/image-attachment.ts
+msgid "Unsupported file type: {fileType}."
+msgstr "असमर्थित फ़ाइल प्रकार: {fileType}।"
+
#: src/components/BugReportHistory.tsx
msgid "Untitled report"
msgstr "बिना शीर्षक रिपोर्ट"
@@ -14790,6 +14872,7 @@ msgstr "\"{0}\" के रूप में अपलोड किया गय
msgid "Uploading"
msgstr "अपलोड किया जा रहा है"
+#: src/components/acp/PendingImageStrip.tsx
#: src/editor/image-upload/index.ts
msgid "Uploading {fileName}"
msgstr "{fileName} अपलोड की जा रही है"
diff --git a/packages/app/src/locales/id/messages.json b/packages/app/src/locales/id/messages.json
index a8773b6cc..a378e5244 100644
--- a/packages/app/src/locales/id/messages.json
+++ b/packages/app/src/locales/id/messages.json
@@ -822,6 +822,7 @@
"9euN0m": [["count", "plural", { "other": ["#", " peserta lagi dari dokumen lain"] }]],
"9fhQRL": ["Kanal beta"],
"9fvog2": ["Pratinjau tidak tersedia: ", ["errorDetail"]],
+ "9gu0n7": ["Tipe berkas tidak didukung: ", ["fileType"], "."],
"9hEdtC": [
"Yang ini mengajarkan alat AI Anda cara bekerja dengan OpenKnowledge. Keterampilan ini berada di folder proyek, jadi terpasang untuk semua orang yang membuka proyek."
],
@@ -1310,6 +1311,11 @@
"FjkaiT": ["Perkecil"],
"Fjz6aJ": ["Kirim ke obrolan baru"],
"FqGWeR": ["Registri agen tidak bisa dihubungi."],
+ "FqMKq2": [
+ "Hanya gambar PNG, JPEG, GIF, dan WebP yang didukung (diterima ",
+ ["mimeType"],
+ ")."
+ ],
"FqTpiN": ["Wiki burung"],
"Fqr8BP": [
"Penampil PDF multi-halaman dengan kendali bilah alat (gambar mini, navigasi halaman, zoom)."
@@ -1341,6 +1347,10 @@
"G7-rf8": ["Galat sintaks pola: ", ["message"]],
"G7bn_N": ["Mulai sebuah agen"],
"G7cMuO": ["Pratinjau HTML"],
+ "G7gMiG": [
+ ["0"],
+ " berjalan di terminal dan tidak menerima lampiran — pilih agen dalam aplikasi."
+ ],
"G8t9NN": ["Tambahkan properti"],
"GA-UkN": ["Tipe ", ["keyName"], ": ", ["typeLabel"], ". Klik untuk mengubah."],
"GAohqx": ["Hapus kolom"],
@@ -1402,6 +1412,9 @@
"GemPfn": ["Gagal mengurai respons galat tautan keluar (HTTP ", ["status"], ")"],
"Gfr4fu": ["Server tidak bisa membuka dokumen"],
"GhjUB_": ["Tersambung kembali"],
+ "Gi8Akx": [
+ "Belum ada agen yang disiapkan — untuk melampirkan berkas, tambahkan agen dalam aplikasi lewat Koneksi agen."
+ ],
"GidGkh": ["Perbarui dari sumber"],
"GifIjR": [
"Skill “",
@@ -1645,6 +1658,7 @@
"OpenKnowledge tidak dapat membaca terminal.shell di .ok/local/config.yml. Shell Windows yang tersedia akan digunakan sebagai gantinya."
],
"K9J00P": ["Kloning gagal — galat koneksi"],
+ "K9ViCA": [["name"], " berada di luar ruang kerja. Pindahkan dulu ke proyek Anda."],
"KDrbNG": ["OpenKnowledge mencari tautan untuk ", ["subject"]],
"KDuPiY": ["Mengunggah ", ["fileName"]],
"KDw4GX": ["Coba lagi"],
@@ -1674,6 +1688,13 @@
"KZLdgR": ["Lihat <0>#design-docs</0> untuk spesifikasi terbaru."],
"K_vT1F": ["Sinkronisasi hulu"],
"KaFCD3": ["Membuka tautan ini di tab baru dan menciutkan graf."],
+ "Kb08WL": [
+ "Berkas terlalu besar (",
+ ["sizeKb"],
+ " KB) — setiap lampiran dibatasi ",
+ ["limitKb"],
+ " KB. Pangkas atau ubah ukurannya, lalu coba lagi."
+ ],
"Kbz9RK": ["Nomor port tetap"],
"Kdvukk": ["Pemeriksaan Markdown tidak berlaku untuk file ini."],
"KeXgA-": [
@@ -1818,6 +1839,7 @@
"M92_0q": ["Tutup komentar"],
"M9597s": ["Menyiapkan URL berbagi..."],
"MBKkUy": ["skills.sh tidak tersedia; menampilkan hasil GitHub (tanpa peringkat pemasangan)."],
+ "MBfjUk": [["0", "plural", { "other": ["Mengunggah ", "#", " lampiran"] }]],
"MCjC9A": ["Hapus ", ["deleteDescriptorLabel"]],
"MDBJwN": ["Sulit dipakai"],
"MDZSJe": ["Kapan agennya menjalankan pekerjaan terjadwalnya."],
@@ -2344,6 +2366,7 @@
],
"ScwcF2": ["Sudah ada proyek di lokasi ini. Pilih folder induk lain."],
"Sg-6Bo": [["errorCount", "plural", { "other": ["#", " galat"] }]],
+ "SgAFuo": ["Berkas tidak bisa dilampirkan di sini."],
"SgKLfA": ["Tidak terhubung ke GitHub."],
"Sh3Qkg": ["Tidak ada cabang yang cocok."],
"Si7mIR": ["Buat laporan"],
@@ -3167,6 +3190,10 @@
"Selama Anda keluar dari akun, pembaruan diperiksa paling cepat setiap 3 menit, terlepas dari pengaturan ini."
],
"cIptmH": ["Di aplikasi Claude Desktop"],
+ "cK5W4m": [
+ ["0"],
+ " terbuka lewat tautan dan tidak menerima lampiran — pilih agen dalam aplikasi."
+ ],
"cLP0Lf": ["Sumber keterampilan remote"],
"cLn264": ["Berkas tema ini tidak dapat dibaca"],
"cMMb6H": [["imported"], " dipasang, tetapi ", ["failed"], " gagal: ", ["failedNames"]],
@@ -3244,6 +3271,7 @@
"d6qW27": [["agentName"], " melaporkan: ", ["headline"]],
"dCforW": ["Gagal menulis file ini. Periksa log OpenKnowledge untuk mengetahui alasannya."],
"dD7NPy": ["Kerangka"],
+ "dDBZ0j": [["0", "plural", { "other": ["#", " lampiran siap dikirim"] }]],
"dDpCOp": [
"Penggantian nama berhasil tetapi bilah sisi mungkin tidak mutakhir — segarkan untuk menyinkronkan ulang"
],
@@ -3264,6 +3292,20 @@
"dOHMA0": ["Gagal memindahkan"],
"dOxPd4": ["Catatan kaki"],
"dQHSCs": ["Ubah (hapus aslinya)"],
+ "dRCAgQ": [
+ [
+ "tooLargeTotalCount",
+ "plural",
+ {
+ "other": [
+ "#",
+ " berkas dilewati — total lampiran tidak boleh lebih dari ",
+ ["budgetKb"],
+ " KB per pesan."
+ ]
+ }
+ ]
+ ],
"dSORvE": ["Menghentikan proses saat ini dan mengirim ini sebagai gantinya"],
"dT-HIQ": ["Terlalu banyak referensi langsung di halaman ini. Papan ini tidak dimuat."],
"dTaauv": ["Alasan: ", ["reason"]],
@@ -4431,6 +4473,10 @@
"q63KUv": ["Tambahkan MCP & keterampilan"],
"q7F5am": ["judul"],
"q8aCbb": ["Dua versi \"", ["0"], "\" — sumber melawan ", ["editor"]],
+ "q8tKSU": [
+ ["name"],
+ " tidak memiliki jalur yang dapat diuraikan — agen hanya bisa membaca berkas di dalam ruang kerja."
+ ],
"qAQVSD": ["Respons judul halaman bukan JSON"],
"qAhFeg": [["userName"], " · ", ["tabCount", "plural", { "other": ["#", " tab"] }]],
"qAx7xG": ["Folder tetap di akar konten"],
@@ -4456,6 +4502,7 @@
"qTT48-": [
"Tautan wiki seperti [[Page]] — cara yang didukung untuk membuat tautan di sini, tetapi pembaca eksternal tidak menyelesaikan apa pun dan memperlihatkan tanda kurung."
],
+ "qTULIf": ["Agen ini tidak menerima lampiran — hapus lampiran atau pilih agen dalam aplikasi."],
"qTcVwj": ["Telusuri atau unggah sebuah keterampilan untuk proyek ini."],
"qTcZZu": ["Gagal memuat tag. Tekan <0>Esc</0> lalu buka lagi untuk mencoba ulang."],
"qX-ABr": ["Atau, untuk memakai proses masuk lewat peramban:"],
@@ -4519,6 +4566,7 @@
],
"rJVoVX": ["Hasil pencarian sumber"],
"rJm8-2": ["Papan klip tidak dapat diakses — tema ada di kotak di bawah."],
+ "rNi1kZ": ["Folder dan berkas kosong tidak bisa dilampirkan — lepaskan berkasnya langsung."],
"rNifQd": ["Hapus properti"],
"rQAQus": ["Templat tidak bisa disimpan: ", ["error"]],
"rQRrkB": ["kemarin"],
@@ -4887,6 +4935,9 @@
"vPLUCm": ["Gambar ", ["identity"], " tidak ditemukan. Buka referensi."],
"vPXOUw": ["Tampilkan atau sembunyikan tampilan sumber"],
"vQIVHc": ["Properti folder"],
+ "vQOuVY": [
+ "Lampiran belum tersedia di jendela catatan — gunakan jendela utama untuk melampirkan berkas."
+ ],
"vUP_HF": [
"Tanpa alat AI yang terhubung, ",
["packSkillCount", "plural", { "one": ["#", " skill"], "other": ["#", " skill"] }],
diff --git a/packages/app/src/locales/id/messages.po b/packages/app/src/locales/id/messages.po
index 93c144d03..8b31590ea 100644
--- a/packages/app/src/locales/id/messages.po
+++ b/packages/app/src/locales/id/messages.po
@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid " · references only (no embedded contents)"
msgstr " · hanya referensi (tanpa konten tertanam)"
@@ -146,6 +146,12 @@ msgstr "(sebagian mungkin sudah disembunyikan oleh aturan lain)"
msgid "(symlink)"
msgstr "(symlink)"
+#. placeholder {0}: pendingAttachments.length
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+msgstr "{0, plural, other {# lampiran siap dikirim}}"
+
#. placeholder {0}: preview.backlinkCount
#: src/editor/link-preview/InternalDocPreviewCard.tsx
msgid "{0, plural, one {# backlink} other {# backlinks}}"
@@ -260,6 +266,13 @@ msgstr "{0, plural, other {Plugin}}"
msgid "{0, plural, one {Skill} other {Skills}}"
msgstr "{0, plural, other {Keterampilan}}"
+#. placeholder {0}: pendingUploads.length
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+msgstr "{0, plural, other {Mengunggah # lampiran}}"
+
#. placeholder {0}: sibling.name
#: src/lib/acp/config-value-hints.ts
msgid "{0} · default"
@@ -353,6 +366,12 @@ msgstr "{0} dari {1} proyek dipilih"
msgid "{0} of {1} selected"
msgstr "{0} dari {1} dipilih"
+#. placeholder {0}: resolvedTarget.displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} terbuka lewat tautan dan tidak menerima lampiran — pilih agen dalam aplikasi."
+
#. placeholder {0}: siblings.length
#: src/components/SkillPluginBundleBanner.tsx
msgid "{0} other skills by this publisher"
@@ -381,6 +400,12 @@ msgstr "Properti {0}"
msgid "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
msgstr "{0} membaca keterampilan ini lewat {poolRootRel}. Klik agar {1} berhenti menerima \"{2}\" — {subRoot} tetap punya keterampilan lainnya tetapi berhenti mengikuti {poolRootRel}."
+#. placeholder {0}: TERMINAL_CLIS[selection.cli].displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} berjalan di terminal dan tidak menerima lampiran — pilih agen dalam aplikasi."
+
#. placeholder {0}: formatToolList( [f.host, ...following.map((o) => o.host)].map(hostLabel), i18n.locale, )
#: src/components/settings/SkillTargetsPicker.tsx
msgid "{0} share this folder."
@@ -510,6 +535,7 @@ msgid "{agentName} couldn't start."
msgstr "{agentName} tidak dapat dijalankan."
#: src/components/acp/ThreadView.tsx
+#: src/lib/acp/launch-agent-thread.ts
msgid "{agentName} doesn't accept image attachments."
msgstr "{agentName} tidak menerima lampiran gambar."
@@ -860,6 +886,14 @@ msgstr "{minutes} mnt lalu"
msgid "{name} CLI"
msgstr "CLI {name}"
+#: src/lib/acp/image-attachment.ts
+msgid "{name} has no resolvable path — the agent can only read files inside the workspace."
+msgstr "{name} tidak memiliki jalur yang dapat diuraikan — agen hanya bisa membaca berkas di dalam ruang kerja."
+
+#: src/lib/acp/image-attachment.ts
+msgid "{name} is outside the workspace. Move it into your project first."
+msgstr "{name} berada di luar ruang kerja. Pindahkan dulu ke proyek Anda."
+
#: src/components/GraphPanel.tsx
msgid "{nodeCount, plural, one {# node} other {# nodes}}"
msgstr "{nodeCount, plural, other {# simpul}}"
@@ -873,6 +907,7 @@ msgid "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
msgstr "{openedWorktreeCount, plural, other {worktree}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
msgstr "{outsideWorkspaceCount, plural, other {# file di luar ruang kerja dilewati.}}"
@@ -975,6 +1010,7 @@ msgid "{skillCount, plural, one {skill} other {skills}}"
msgstr "{skillCount, plural, other {keterampilan}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
msgstr "{skipTotal, plural, other {# file dilewati karena tidak dapat dilampirkan.}}"
@@ -1019,6 +1055,11 @@ msgstr "{templateCount, plural, other {templat}}"
msgid "{tokens, plural, one {token} other {tokens}}"
msgstr "{tokens, plural, other {token}}"
+#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
+msgid "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+msgstr "{tooLargeTotalCount, plural, other {# berkas dilewati — total lampiran tidak boleh lebih dari {budgetKb} KB per pesan.}}"
+
#: src/components/file-tree-problem-indicators.ts
msgid "{total, plural, one {# problem} other {# problems}}"
msgstr "{total, plural, other {# masalah}}"
@@ -1028,6 +1069,7 @@ msgid "{truncatedShownCount, plural, one {Showing the first item in one folder
msgstr "{truncatedShownCount, plural, other {Menampilkan {formattedCount} item pertama dalam satu folder — sisa folder itu disembunyikan.}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
msgstr "{unknownPathCount, plural, other {# file dilewati — browser ini tidak dapat melampirkan file berdasarkan path.}}"
@@ -2068,7 +2110,7 @@ msgstr "Saran aset"
msgid "Asset: {title}"
msgstr "Aset: {title}"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid "Attach a file"
msgstr "Lampirkan berkas"
@@ -2081,6 +2123,10 @@ msgstr "Lampirkan gambar"
msgid "Attachments"
msgstr "Lampiran"
+#: src/components/BottomComposer.tsx
+msgid "Attachments aren't available in note windows yet — use the main window to attach files."
+msgstr "Lampiran belum tersedia di jendela catatan — gunakan jendela utama untuk melampirkan berkas."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Attachments must total under 3 MB."
@@ -4048,6 +4094,7 @@ msgid "Couldn't reach the Open Knowledge server to upload {fileName}."
msgstr "Server Open Knowledge tidak bisa dihubungi untuk mengunggah {fileName}."
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "Couldn't read {fileName}."
msgstr "Tidak dapat membaca {fileName}."
@@ -6038,6 +6085,10 @@ msgstr "Area jatuhkan berkas"
msgid "File duplicated"
msgstr "Berkas digandakan"
+#: src/lib/acp/image-attachment.ts
+msgid "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+msgstr "Berkas terlalu besar ({sizeKb} KB) — setiap lampiran dibatasi {limitKb} KB. Pangkas atau ubah ukurannya, lalu coba lagi."
+
#: src/components/NewItemDialog.tsx
msgid "File name"
msgstr "Nama berkas"
@@ -6239,6 +6290,13 @@ msgstr "Tautan berbagi folder disalin."
msgid "Folder target: {linkTitle}. Click to open the overview."
msgstr "Folder tujuan: {linkTitle}. Klik untuk membuka ikhtisarnya."
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "Folders and empty files can't be attached — drop the files themselves."
+msgstr "Folder dan berkas kosong tidak bisa dilampirkan — lepaskan berkasnya langsung."
+
#: src/components/acp/ThreadView.tsx
msgid "Follow the agent's edits"
msgstr "Ikuti suntingan agen"
@@ -8628,6 +8686,11 @@ msgstr "Belum ada agen yang disiapkan — pilih satu dari menu kirim."
msgid "no agents — saved, not installed anywhere"
msgstr "tanpa agen — disimpan, tidak dipasang di mana pun"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+msgstr "Belum ada agen yang disiapkan — untuk melampirkan berkas, tambahkan agen dalam aplikasi lewat Koneksi agen."
+
#: src/components/settings/AgentConnectionsSection.tsx
msgid "No agents available."
msgstr "Tidak ada agen yang tersedia."
@@ -9197,6 +9260,10 @@ msgstr "Hanya saya"
msgid "Only modified"
msgstr "Hanya yang diubah"
+#: src/lib/acp/image-attachment.ts
+msgid "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+msgstr "Hanya gambar PNG, JPEG, GIF, dan WebP yang didukung (diterima {mimeType})."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Only PNG, JPEG, or WebP images are allowed."
@@ -10865,7 +10932,7 @@ msgstr "Hapus"
#. placeholder {0}: file.name
#. placeholder {0}: image.name
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/PendingImageStrip.tsx
#: src/components/ImageAttachments.tsx
msgid "Remove {0}"
msgstr "Hapus {0}"
@@ -13769,6 +13836,11 @@ msgstr "{targetNoun} ini dibagikan dari cabang <0>{shareBranch}</0>. Ia tidak ad
msgid "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
msgstr "{targetNoun} ini dibagikan dari cabang <0>{shareBranch}</0>. Anda sekarang berada di <1>{currentLabel}</1>."
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "This agent doesn't accept attachments — remove them or choose an in-app agent."
+msgstr "Agen ini tidak menerima lampiran — hapus lampiran atau pilih agen dalam aplikasi."
+
#: src/editor/composer-mention/ComposerSlashMenu.tsx
msgid "This agent doesn't offer slash commands"
msgstr "Agen ini tidak menawarkan perintah garis miring"
@@ -13824,6 +13896,12 @@ msgstr "Ini bisa diatur di Pengaturan > Alat AI & CLI"
msgid "This comment is on the whole property"
msgstr "Komentar ini berlaku untuk seluruh properti"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "This composer doesn't accept attachments."
+msgstr "Berkas tidak bisa dilampirkan di sini."
+
#: src/components/DiffViewBoundary.tsx
msgid "This conflict is resolved."
msgstr "Konflik ini sudah diselesaikan."
@@ -14650,6 +14728,10 @@ msgstr "File {identity} tidak dapat ditentukan. Buka referensi."
msgid "Unresolvable image {identity}. Go to reference."
msgstr "Gambar {identity} tidak dapat ditentukan. Buka referensi."
+#: src/lib/acp/image-attachment.ts
+msgid "Unsupported file type: {fileType}."
+msgstr "Tipe berkas tidak didukung: {fileType}."
+
#: src/components/BugReportHistory.tsx
msgid "Untitled report"
msgstr "Laporan tanpa judul"
@@ -14790,6 +14872,7 @@ msgstr "Diunggah sebagai \"{0}\" — nama \"{1}\" sudah dipakai."
msgid "Uploading"
msgstr "Mengunggah"
+#: src/components/acp/PendingImageStrip.tsx
#: src/editor/image-upload/index.ts
msgid "Uploading {fileName}"
msgstr "Mengunggah {fileName}"
diff --git a/packages/app/src/locales/ko/messages.json b/packages/app/src/locales/ko/messages.json
index 47ac05e2f..16b316a27 100644
--- a/packages/app/src/locales/ko/messages.json
+++ b/packages/app/src/locales/ko/messages.json
@@ -787,6 +787,7 @@
"9euN0m": [["count", "plural", { "other": ["다른 문서 참여자 ", "#", "명 더"] }]],
"9fhQRL": ["베타 채널"],
"9fvog2": ["미리보기를 사용할 수 없음: ", ["errorDetail"]],
+ "9gu0n7": ["지원되지 않는 파일 형식: ", ["fileType"], "."],
"9hEdtC": [
"이 스킬은 AI 도구가 OpenKnowledge와 함께 작동하는 방법을 가르칩니다. 프로젝트 폴더에 있으므로 프로젝트를 여는 모든 사람에게 설치됩니다."
],
@@ -1255,6 +1256,7 @@
"FjkaiT": ["축소"],
"Fjz6aJ": ["새 채팅으로 전송"],
"FqGWeR": ["에이전트 레지스트리에 연결하지 못했습니다."],
+ "FqMKq2": ["PNG, JPEG, GIF, WebP 이미지만 지원됩니다(", ["mimeType"], "을(를) 받았습니다)."],
"FqTpiN": ["조류 위키"],
"Fqr8BP": [
"도구 모음 컨트롤이 있는 여러 페이지 PDF 뷰어입니다. 썸네일, 페이지 탐색, 확대/축소를 지원합니다."
@@ -1286,6 +1288,10 @@
"G7-rf8": ["패턴 구문 오류: ", ["message"]],
"G7bn_N": ["에이전트 시작"],
"G7cMuO": ["HTML 미리보기"],
+ "G7gMiG": [
+ ["0"],
+ "은(는) 터미널에서 실행되므로 첨부를 받을 수 없습니다. 대신 앱 내 에이전트를 선택하세요."
+ ],
"G8t9NN": ["속성 추가"],
"GA-UkN": [["keyName"], " 유형: ", ["typeLabel"], ". 클릭하여 변경합니다."],
"GAohqx": ["열 삭제"],
@@ -1347,6 +1353,9 @@
"GemPfn": ["포워드 링크 오류 응답을 해석하지 못했습니다 (HTTP ", ["status"], ")"],
"Gfr4fu": ["서버에서 문서를 열 수 없습니다"],
"GhjUB_": ["다시 연결됨"],
+ "Gi8Akx": [
+ "아직 설정된 에이전트가 없습니다. 파일을 첨부하려면 에이전트 연결에서 앱 내 에이전트를 추가하세요."
+ ],
"GidGkh": ["소스에서 업데이트"],
"GifIjR": [
"스킬 \"",
@@ -1575,6 +1584,7 @@
"OpenKnowledge가 .ok/local/config.yml의 terminal.shell을 읽을 수 없습니다. 대신 사용 가능한 Windows 셸을 사용합니다."
],
"K9J00P": ["클론 실패. 연결 오류"],
+ "K9ViCA": [["name"], "이(가) 워크스페이스 밖에 있습니다. 먼저 프로젝트 안으로 옮기세요."],
"KDrbNG": ["OpenKnowledge에서 ", ["subject"], " 링크 조회"],
"KDuPiY": [["fileName"], " 업로드 중"],
"KDw4GX": ["다시 시도"],
@@ -1604,6 +1614,13 @@
"KZLdgR": ["최신 사양은 <0>#design-docs</0>에서 확인하세요."],
"K_vT1F": ["상위 저장소 동기화"],
"KaFCD3": ["이 링크를 새 탭에서 열고 그래프를 접습니다."],
+ "Kb08WL": [
+ "파일이 너무 큽니다(",
+ ["sizeKb"],
+ " KB). 첨부 파일은 각각 ",
+ ["limitKb"],
+ " KB로 제한됩니다. 잘라내거나 크기를 줄인 뒤 다시 시도하세요."
+ ],
"Kbz9RK": ["고정 포트 번호"],
"Kdvukk": ["Markdown 검사는 이 파일에 적용되지 않습니다."],
"KeXgA-": ["해당 구절을 찾지 못했습니다. 원문 변경 가능성이 있습니다."],
@@ -1744,6 +1761,7 @@
"M92_0q": ["댓글 닫기"],
"M9597s": ["공유 URL 준비 중…"],
"MBKkUy": ["skills.sh를 사용할 수 없어 GitHub 결과를 보기로 전환합니다(설치 순위 없음)."],
+ "MBfjUk": [["0", "plural", { "other": ["첨부 ", "#", "개 업로드 중"] }]],
"MCjC9A": [["deleteDescriptorLabel"], " 삭제"],
"MDBJwN": ["사용하기 어려움"],
"MDZSJe": ["에이전트가 예약된 작업을 실행할 때"],
@@ -2250,6 +2268,7 @@
],
"ScwcF2": ["이 위치에 프로젝트가 이미 있습니다. 다른 상위 폴더를 선택하세요."],
"Sg-6Bo": [["errorCount", "plural", { "other": ["오류 ", "#", "개"] }]],
+ "SgAFuo": ["여기에는 파일을 첨부할 수 없습니다."],
"SgKLfA": ["GitHub에 연결되지 않음"],
"Sh3Qkg": ["일치하는 브랜치가 없습니다."],
"Si7mIR": ["보고서 만들기"],
@@ -3030,6 +3049,10 @@
"cHhH3i": ["필수 git 도구"],
"cIFYZn": ["로그아웃 상태에서는 이 설정과 관계없이 업데이트를 최대 3분에 한 번만 확인합니다."],
"cIptmH": ["Claude Desktop App에서"],
+ "cK5W4m": [
+ ["0"],
+ "은(는) 링크로 열리므로 첨부를 받을 수 없습니다. 대신 앱 내 에이전트를 선택하세요."
+ ],
"cLP0Lf": ["원격 스킬 소스"],
"cLn264": ["이 테마 파일을 읽지 못했습니다"],
"cMMb6H": [["imported"], "개 설치됨. ", ["failed"], "개 실패: ", ["failedNames"]],
@@ -3107,6 +3130,7 @@
"d6qW27": [["agentName"], " 보고: ", ["headline"]],
"dCforW": ["이 파일을 쓰지 못했습니다. 이유는 OpenKnowledge 로그를 확인하세요."],
"dD7NPy": ["개요"],
+ "dDBZ0j": [["0", "plural", { "other": ["첨부 ", "#", "개를 보낼 준비가 되었습니다"] }]],
"dDpCOp": [
"이름 변경은 성공했지만 사이드바가 최신 상태가 아닐 수 있습니다. 다시 동기화하려면 새로 고침하세요."
],
@@ -3127,6 +3151,21 @@
"dOHMA0": ["이동하지 못했습니다"],
"dOxPd4": ["각주"],
"dQHSCs": ["변환 (원본 삭제)"],
+ "dRCAgQ": [
+ [
+ "tooLargeTotalCount",
+ "plural",
+ {
+ "other": [
+ "파일 ",
+ "#",
+ "개를 건너뛰었습니다. 메시지당 첨부 총합은 ",
+ ["budgetKb"],
+ " KB를 넘을 수 없습니다."
+ ]
+ }
+ ]
+ ],
"dSORvE": ["현재 실행 중지 후 대신 전송"],
"dT-HIQ": ["이 페이지에 라이브 참조가 너무 많습니다. 이 보드는 불러오지 않았습니다."],
"dTaauv": ["이유: ", ["reason"]],
@@ -4236,6 +4275,10 @@
"q63KUv": ["MCP 및 스킬 추가"],
"q7F5am": ["제목"],
"q8aCbb": ["\"", ["0"], "\"의 두 버전. 소스와 ", ["editor"]],
+ "q8tKSU": [
+ ["name"],
+ "의 경로를 확인할 수 없습니다. 에이전트는 워크스페이스 안의 파일만 읽을 수 있습니다."
+ ],
"qAQVSD": ["페이지 제목 응답이 JSON이 아닙니다"],
"qAhFeg": [["userName"], " · ", ["tabCount", "plural", { "other": ["탭 ", "#", "개"] }]],
"qAx7xG": ["콘텐츠 루트의 고정 폴더"],
@@ -4263,6 +4306,9 @@
"qTT48-": [
"위키 링크([[Page]] 등)는 이곳에서 지원되지만 외부 리더는 아무것도 해석하지 못하고 대괄호를 그대로 표시합니다."
],
+ "qTULIf": [
+ "이 에이전트는 첨부를 받을 수 없습니다. 첨부를 제거하거나 앱 내 에이전트를 선택하세요."
+ ],
"qTcVwj": ["이 프로젝트에서 스킬을 찾아보거나 업로드합니다."],
"qTcZZu": ["태그를 불러오지 못했습니다. <0>Esc</0> 키를 누르고 다시 열어 보세요."],
"qX-ABr": ["또는 브라우저 로그인을 사용하려면:"],
@@ -4321,6 +4367,7 @@
],
"rJVoVX": ["소스 찾기 결과"],
"rJm8-2": ["클립보드에 접근하지 못했습니다. 테마는 아래 상자에 있습니다."],
+ "rNi1kZ": ["폴더와 빈 파일은 첨부할 수 없습니다. 파일 자체를 드롭하세요."],
"rNifQd": ["속성 제거"],
"rQAQus": ["템플릿 저장 실패: ", ["error"]],
"rQRrkB": ["어제"],
@@ -4670,6 +4717,7 @@
"vPLUCm": ["누락된 이미지 ", ["identity"], ". 참조로 이동합니다."],
"vPXOUw": ["소스 보기 전환"],
"vQIVHc": ["폴더 속성"],
+ "vQOuVY": ["노트 창에서는 아직 첨부를 사용할 수 없습니다. 메인 창에서 파일을 첨부하세요."],
"vUP_HF": [
"연결된 AI 도구가 없으면 팩의 ",
["packSkillCount", "plural", { "one": ["스킬 ", "#", "개"], "other": ["스킬 ", "#", "개"] }],
diff --git a/packages/app/src/locales/ko/messages.po b/packages/app/src/locales/ko/messages.po
index 433831f32..69dbc37ff 100644
--- a/packages/app/src/locales/ko/messages.po
+++ b/packages/app/src/locales/ko/messages.po
@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid " · references only (no embedded contents)"
msgstr " · 참조만(내용을 포함하지 않음)"
@@ -146,6 +146,12 @@ msgstr "(다른 규칙으로 이미 숨겨진 항목이 있을 수 있습니다)
msgid "(symlink)"
msgstr "(심볼릭 링크)"
+#. placeholder {0}: pendingAttachments.length
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+msgstr "{0, plural, other {첨부 #개를 보낼 준비가 되었습니다}}"
+
#. placeholder {0}: preview.backlinkCount
#: src/editor/link-preview/InternalDocPreviewCard.tsx
msgid "{0, plural, one {# backlink} other {# backlinks}}"
@@ -260,6 +266,13 @@ msgstr "{0, plural, other {플러그인}}"
msgid "{0, plural, one {Skill} other {Skills}}"
msgstr "{0, plural, other {스킬}}"
+#. placeholder {0}: pendingUploads.length
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+msgstr "{0, plural, other {첨부 #개 업로드 중}}"
+
#. placeholder {0}: sibling.name
#: src/lib/acp/config-value-hints.ts
msgid "{0} · default"
@@ -353,6 +366,12 @@ msgstr "{0}개 선택됨 (전체 {1}개 프로젝트 중)"
msgid "{0} of {1} selected"
msgstr "{0}/{1} 선택됨"
+#. placeholder {0}: resolvedTarget.displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0}은(는) 링크로 열리므로 첨부를 받을 수 없습니다. 대신 앱 내 에이전트를 선택하세요."
+
#. placeholder {0}: siblings.length
#: src/components/SkillPluginBundleBanner.tsx
msgid "{0} other skills by this publisher"
@@ -381,6 +400,12 @@ msgstr "{0} 속성"
msgid "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
msgstr "{0}: {poolRootRel}을 통해 이 스킬을 읽는 중입니다. {1}이 \"{2}\"을 읽지 않게 하려면 클릭하세요. {subRoot}의 다른 스킬은 유지되고 {poolRootRel} 추적만 중단됩니다."
+#. placeholder {0}: TERMINAL_CLIS[selection.cli].displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0}은(는) 터미널에서 실행되므로 첨부를 받을 수 없습니다. 대신 앱 내 에이전트를 선택하세요."
+
#. placeholder {0}: formatToolList( [f.host, ...following.map((o) => o.host)].map(hostLabel), i18n.locale, )
#: src/components/settings/SkillTargetsPicker.tsx
msgid "{0} share this folder."
@@ -510,6 +535,7 @@ msgid "{agentName} couldn't start."
msgstr "{agentName} 시작 실패."
#: src/components/acp/ThreadView.tsx
+#: src/lib/acp/launch-agent-thread.ts
msgid "{agentName} doesn't accept image attachments."
msgstr "{agentName}: 이미지 첨부 미지원"
@@ -860,6 +886,14 @@ msgstr "{minutes}분 전"
msgid "{name} CLI"
msgstr "{name} CLI"
+#: src/lib/acp/image-attachment.ts
+msgid "{name} has no resolvable path — the agent can only read files inside the workspace."
+msgstr "{name}의 경로를 확인할 수 없습니다. 에이전트는 워크스페이스 안의 파일만 읽을 수 있습니다."
+
+#: src/lib/acp/image-attachment.ts
+msgid "{name} is outside the workspace. Move it into your project first."
+msgstr "{name}이(가) 워크스페이스 밖에 있습니다. 먼저 프로젝트 안으로 옮기세요."
+
#: src/components/GraphPanel.tsx
msgid "{nodeCount, plural, one {# node} other {# nodes}}"
msgstr "{nodeCount, plural, other {노드 #개}}"
@@ -873,6 +907,7 @@ msgid "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
msgstr "{openedWorktreeCount, plural, other {워크트리}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
msgstr "{outsideWorkspaceCount, plural, other {워크스페이스 외부의 파일 #개를 건너뛰었습니다.}}"
@@ -975,6 +1010,7 @@ msgid "{skillCount, plural, one {skill} other {skills}}"
msgstr "{skillCount, plural, other {스킬}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
msgstr "{skipTotal, plural, other {첨부할 수 없는 파일 #개를 건너뛰었습니다.}}"
@@ -1019,6 +1055,11 @@ msgstr "{templateCount, plural, other {템플릿}}"
msgid "{tokens, plural, one {token} other {tokens}}"
msgstr "{tokens, plural, other {토큰}}"
+#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
+msgid "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+msgstr "{tooLargeTotalCount, plural, other {파일 #개를 건너뛰었습니다. 메시지당 첨부 총합은 {budgetKb} KB를 넘을 수 없습니다.}}"
+
#: src/components/file-tree-problem-indicators.ts
msgid "{total, plural, one {# problem} other {# problems}}"
msgstr "{total, plural, other {#개 문제}}"
@@ -1028,6 +1069,7 @@ msgid "{truncatedShownCount, plural, one {Showing the first item in one folder
msgstr "{truncatedShownCount, plural, other {한 폴더의 첫 {formattedCount}개 항목만 표시됩니다. 해당 폴더의 나머지 항목은 숨겨져 있습니다.}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
msgstr "{unknownPathCount, plural, other {파일 #개를 건너뛰었습니다 — 이 브라우저는 경로로 파일을 첨부할 수 없습니다.}}"
@@ -2072,7 +2114,7 @@ msgstr "에셋 제안"
msgid "Asset: {title}"
msgstr "에셋: {title}"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid "Attach a file"
msgstr "파일 첨부"
@@ -2085,6 +2127,10 @@ msgstr "이미지 첨부"
msgid "Attachments"
msgstr "첨부 파일"
+#: src/components/BottomComposer.tsx
+msgid "Attachments aren't available in note windows yet — use the main window to attach files."
+msgstr "노트 창에서는 아직 첨부를 사용할 수 없습니다. 메인 창에서 파일을 첨부하세요."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Attachments must total under 3 MB."
@@ -4052,6 +4098,7 @@ msgid "Couldn't reach the Open Knowledge server to upload {fileName}."
msgstr "{fileName} 파일을 업로드하려고 Open Knowledge 서버에 연결할 수 없습니다."
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "Couldn't read {fileName}."
msgstr "{fileName} 읽기 실패."
@@ -6042,6 +6089,10 @@ msgstr "파일 놓기 영역"
msgid "File duplicated"
msgstr "파일을 복제했습니다"
+#: src/lib/acp/image-attachment.ts
+msgid "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+msgstr "파일이 너무 큽니다({sizeKb} KB). 첨부 파일은 각각 {limitKb} KB로 제한됩니다. 잘라내거나 크기를 줄인 뒤 다시 시도하세요."
+
#: src/components/NewItemDialog.tsx
msgid "File name"
msgstr "파일 이름"
@@ -6243,6 +6294,13 @@ msgstr "폴더 공유 링크가 복사되었습니다."
msgid "Folder target: {linkTitle}. Click to open the overview."
msgstr "폴더 대상: {linkTitle}. 클릭하여 개요를 엽니다."
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "Folders and empty files can't be attached — drop the files themselves."
+msgstr "폴더와 빈 파일은 첨부할 수 없습니다. 파일 자체를 드롭하세요."
+
#: src/components/acp/ThreadView.tsx
msgid "Follow the agent's edits"
msgstr "에이전트 변경 내용 따라가기"
@@ -8632,6 +8690,11 @@ msgstr "아직 설정된 에이전트 없음. 전송 메뉴에서 선택하세
msgid "no agents — saved, not installed anywhere"
msgstr "에이전트 없음 — 저장만 되고 어디에도 설치되지 않음"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+msgstr "아직 설정된 에이전트가 없습니다. 파일을 첨부하려면 에이전트 연결에서 앱 내 에이전트를 추가하세요."
+
#: src/components/settings/AgentConnectionsSection.tsx
msgid "No agents available."
msgstr "사용 가능한 에이전트 없음."
@@ -9201,6 +9264,10 @@ msgstr "나만 보기"
msgid "Only modified"
msgstr "수정된 항목만"
+#: src/lib/acp/image-attachment.ts
+msgid "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+msgstr "PNG, JPEG, GIF, WebP 이미지만 지원됩니다({mimeType}을(를) 받았습니다)."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Only PNG, JPEG, or WebP images are allowed."
@@ -10869,7 +10936,7 @@ msgstr "제거"
#. placeholder {0}: file.name
#. placeholder {0}: image.name
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/PendingImageStrip.tsx
#: src/components/ImageAttachments.tsx
msgid "Remove {0}"
msgstr "{0} 제거"
@@ -13773,6 +13840,11 @@ msgstr "<0>{shareBranch}</0> 브랜치에서 공유된 {targetNoun}입니다.
msgid "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
msgstr "<0>{shareBranch}</0> 브랜치에서 공유된 {targetNoun}입니다. 현재 브랜치는 <1>{currentLabel}</1>입니다."
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "This agent doesn't accept attachments — remove them or choose an in-app agent."
+msgstr "이 에이전트는 첨부를 받을 수 없습니다. 첨부를 제거하거나 앱 내 에이전트를 선택하세요."
+
#: src/editor/composer-mention/ComposerSlashMenu.tsx
msgid "This agent doesn't offer slash commands"
msgstr "이 에이전트는 슬래시 명령을 제공하지 않습니다"
@@ -13828,6 +13900,12 @@ msgstr "Settings > AI tools & CLI에서 설정 가능"
msgid "This comment is on the whole property"
msgstr "이 댓글, 속성 전체에 적용됨"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "This composer doesn't accept attachments."
+msgstr "여기에는 파일을 첨부할 수 없습니다."
+
#: src/components/DiffViewBoundary.tsx
msgid "This conflict is resolved."
msgstr "이 충돌은 해결되었습니다."
@@ -14654,6 +14732,10 @@ msgstr "해결할 수 없는 파일 {identity}. 참조로 이동합니다."
msgid "Unresolvable image {identity}. Go to reference."
msgstr "해결할 수 없는 이미지 {identity}. 참조로 이동합니다."
+#: src/lib/acp/image-attachment.ts
+msgid "Unsupported file type: {fileType}."
+msgstr "지원되지 않는 파일 형식: {fileType}."
+
#: src/components/BugReportHistory.tsx
msgid "Untitled report"
msgstr "제목 없는 보고서"
@@ -14794,6 +14876,7 @@ msgstr "\"{0}\"으로 업로드했습니다. 이름 \"{1}\"은 이미 사용 중
msgid "Uploading"
msgstr "업로드 중"
+#: src/components/acp/PendingImageStrip.tsx
#: src/editor/image-upload/index.ts
msgid "Uploading {fileName}"
msgstr "{fileName} 업로드 중"
diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.json
index 6af911aed..30d9cd371 100644
--- a/packages/app/src/locales/pseudo/messages.json
+++ b/packages/app/src/locales/pseudo/messages.json
@@ -808,6 +808,7 @@
],
"9fhQRL": ["ßēţà ćĥàńńēĺ"],
"9fvog2": ["Ƥŕēvĩēŵ ũńàvàĩĺàƀĺē: ", ["errorDetail"]],
+ "9gu0n7": ["Ũńśũƥƥōŕţēď ƒĩĺē ţŷƥē: ", ["fileType"], "."],
"9hEdtC": [
"Ţĥĩś ōńē ţēàćĥēś ŷōũŕ ÀĨ ţōōĺś ĥōŵ ţō ŵōŕķ ŵĩţĥ ŌƥēńĶńōŵĺēďĝē. Ĩţ ĺĩvēś ĩń ţĥē ƥŕōĴēćţ ƒōĺďēŕ, śō ĩţ ĩńśţàĺĺś ƒōŕ ēvēŕŷōńē ŵĥō ōƥēńś ţĥē ƥŕōĴēćţ."
],
@@ -1301,6 +1302,7 @@
"FjkaiT": ["Źōōḿ ōũţ"],
"Fjz6aJ": ["Śēńď ţō à ńēŵ ćĥàţ"],
"FqGWeR": ["Ćōũĺďń'ţ ŕēàćĥ ţĥē àĝēńţ ŕēĝĩśţŕŷ."],
+ "FqMKq2": ["Ōńĺŷ ƤŃĜ, ĵƤĒĜ, ĜĨƑ, àńď ŴēƀƤ ĩḿàĝēś àŕē śũƥƥōŕţēď (ĝōţ ", ["mimeType"], ")."],
"FqTpiN": ["ßĩŕď ŵĩķĩ"],
"Fqr8BP": ["Ḿũĺţĩ-ƥàĝē ƤĎƑ vĩēŵēŕ ŵĩţĥ ţōōĺƀàŕ ćōńţŕōĺś (ţĥũḿƀńàĩĺś, ƥàĝē ńàv, źōōḿ)."],
"Fqx38P": ["Ŵĥàţ ĝōţ ĩń ţĥē ŵàŷ?"],
@@ -1328,6 +1330,10 @@
"G7-rf8": ["Ƥàţţēŕń śŷńţàx ēŕŕōŕ: ", ["message"]],
"G7bn_N": ["Śţàŕţ àń àĝēńţ"],
"G7cMuO": ["ĤŢḾĹ ƥŕēvĩēŵ"],
+ "G7gMiG": [
+ ["0"],
+ " ŕũńś ĩń à ţēŕḿĩńàĺ àńď ďōēśń'ţ àććēƥţ àţţàćĥḿēńţś — ćĥōōśē àń ĩń-àƥƥ àĝēńţ ĩńśţēàď."
+ ],
"G8t9NN": ["Àďď à ƥŕōƥēŕţŷ"],
"GA-UkN": [["keyName"], " ţŷƥē: ", ["typeLabel"], ". Ćĺĩćķ ţō ćĥàńĝē."],
"GAohqx": ["Ďēĺēţē ćōĺũḿń"],
@@ -1389,6 +1395,9 @@
"GemPfn": ["Ƒàĩĺēď ţō ƥàŕśē ƒōŕŵàŕď-ĺĩńķś ēŕŕōŕ ŕēśƥōńśē (ĤŢŢƤ ", ["status"], ")"],
"Gfr4fu": ["Śēŕvēŕ ćàń'ţ ōƥēń ďōćũḿēńţś"],
"GhjUB_": ["Ŕēćōńńēćţēď"],
+ "Gi8Akx": [
+ "Ńō àĝēńţś àŕē śēţ ũƥ ŷēţ — àďď àń ĩń-àƥƥ àĝēńţ ĩń Àĝēńţ ćōńńēćţĩōńś ţō àţţàćĥ ƒĩĺēś."
+ ],
"GidGkh": ["Ũƥďàţē ƒŕōḿ śōũŕćē"],
"GifIjR": [
"Śķĩĺĺ \"",
@@ -1619,6 +1628,7 @@
"ŌƥēńĶńōŵĺēďĝē ćōũĺďń'ţ ŕēàď ţēŕḿĩńàĺ.śĥēĺĺ ĩń .ōķ/ĺōćàĺ/ćōńƒĩĝ.ŷḿĺ. Ũśĩńĝ àń àvàĩĺàƀĺē Ŵĩńďōŵś śĥēĺĺ ĩńśţēàď."
],
"K9J00P": ["Ćĺōńē ƒàĩĺēď — ćōńńēćţĩōń ēŕŕōŕ"],
+ "K9ViCA": [["name"], " ĩś ōũţśĩďē ţĥē ŵōŕķśƥàćē. Ḿōvē ĩţ ĩńţō ŷōũŕ ƥŕōĴēćţ ƒĩŕśţ."],
"KDrbNG": ["ŌƥēńĶńōŵĺēďĝē ĺōōķēď ũƥ ĺĩńķś ƒōŕ ", ["subject"]],
"KDuPiY": ["Ũƥĺōàďĩńĝ ", ["fileName"]],
"KDw4GX": ["Ţŕŷ àĝàĩń"],
@@ -1648,6 +1658,13 @@
"KZLdgR": ["Śēē <0>#ďēśĩĝń-ďōćś</0> ƒōŕ ţĥē ĺàţēśţ śƥēćś."],
"K_vT1F": ["Ũƥśţŕēàḿ śŷńć"],
"KaFCD3": ["Ōƥēń ţĥĩś ĺĩńķ ĩń à ńēŵ ţàƀ àńď ćōĺĺàƥśē ţĥē ĝŕàƥĥ."],
+ "Kb08WL": [
+ "Ƒĩĺē ĩś ţōō ĺàŕĝē (",
+ ["sizeKb"],
+ " Ķß) — ēàćĥ àţţàćĥḿēńţ ĩś ćàƥƥēď àţ ",
+ ["limitKb"],
+ " Ķß. Ćŕōƥ ōŕ ŕēśĩźē ĩţ àńď ţŕŷ àĝàĩń."
+ ],
"Kbz9RK": ["Ƒĩxēď ƥōŕţ ńũḿƀēŕ"],
"Kdvukk": ["Ḿàŕķďōŵń ćĥēćķś ďō ńōţ àƥƥĺŷ ţō ţĥĩś ƒĩĺē."],
"KeXgA-": ["Ćōũĺďń'ţ ƒĩńď ţĥàţ ƥàśśàĝē — ţĥē ţēxţ ĩţ ŵàś ōń ḿàŷ ĥàvē ćĥàńĝēď."],
@@ -1801,6 +1818,13 @@
"M92_0q": ["Ćĺōśē ćōḿḿēńţ"],
"M9597s": ["Ƥŕēƥàŕĩńĝ śĥàŕē ŨŔĹ..."],
"MBKkUy": ["śķĩĺĺś.śĥ ĩś ũńàvàĩĺàƀĺē; śĥōŵĩńĝ ĜĩţĤũƀ ŕēśũĺţś (ńō ĩńśţàĺĺ ŕàńķĩńĝ)."],
+ "MBfjUk": [
+ [
+ "0",
+ "plural",
+ { "one": ["Ũƥĺōàďĩńĝ ", "#", " àţţàćĥḿēńţ"], "other": ["Ũƥĺōàďĩńĝ ", "#", " àţţàćĥḿēńţś"] }
+ ]
+ ],
"MCjC9A": ["Ďēĺēţē ", ["deleteDescriptorLabel"]],
"MDBJwN": ["Ĥàŕď ţō ũśē"],
"MDZSJe": ["Ŵĥēń ţĥē àĝēńţ ŕũńś ĩţś śćĥēďũĺēď ŵōŕķ."],
@@ -2332,6 +2356,7 @@
],
"ScwcF2": ["À ƥŕōĴēćţ àĺŕēàďŷ ēxĩśţś àţ ţĥĩś ĺōćàţĩōń. Ƥĩćķ à ďĩƒƒēŕēńţ ƥàŕēńţ ƒōĺďēŕ."],
"Sg-6Bo": [["errorCount", "plural", { "one": ["#", " ēŕŕōŕ"], "other": ["#", " ēŕŕōŕś"] }]],
+ "SgAFuo": ["Ţĥĩś ćōḿƥōśēŕ ďōēśń'ţ àććēƥţ àţţàćĥḿēńţś."],
"SgKLfA": ["Ńōţ ćōńńēćţēď ţō ĜĩţĤũƀ."],
"Sh3Qkg": ["Ńō ḿàţćĥĩńĝ ƀŕàńćĥēś."],
"Si7mIR": ["Ćŕēàţē ŕēƥōŕţ"],
@@ -3126,6 +3151,10 @@
"Ŵĥĩĺē ŷōũ'ŕē śĩĝńēď ōũţ, ũƥďàţēś àŕē ćĥēćķēď àţ ḿōśţ ēvēŕŷ 3 ḿĩńũţēś ŕēĝàŕďĺēśś ōƒ ţĥĩś śēţţĩńĝ."
],
"cIptmH": ["Ĩń ţĥē Ćĺàũďē Ďēśķţōƥ Àƥƥ"],
+ "cK5W4m": [
+ ["0"],
+ " ōƥēńś vĩà à ĺĩńķ àńď ďōēśń'ţ àććēƥţ àţţàćĥḿēńţś — ćĥōōśē àń ĩń-àƥƥ àĝēńţ ĩńśţēàď."
+ ],
"cLP0Lf": ["Ŕēḿōţē śķĩĺĺ śōũŕćē"],
"cLn264": ["Ţĥĩś ţĥēḿē ƒĩĺē ćōũĺďń’ţ ƀē ŕēàď"],
"cMMb6H": ["Ĩńśţàĺĺēď ", ["imported"], ", ƀũţ ", ["failed"], " ƒàĩĺēď: ", ["failedNames"]],
@@ -3208,6 +3237,16 @@
"d6qW27": [["agentName"], " ŕēƥōŕţēď: ", ["headline"]],
"dCforW": ["Ŵŕĩţĩńĝ ţĥĩś ƒĩĺē ƒàĩĺēď. Ćĥēćķ ţĥē ŌƥēńĶńōŵĺēďĝē ĺōĝ ƒōŕ ţĥē ŕēàśōń."],
"dD7NPy": ["Ōũţĺĩńē"],
+ "dDBZ0j": [
+ [
+ "0",
+ "plural",
+ {
+ "one": ["#", " àţţàćĥḿēńţ ĩś ŕēàďŷ ţō śēńď"],
+ "other": ["#", " àţţàćĥḿēńţś àŕē ŕēàďŷ ţō śēńď"]
+ }
+ ]
+ ],
"dDpCOp": ["Ŕēńàḿē śũććēēďēď ƀũţ ţĥē śĩďēƀàŕ ḿàŷ ƀē ōũţ ōƒ ďàţē — ŕēƒŕēśĥ ţō ŕēśŷńć"],
"dEgA5A": ["Ćàńćēĺ"],
"dFrqBg": [["0"], " ƥĺũĝĩń"],
@@ -3226,6 +3265,28 @@
"dOHMA0": ["Ƒàĩĺēď ţō ḿōvē"],
"dOxPd4": ["Ƒōōţńōţē"],
"dQHSCs": ["Ćōńvēŕţ (ďēĺēţē ōŕĩĝĩńàĺ)"],
+ "dRCAgQ": [
+ [
+ "tooLargeTotalCount",
+ "plural",
+ {
+ "one": [
+ "Śķĩƥƥēď ",
+ "#",
+ " ƒĩĺē — àţţàćĥḿēńţś ćàń'ţ ţōţàĺ ḿōŕē ţĥàń ",
+ ["budgetKb"],
+ " Ķß ƥēŕ ḿēśśàĝē."
+ ],
+ "other": [
+ "Śķĩƥƥēď ",
+ "#",
+ " ƒĩĺēś — àţţàćĥḿēńţś ćàń'ţ ţōţàĺ ḿōŕē ţĥàń ",
+ ["budgetKb"],
+ " Ķß ƥēŕ ḿēśśàĝē."
+ ]
+ }
+ ]
+ ],
"dSORvE": ["Śţōƥś ţĥē ćũŕŕēńţ ŕũń àńď śēńďś ţĥĩś ĩńśţēàď"],
"dT-HIQ": ["Ţōō ḿàńŷ ĺĩvē ŕēƒēŕēńćēś ōń ţĥĩś ƥàĝē. Ţĥĩś ƀōàŕď ŵàś ńōţ ĺōàďēď."],
"dTaauv": ["Ŕēàśōń: ", ["reason"]],
@@ -4387,6 +4448,10 @@
"q63KUv": ["Àďď ḾĆƤ & śķĩĺĺ"],
"q7F5am": ["ţĩţĺē"],
"q8aCbb": ["Ţŵō vēŕśĩōńś ōƒ \"", ["0"], "\" — śōũŕćē vś ", ["editor"]],
+ "q8tKSU": [
+ ["name"],
+ " ĥàś ńō ŕēśōĺvàƀĺē ƥàţĥ — ţĥē àĝēńţ ćàń ōńĺŷ ŕēàď ƒĩĺēś ĩńśĩďē ţĥē ŵōŕķśƥàćē."
+ ],
"qAQVSD": ["Ƥàĝē ĥēàďĩńĝś ŕēśƥōńśē ŵàś ńōţ ĵŚŌŃ"],
"qAhFeg": [
["userName"],
@@ -4416,6 +4481,7 @@
"qTT48-": [
"Ŵĩķĩ-ĺĩńķś ĺĩķē [[Ƥàĝē]] — à śũƥƥōŕţēď ŵàŷ ţō ĺĩńķ ĥēŕē, ƀũţ àń ēxţēŕńàĺ ŕēàďēŕ ŕēśōĺvēś ńōţĥĩńĝ àńď śĥōŵś ţĥē ƀŕàćķēţś."
],
+ "qTULIf": ["Ţĥĩś àĝēńţ ďōēśń'ţ àććēƥţ àţţàćĥḿēńţś — ŕēḿōvē ţĥēḿ ōŕ ćĥōōśē àń ĩń-àƥƥ àĝēńţ."],
"qTcVwj": ["ßŕōŵśē ōŕ ũƥĺōàď à śķĩĺĺ ƒōŕ ţĥĩś ƥŕōĴēćţ."],
"qTcZZu": ["Ƒàĩĺēď ţō ĺōàď ţàĝś. Ƥŕēśś <0>Ēść</0> àńď ŕē-ōƥēń ţō ŕēţŕŷ."],
"qX-ABr": ["Ōŕ ţō ũśē ƀŕōŵśēŕ śĩĝń-ĩń ĩńśţēàď:"],
@@ -4490,6 +4556,7 @@
],
"rJVoVX": ["Śōũŕćē ƒĩńď ŕēśũĺţś"],
"rJm8-2": ["Ćōũĺďń’ţ ŕēàćĥ ţĥē ćĺĩƥƀōàŕď — ţĥē ţĥēḿē ĩś ĩń ţĥē ƀōx ƀēĺōŵ."],
+ "rNi1kZ": ["Ƒōĺďēŕś àńď ēḿƥţŷ ƒĩĺēś ćàń'ţ ƀē àţţàćĥēď — ďŕōƥ ţĥē ƒĩĺēś ţĥēḿśēĺvēś."],
"rNifQd": ["Ŕēḿōvē ƥŕōƥēŕţŷ"],
"rQAQus": ["Ćōũĺďń'ţ śàvē ţēḿƥĺàţē: ", ["error"]],
"rQRrkB": ["ŷēśţēŕďàŷ"],
@@ -4868,6 +4935,9 @@
"vPLUCm": ["Ḿĩśśĩńĝ ĩḿàĝē ", ["identity"], ". Ĝō ţō ŕēƒēŕēńćē."],
"vPXOUw": ["Ţōĝĝĺē śōũŕćē vĩēŵ"],
"vQIVHc": ["Ƒōĺďēŕ ƥŕōƥēŕţĩēś"],
+ "vQOuVY": [
+ "Àţţàćĥḿēńţś àŕēń'ţ àvàĩĺàƀĺē ĩń ńōţē ŵĩńďōŵś ŷēţ — ũśē ţĥē ḿàĩń ŵĩńďōŵ ţō àţţàćĥ ƒĩĺēś."
+ ],
"vUP_HF": [
"Ŵĩţĥōũţ à ćōńńēćţēď ÀĨ ţōōĺ, ţĥē ƥàćķ'ś ",
["packSkillCount", "plural", { "one": ["#", " śķĩĺĺ"], "other": ["#", " śķĩĺĺś"] }],
diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.po
index 6b5652d80..9e8b2215a 100644
--- a/packages/app/src/locales/pseudo/messages.po
+++ b/packages/app/src/locales/pseudo/messages.po
@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid " · references only (no embedded contents)"
msgstr ""
@@ -146,6 +146,12 @@ msgstr ""
msgid "(symlink)"
msgstr ""
+#. placeholder {0}: pendingAttachments.length
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+msgstr ""
+
#. placeholder {0}: preview.backlinkCount
#: src/editor/link-preview/InternalDocPreviewCard.tsx
msgid "{0, plural, one {# backlink} other {# backlinks}}"
@@ -260,6 +266,13 @@ msgstr ""
msgid "{0, plural, one {Skill} other {Skills}}"
msgstr ""
+#. placeholder {0}: pendingUploads.length
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+msgstr ""
+
#. placeholder {0}: sibling.name
#: src/lib/acp/config-value-hints.ts
msgid "{0} · default"
@@ -353,6 +366,12 @@ msgstr ""
msgid "{0} of {1} selected"
msgstr ""
+#. placeholder {0}: resolvedTarget.displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+msgstr ""
+
#. placeholder {0}: siblings.length
#: src/components/SkillPluginBundleBanner.tsx
msgid "{0} other skills by this publisher"
@@ -381,6 +400,12 @@ msgstr ""
msgid "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
msgstr ""
+#. placeholder {0}: TERMINAL_CLIS[selection.cli].displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+msgstr ""
+
#. placeholder {0}: formatToolList( [f.host, ...following.map((o) => o.host)].map(hostLabel), i18n.locale, )
#: src/components/settings/SkillTargetsPicker.tsx
msgid "{0} share this folder."
@@ -510,6 +535,7 @@ msgid "{agentName} couldn't start."
msgstr ""
#: src/components/acp/ThreadView.tsx
+#: src/lib/acp/launch-agent-thread.ts
msgid "{agentName} doesn't accept image attachments."
msgstr ""
@@ -860,6 +886,14 @@ msgstr ""
msgid "{name} CLI"
msgstr ""
+#: src/lib/acp/image-attachment.ts
+msgid "{name} has no resolvable path — the agent can only read files inside the workspace."
+msgstr ""
+
+#: src/lib/acp/image-attachment.ts
+msgid "{name} is outside the workspace. Move it into your project first."
+msgstr ""
+
#: src/components/GraphPanel.tsx
msgid "{nodeCount, plural, one {# node} other {# nodes}}"
msgstr ""
@@ -873,6 +907,7 @@ msgid "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
msgstr ""
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
msgstr ""
@@ -975,6 +1010,7 @@ msgid "{skillCount, plural, one {skill} other {skills}}"
msgstr ""
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
msgstr ""
@@ -1019,6 +1055,11 @@ msgstr ""
msgid "{tokens, plural, one {token} other {tokens}}"
msgstr ""
+#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
+msgid "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+msgstr ""
+
#: src/components/file-tree-problem-indicators.ts
msgid "{total, plural, one {# problem} other {# problems}}"
msgstr ""
@@ -1028,6 +1069,7 @@ msgid "{truncatedShownCount, plural, one {Showing the first item in one folder
msgstr ""
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
msgstr ""
@@ -2068,7 +2110,7 @@ msgstr ""
msgid "Asset: {title}"
msgstr ""
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid "Attach a file"
msgstr ""
@@ -2081,6 +2123,10 @@ msgstr ""
msgid "Attachments"
msgstr ""
+#: src/components/BottomComposer.tsx
+msgid "Attachments aren't available in note windows yet — use the main window to attach files."
+msgstr ""
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Attachments must total under 3 MB."
@@ -4048,6 +4094,7 @@ msgid "Couldn't reach the Open Knowledge server to upload {fileName}."
msgstr ""
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "Couldn't read {fileName}."
msgstr ""
@@ -6038,6 +6085,10 @@ msgstr ""
msgid "File duplicated"
msgstr ""
+#: src/lib/acp/image-attachment.ts
+msgid "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+msgstr ""
+
#: src/components/NewItemDialog.tsx
msgid "File name"
msgstr ""
@@ -6239,6 +6290,13 @@ msgstr ""
msgid "Folder target: {linkTitle}. Click to open the overview."
msgstr ""
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "Folders and empty files can't be attached — drop the files themselves."
+msgstr ""
+
#: src/components/acp/ThreadView.tsx
msgid "Follow the agent's edits"
msgstr ""
@@ -8628,6 +8686,11 @@ msgstr ""
msgid "no agents — saved, not installed anywhere"
msgstr ""
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+msgstr ""
+
#: src/components/settings/AgentConnectionsSection.tsx
msgid "No agents available."
msgstr ""
@@ -9197,6 +9260,10 @@ msgstr ""
msgid "Only modified"
msgstr ""
+#: src/lib/acp/image-attachment.ts
+msgid "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+msgstr ""
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Only PNG, JPEG, or WebP images are allowed."
@@ -10865,7 +10932,7 @@ msgstr ""
#. placeholder {0}: file.name
#. placeholder {0}: image.name
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/PendingImageStrip.tsx
#: src/components/ImageAttachments.tsx
msgid "Remove {0}"
msgstr ""
@@ -13769,6 +13836,11 @@ msgstr ""
msgid "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
msgstr ""
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "This agent doesn't accept attachments — remove them or choose an in-app agent."
+msgstr ""
+
#: src/editor/composer-mention/ComposerSlashMenu.tsx
msgid "This agent doesn't offer slash commands"
msgstr ""
@@ -13824,6 +13896,12 @@ msgstr ""
msgid "This comment is on the whole property"
msgstr ""
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "This composer doesn't accept attachments."
+msgstr ""
+
#: src/components/DiffViewBoundary.tsx
msgid "This conflict is resolved."
msgstr ""
@@ -14650,6 +14728,10 @@ msgstr ""
msgid "Unresolvable image {identity}. Go to reference."
msgstr ""
+#: src/lib/acp/image-attachment.ts
+msgid "Unsupported file type: {fileType}."
+msgstr ""
+
#: src/components/BugReportHistory.tsx
msgid "Untitled report"
msgstr ""
@@ -14790,6 +14872,7 @@ msgstr ""
msgid "Uploading"
msgstr ""
+#: src/components/acp/PendingImageStrip.tsx
#: src/editor/image-upload/index.ts
msgid "Uploading {fileName}"
msgstr ""
diff --git a/packages/app/src/locales/pt-BR/messages.json b/packages/app/src/locales/pt-BR/messages.json
index 702a4c341..73e1baf9a 100644
--- a/packages/app/src/locales/pt-BR/messages.json
+++ b/packages/app/src/locales/pt-BR/messages.json
@@ -927,6 +927,7 @@
],
"9fhQRL": ["Canal beta"],
"9fvog2": ["Pré-visualização indisponível: ", ["errorDetail"]],
+ "9gu0n7": ["Tipo de arquivo não compatível: ", ["fileType"], "."],
"9hEdtC": [
"Esta ensina suas ferramentas de IA a trabalhar com o OpenKnowledge. Ela fica na pasta do projeto, então é instalada para todos que abrirem o projeto."
],
@@ -1476,6 +1477,11 @@
"FjkaiT": ["Afastar"],
"Fjz6aJ": ["Enviar para um novo chat"],
"FqGWeR": ["Não deu para contatar o registro de agentes."],
+ "FqMKq2": [
+ "Apenas imagens PNG, JPEG, GIF e WebP são compatíveis (recebido ",
+ ["mimeType"],
+ ")."
+ ],
"FqTpiN": ["Wiki de aves"],
"Fqr8BP": [
"Visualizador de PDF de várias páginas com controles na barra de ferramentas (miniaturas, navegação de páginas, zoom)."
@@ -1517,6 +1523,10 @@
"G7-rf8": ["Erro de sintaxe no padrão: ", ["message"]],
"G7bn_N": ["Iniciar um agente"],
"G7cMuO": ["Pré-visualização do HTML"],
+ "G7gMiG": [
+ ["0"],
+ " roda em um terminal e não aceita anexos — escolha um agente integrado ao app."
+ ],
"G8t9NN": ["Adicionar uma propriedade"],
"GA-UkN": ["Tipo de ", ["keyName"], ": ", ["typeLabel"], ". Clique para alterar."],
"GAohqx": ["Excluir coluna"],
@@ -1584,6 +1594,9 @@
],
"Gfr4fu": ["O servidor não consegue abrir documentos"],
"GhjUB_": ["Reconectado"],
+ "Gi8Akx": [
+ "Nenhum agente foi configurado ainda — para anexar arquivos, adicione um agente integrado ao app em Conexões de agentes."
+ ],
"GidGkh": ["Atualizar pela fonte"],
"GifIjR": [
"A skill “",
@@ -1854,6 +1867,7 @@
"O OpenKnowledge não conseguiu ler terminal.shell em .ok/local/config.yml. Um shell do Windows disponível será usado."
],
"K9J00P": ["Falha ao clonar — erro de conexão"],
+ "K9ViCA": [["name"], " está fora do espaço de trabalho. Mova-o para o seu projeto primeiro."],
"KDrbNG": ["OpenKnowledge consultou os links de ", ["subject"]],
"KDuPiY": ["Enviando ", ["fileName"]],
"KDw4GX": ["Tente de novo"],
@@ -1883,6 +1897,13 @@
"KZLdgR": ["Veja <0>#design-docs</0> para as especificações mais recentes."],
"K_vT1F": ["Sincronização com o remoto"],
"KaFCD3": ["Abre este link em uma nova aba e recolhe o grafo."],
+ "Kb08WL": [
+ "O arquivo é grande demais (",
+ ["sizeKb"],
+ " KB) — cada anexo tem limite de ",
+ ["limitKb"],
+ " KB. Recorte ou redimensione e tente novamente."
+ ],
"Kbz9RK": ["Número de porta fixa"],
"Kdvukk": ["As verificações de Markdown não se aplicam a este arquivo."],
"KeXgA-": [
@@ -2061,6 +2082,17 @@
"MBKkUy": [
"O skills.sh está indisponível; mostrando resultados do GitHub (sem classificação por instalações)."
],
+ "MBfjUk": [
+ [
+ "0",
+ "plural",
+ {
+ "one": ["Enviando ", "#", " anexo"],
+ "many": ["Enviando ", "#", " anexos"],
+ "other": ["Enviando ", "#", " anexos"]
+ }
+ ]
+ ],
"MCjC9A": ["Excluir ", ["deleteDescriptorLabel"]],
"MDBJwN": ["Difícil de usar"],
"MDZSJe": ["Quando o agente roda o trabalho agendado dele."],
@@ -2634,6 +2666,7 @@
{ "one": ["#", " erro"], "many": ["#", " erros"], "other": ["#", " erros"] }
]
],
+ "SgAFuo": ["Não é possível anexar arquivos aqui."],
"SgKLfA": ["Não conectado ao GitHub."],
"Sh3Qkg": ["Nenhum ramo corresponde."],
"Si7mIR": ["Criar relatório"],
@@ -3540,6 +3573,10 @@
"Enquanto você estiver desconectado, as atualizações são verificadas no máximo a cada 3 minutos, independentemente desta configuração."
],
"cIptmH": ["No app Claude Desktop"],
+ "cK5W4m": [
+ ["0"],
+ " abre por um link e não aceita anexos — escolha um agente integrado ao app."
+ ],
"cLP0Lf": ["Fonte remota de habilidades"],
"cLn264": ["Não foi possível ler este arquivo de tema"],
"cMMb6H": [["imported"], " instaladas, mas ", ["failed"], " falharam: ", ["failedNames"]],
@@ -3635,6 +3672,17 @@
"Falha ao gravar este arquivo. Consulte o log do OpenKnowledge para saber o motivo."
],
"dD7NPy": ["Estrutura"],
+ "dDBZ0j": [
+ [
+ "0",
+ "plural",
+ {
+ "one": ["#", " anexo pronto para enviar"],
+ "many": ["#", " anexos prontos para enviar"],
+ "other": ["#", " anexos prontos para enviar"]
+ }
+ ]
+ ],
"dDpCOp": [
"A renomeação deu certo, mas a barra lateral pode estar desatualizada — atualize para ressincronizar"
],
@@ -3655,6 +3703,32 @@
"dOHMA0": ["Falha ao mover"],
"dOxPd4": ["Nota de rodapé"],
"dQHSCs": ["Converter (excluir o original)"],
+ "dRCAgQ": [
+ [
+ "tooLargeTotalCount",
+ "plural",
+ {
+ "one": [
+ "#",
+ " arquivo ignorado — os anexos não podem passar de ",
+ ["budgetKb"],
+ " KB no total por mensagem."
+ ],
+ "many": [
+ "#",
+ " arquivos ignorados — os anexos não podem passar de ",
+ ["budgetKb"],
+ " KB no total por mensagem."
+ ],
+ "other": [
+ "#",
+ " arquivos ignorados — os anexos não podem passar de ",
+ ["budgetKb"],
+ " KB no total por mensagem."
+ ]
+ }
+ ]
+ ],
"dSORvE": ["Interrompe a execução atual e envia isto no lugar"],
"dT-HIQ": ["Referências ao vivo demais nesta página. Este quadro não foi carregado."],
"dTaauv": ["Motivo: ", ["reason"]],
@@ -4933,6 +5007,10 @@
"q63KUv": ["Adicionar MCP e habilidade"],
"q7F5am": ["título"],
"q8aCbb": ["Duas versões de \"", ["0"], "\" — a fonte contra ", ["editor"]],
+ "q8tKSU": [
+ ["name"],
+ " não tem um caminho resolvível — o agente só consegue ler arquivos dentro do espaço de trabalho."
+ ],
"qAQVSD": ["A resposta dos títulos da página não era JSON"],
"qAhFeg": [
["userName"],
@@ -4966,6 +5044,7 @@
"qTT48-": [
"Links Wiki como [[Page]] — uma forma suportada de vincular aqui, mas um leitor externo não resolve nada e mostra os colchetes."
],
+ "qTULIf": ["Este agente não aceita anexos — remova-os ou escolha um agente integrado ao app."],
"qTcVwj": ["Procure ou envie uma habilidade para este projeto."],
"qTcZZu": [
"Falha ao carregar as tags. Pressione <0>Esc</0> e abra de novo para tentar outra vez."
@@ -5051,6 +5130,7 @@
],
"rJVoVX": ["Resultados de busca no código"],
"rJm8-2": ["Não foi possível acessar a área de transferência — o tema está na caixa abaixo."],
+ "rNi1kZ": ["Pastas e arquivos vazios não podem ser anexados — solte os próprios arquivos."],
"rNifQd": ["Remover a propriedade"],
"rQAQus": ["Não deu para salvar o modelo: ", ["error"]],
"rQRrkB": ["ontem"],
@@ -5469,6 +5549,9 @@
"vPLUCm": ["A imagem ", ["identity"], " está ausente. Ir para a referência."],
"vPXOUw": ["Mostrar ou ocultar a visualização de código"],
"vQIVHc": ["Propriedades da pasta"],
+ "vQOuVY": [
+ "Anexos ainda não estão disponíveis em janelas de nota — use a janela principal para anexar arquivos."
+ ],
"vUP_HF": [
"Sem uma ferramenta de IA conectada, ",
[
diff --git a/packages/app/src/locales/pt-BR/messages.po b/packages/app/src/locales/pt-BR/messages.po
index c456001e9..0952e1897 100644
--- a/packages/app/src/locales/pt-BR/messages.po
+++ b/packages/app/src/locales/pt-BR/messages.po
@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid " · references only (no embedded contents)"
msgstr " · apenas referências (sem conteúdo incorporado)"
@@ -146,6 +146,12 @@ msgstr "(outras regras podem já ocultar alguns)"
msgid "(symlink)"
msgstr "(link simbólico)"
+#. placeholder {0}: pendingAttachments.length
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+msgstr "{0, plural, one {# anexo pronto para enviar} many {# anexos prontos para enviar} other {# anexos prontos para enviar}}"
+
#. placeholder {0}: preview.backlinkCount
#: src/editor/link-preview/InternalDocPreviewCard.tsx
msgid "{0, plural, one {# backlink} other {# backlinks}}"
@@ -260,6 +266,13 @@ msgstr "{0, plural, one {Plugin} many {Plugins} other {Plugins}}"
msgid "{0, plural, one {Skill} other {Skills}}"
msgstr "{0, plural, one {Habilidade} many {Habilidades} other {Habilidades}}"
+#. placeholder {0}: pendingUploads.length
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+msgstr "{0, plural, one {Enviando # anexo} many {Enviando # anexos} other {Enviando # anexos}}"
+
#. placeholder {0}: sibling.name
#: src/lib/acp/config-value-hints.ts
msgid "{0} · default"
@@ -353,6 +366,12 @@ msgstr "{0} de {1} projetos selecionados"
msgid "{0} of {1} selected"
msgstr "{0} de {1} selecionados"
+#. placeholder {0}: resolvedTarget.displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} abre por um link e não aceita anexos — escolha um agente integrado ao app."
+
#. placeholder {0}: siblings.length
#: src/components/SkillPluginBundleBanner.tsx
msgid "{0} other skills by this publisher"
@@ -381,6 +400,12 @@ msgstr "Propriedades de {0}"
msgid "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
msgstr "{0} lê esta habilidade por {poolRootRel}. Clique para que {1} deixe de receber \"{2}\" — {subRoot} mantém as outras habilidades, mas deixa de seguir {poolRootRel}."
+#. placeholder {0}: TERMINAL_CLIS[selection.cli].displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} roda em um terminal e não aceita anexos — escolha um agente integrado ao app."
+
#. placeholder {0}: formatToolList( [f.host, ...following.map((o) => o.host)].map(hostLabel), i18n.locale, )
#: src/components/settings/SkillTargetsPicker.tsx
msgid "{0} share this folder."
@@ -510,6 +535,7 @@ msgid "{agentName} couldn't start."
msgstr "{agentName} não conseguiu iniciar."
#: src/components/acp/ThreadView.tsx
+#: src/lib/acp/launch-agent-thread.ts
msgid "{agentName} doesn't accept image attachments."
msgstr "{agentName} não aceita anexos de imagem."
@@ -860,6 +886,14 @@ msgstr "há {minutes} min"
msgid "{name} CLI"
msgstr "CLI do {name}"
+#: src/lib/acp/image-attachment.ts
+msgid "{name} has no resolvable path — the agent can only read files inside the workspace."
+msgstr "{name} não tem um caminho resolvível — o agente só consegue ler arquivos dentro do espaço de trabalho."
+
+#: src/lib/acp/image-attachment.ts
+msgid "{name} is outside the workspace. Move it into your project first."
+msgstr "{name} está fora do espaço de trabalho. Mova-o para o seu projeto primeiro."
+
#: src/components/GraphPanel.tsx
msgid "{nodeCount, plural, one {# node} other {# nodes}}"
msgstr "{nodeCount, plural, one {# nó} many {# nós} other {# nós}}"
@@ -873,6 +907,7 @@ msgid "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
msgstr "{openedWorktreeCount, plural, one {worktree} many {worktrees} other {worktrees}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
msgstr "{outsideWorkspaceCount, plural, one {# arquivo fora do espaço de trabalho ignorado.} many {# arquivos fora do espaço de trabalho ignorados.} other {# arquivos fora do espaço de trabalho ignorados.}}"
@@ -975,6 +1010,7 @@ msgid "{skillCount, plural, one {skill} other {skills}}"
msgstr "{skillCount, plural, one {habilidade} many {habilidades} other {habilidades}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
msgstr "{skipTotal, plural, one {# arquivo ignorado, não foi possível anexar.} many {# arquivos ignorados, não foi possível anexar.} other {# arquivos ignorados, não foi possível anexar.}}"
@@ -1019,6 +1055,11 @@ msgstr "{templateCount, plural, one {modelo} many {modelos} other {modelos}}"
msgid "{tokens, plural, one {token} other {tokens}}"
msgstr "{tokens, plural, one {token} many {tokens} other {tokens}}"
+#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
+msgid "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+msgstr "{tooLargeTotalCount, plural, one {# arquivo ignorado — os anexos não podem passar de {budgetKb} KB no total por mensagem.} many {# arquivos ignorados — os anexos não podem passar de {budgetKb} KB no total por mensagem.} other {# arquivos ignorados — os anexos não podem passar de {budgetKb} KB no total por mensagem.}}"
+
#: src/components/file-tree-problem-indicators.ts
msgid "{total, plural, one {# problem} other {# problems}}"
msgstr "{total, plural, one {# problema} many {# problemas} other {# problemas}}"
@@ -1028,6 +1069,7 @@ msgid "{truncatedShownCount, plural, one {Showing the first item in one folder
msgstr "{truncatedShownCount, plural, one {Mostrando o primeiro item de uma pasta — o resto dessa pasta está oculto.} many {Mostrando os primeiros {formattedCount} itens de uma pasta — o resto dessa pasta está oculto.} other {Mostrando os primeiros {formattedCount} itens de uma pasta — o resto dessa pasta está oculto.}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
msgstr "{unknownPathCount, plural, one {# arquivo ignorado — este navegador não pode anexar arquivos por caminho.} many {# arquivos ignorados — este navegador não pode anexar arquivos por caminho.} other {# arquivos ignorados — este navegador não pode anexar arquivos por caminho.}}"
@@ -2068,7 +2110,7 @@ msgstr "Sugestões de recursos"
msgid "Asset: {title}"
msgstr "Recurso: {title}"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid "Attach a file"
msgstr "Anexar um arquivo"
@@ -2081,6 +2123,10 @@ msgstr "Anexar imagens"
msgid "Attachments"
msgstr "Anexos"
+#: src/components/BottomComposer.tsx
+msgid "Attachments aren't available in note windows yet — use the main window to attach files."
+msgstr "Anexos ainda não estão disponíveis em janelas de nota — use a janela principal para anexar arquivos."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Attachments must total under 3 MB."
@@ -4048,6 +4094,7 @@ msgid "Couldn't reach the Open Knowledge server to upload {fileName}."
msgstr "Não deu para contatar o servidor do Open Knowledge para enviar {fileName}."
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "Couldn't read {fileName}."
msgstr "Não foi possível ler {fileName}."
@@ -6038,6 +6085,10 @@ msgstr "Área para soltar arquivos"
msgid "File duplicated"
msgstr "Arquivo duplicado"
+#: src/lib/acp/image-attachment.ts
+msgid "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+msgstr "O arquivo é grande demais ({sizeKb} KB) — cada anexo tem limite de {limitKb} KB. Recorte ou redimensione e tente novamente."
+
#: src/components/NewItemDialog.tsx
msgid "File name"
msgstr "Nome do arquivo"
@@ -6239,6 +6290,13 @@ msgstr "Link de compartilhamento da pasta copiado."
msgid "Folder target: {linkTitle}. Click to open the overview."
msgstr "Pasta de destino: {linkTitle}. Clique para abrir a visão geral."
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "Folders and empty files can't be attached — drop the files themselves."
+msgstr "Pastas e arquivos vazios não podem ser anexados — solte os próprios arquivos."
+
#: src/components/acp/ThreadView.tsx
msgid "Follow the agent's edits"
msgstr "Acompanhar as edições do agente"
@@ -8628,6 +8686,11 @@ msgstr "Nenhum agente foi configurado ainda — escolha um no menu de envio."
msgid "no agents — saved, not installed anywhere"
msgstr "nenhum agente — salvas, não instaladas em lugar algum"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+msgstr "Nenhum agente foi configurado ainda — para anexar arquivos, adicione um agente integrado ao app em Conexões de agentes."
+
#: src/components/settings/AgentConnectionsSection.tsx
msgid "No agents available."
msgstr "Nenhum agente disponível."
@@ -9197,6 +9260,10 @@ msgstr "Somente eu"
msgid "Only modified"
msgstr "Somente os modificados"
+#: src/lib/acp/image-attachment.ts
+msgid "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+msgstr "Apenas imagens PNG, JPEG, GIF e WebP são compatíveis (recebido {mimeType})."
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Only PNG, JPEG, or WebP images are allowed."
@@ -10865,7 +10932,7 @@ msgstr "Remover"
#. placeholder {0}: file.name
#. placeholder {0}: image.name
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/PendingImageStrip.tsx
#: src/components/ImageAttachments.tsx
msgid "Remove {0}"
msgstr "Remover {0}"
@@ -13769,6 +13836,11 @@ msgstr "Este {targetNoun} foi compartilhado a partir do ramo <0>{shareBranch}</0
msgid "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
msgstr "Este {targetNoun} foi compartilhado a partir do ramo <0>{shareBranch}</0>. Você está agora em <1>{currentLabel}</1>."
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "This agent doesn't accept attachments — remove them or choose an in-app agent."
+msgstr "Este agente não aceita anexos — remova-os ou escolha um agente integrado ao app."
+
#: src/editor/composer-mention/ComposerSlashMenu.tsx
msgid "This agent doesn't offer slash commands"
msgstr "Este agente não oferece comandos de barra"
@@ -13824,6 +13896,12 @@ msgstr "Isto pode ser configurado em Configurações > Ferramentas de IA e CLI"
msgid "This comment is on the whole property"
msgstr "Este comentário é sobre a propriedade inteira"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "This composer doesn't accept attachments."
+msgstr "Não é possível anexar arquivos aqui."
+
#: src/components/DiffViewBoundary.tsx
msgid "This conflict is resolved."
msgstr "Este conflito foi resolvido."
@@ -14650,6 +14728,10 @@ msgstr "Não foi possível resolver o arquivo {identity}. Ir para a referência.
msgid "Unresolvable image {identity}. Go to reference."
msgstr "Não foi possível resolver a imagem {identity}. Ir para a referência."
+#: src/lib/acp/image-attachment.ts
+msgid "Unsupported file type: {fileType}."
+msgstr "Tipo de arquivo não compatível: {fileType}."
+
#: src/components/BugReportHistory.tsx
msgid "Untitled report"
msgstr "Relatório sem título"
@@ -14790,6 +14872,7 @@ msgstr "Enviado como \"{0}\" — o nome \"{1}\" já estava em uso."
msgid "Uploading"
msgstr "Enviando"
+#: src/components/acp/PendingImageStrip.tsx
#: src/editor/image-upload/index.ts
msgid "Uploading {fileName}"
msgstr "Enviando {fileName}"
diff --git a/packages/app/src/locales/ur/messages.json b/packages/app/src/locales/ur/messages.json
index 36ec8d6f7..876eb040c 100644
--- a/packages/app/src/locales/ur/messages.json
+++ b/packages/app/src/locales/ur/messages.json
@@ -825,6 +825,7 @@
],
"9fhQRL": ["بیٹا چینل"],
"9fvog2": ["پیش منظر دستیاب نہیں: ", ["errorDetail"]],
+ "9gu0n7": ["غیر معاون فائل کی قسم: ", ["fileType"], "۔"],
"9hEdtC": [
"یہ آپ کے AI ٹولز کو OpenKnowledge کے ساتھ کام کرنا سکھاتی ہے۔ یہ پروجیکٹ فولڈر میں رہتی ہے، اس لیے یہ ہر اس شخص کے لیے نصب ہوتی ہے جو پروجیکٹ کھولتا ہے۔"
],
@@ -1324,6 +1325,7 @@
"FjkaiT": ["چھوٹا کریں"],
"Fjz6aJ": ["نئی چیٹ میں بھیجیں"],
"FqGWeR": ["ایجنٹ رجسٹری تک رسائی نہیں ہو سکی۔"],
+ "FqMKq2": ["صرف PNG، JPEG، GIF اور WebP تصاویر معاون ہیں (", ["mimeType"], " موصول ہوا)۔"],
"FqTpiN": ["پرندوں کی وکی"],
"Fqr8BP": [
"ٹول بار کنٹرولز کے ساتھ کثیر صفحاتی PDF دیکھنے والا (تھمب نیلز، صفحہ نیویگیشن، زوم)۔"
@@ -1355,6 +1357,10 @@
"G7-rf8": ["پیٹرن کی ساخت میں خرابی: ", ["message"]],
"G7bn_N": ["ایجنٹ شروع کریں"],
"G7cMuO": ["HTML کا پیش منظر"],
+ "G7gMiG": [
+ ["0"],
+ " ٹرمینل میں چلتا ہے اور منسلکات قبول نہیں کرتا — اس کے بجائے ایپ کے اندر کا ایجنٹ منتخب کریں۔"
+ ],
"G8t9NN": ["خصوصیت شامل کریں"],
"GA-UkN": [["keyName"], " کی قسم: ", ["typeLabel"], "۔ تبدیل کرنے کے لیے کلک کریں۔"],
"GAohqx": ["کالم حذف کریں"],
@@ -1416,6 +1422,9 @@
"GemPfn": ["باہر جانے والے لنکس کی خرابی کا جواب پارس نہیں ہو سکا (HTTP ", ["status"], ")"],
"Gfr4fu": ["سرور دستاویزات نہیں کھول سکتا"],
"GhjUB_": ["دوبارہ منسلک ہو گیا"],
+ "Gi8Akx": [
+ "ابھی کوئی ایجنٹ ترتیب نہیں دیا گیا — فائلیں منسلک کرنے کے لیے «ایجنٹ کنکشنز» میں ایپ کے اندر کا ایجنٹ شامل کریں۔"
+ ],
"GidGkh": ["ماخذ سے اپ ڈیٹ کریں"],
"GifIjR": [
"اسکل «",
@@ -1657,6 +1666,7 @@
"OpenKnowledge .ok/local/config.yml میں terminal.shell نہیں پڑھ سکا۔ اس کے بجائے دستیاب Windows شیل استعمال کیا جا رہا ہے۔"
],
"K9J00P": ["کلون ناکام — کنکشن کی خرابی"],
+ "K9ViCA": [["name"], " ورک اسپیس سے باہر ہے۔ پہلے اسے اپنے پروجیکٹ میں منتقل کریں۔"],
"KDrbNG": ["OpenKnowledge نے ", ["subject"], " کے لنکس تلاش کیے"],
"KDuPiY": [["fileName"], " اپ لوڈ ہو رہی ہے"],
"KDw4GX": ["دوبارہ کوشش کریں"],
@@ -1686,6 +1696,13 @@
"KZLdgR": ["تازہ ترین اسپیکس کے لیے <0>#design-docs</0> دیکھیں۔"],
"K_vT1F": ["اپ سٹریم مطابقت پذیری"],
"KaFCD3": ["یہ لنک نئے ٹیب میں کھولیں اور گراف سکیڑ دیں۔"],
+ "Kb08WL": [
+ "فائل بہت بڑی ہے (",
+ ["sizeKb"],
+ " KB) — ہر منسلکہ کی حد ",
+ ["limitKb"],
+ " KB ہے۔ اسے کراپ کریں یا سائز چھوٹا کر کے دوبارہ کوشش کریں۔"
+ ],
"Kbz9RK": ["مقررہ پورٹ نمبر"],
"Kdvukk": ["Markdown کی جانچیں اس فائل پر لاگو نہیں ہوتیں۔"],
"KeXgA-": ["وہ اقتباس نہیں مل سکا — جس متن پر یہ تھا وہ شاید تبدیل ہو چکا ہے۔"],
@@ -1843,6 +1860,13 @@
"MBKkUy": [
"skills.sh دستیاب نہیں؛ GitHub کے نتائج دکھائے جا رہے ہیں (تنصیب کی درجہ بندی کے بغیر)۔"
],
+ "MBfjUk": [
+ [
+ "0",
+ "plural",
+ { "one": ["#", " منسلکہ اپ لوڈ ہو رہا ہے"], "other": ["#", " منسلکات اپ لوڈ ہو رہے ہیں"] }
+ ]
+ ],
"MCjC9A": [["deleteDescriptorLabel"], " حذف کریں"],
"MDBJwN": ["استعمال میں مشکل"],
"MDZSJe": ["ایجنٹ اپنا طے شدہ کام کب چلاتا ہے۔"],
@@ -2381,6 +2405,7 @@
],
"ScwcF2": ["اس مقام پر پہلے سے ایک پروجیکٹ موجود ہے۔ کوئی مختلف والد فولڈر منتخب کریں۔"],
"Sg-6Bo": [["errorCount", "plural", { "one": ["#", " خرابی"], "other": ["#", " خرابیاں"] }]],
+ "SgAFuo": ["یہاں فائلیں منسلک نہیں کی جا سکتیں۔"],
"SgKLfA": ["GitHub سے منسلک نہیں۔"],
"Sh3Qkg": ["کوئی مماثل برانچ نہیں۔"],
"Si7mIR": ["رپورٹ بنائیں"],
@@ -3209,6 +3234,10 @@
"جب تک آپ سائن آؤٹ ہیں، اس ترتیب سے قطع نظر اپ ڈیٹس زیادہ سے زیادہ ہر 3 منٹ بعد دیکھی جاتی ہیں۔"
],
"cIptmH": ["Claude Desktop App میں"],
+ "cK5W4m": [
+ ["0"],
+ " ایک لنک کے ذریعے کھلتا ہے اور منسلکات قبول نہیں کرتا — اس کے بجائے ایپ کے اندر کا ایجنٹ منتخب کریں۔"
+ ],
"cLP0Lf": ["ریموٹ مہارت کا ماخذ"],
"cLn264": ["یہ تھیم فائل پڑھی نہیں جا سکی"],
"cMMb6H": [["imported"], " نصب ہو گئیں، مگر ", ["failed"], " ناکام رہیں: ", ["failedNames"]],
@@ -3289,6 +3318,16 @@
"d6qW27": [["agentName"], " نے اطلاع دی: ", ["headline"]],
"dCforW": ["یہ فائل لکھنے میں ناکامی ہوئی۔ وجہ جاننے کے لیے OpenKnowledge لاگ دیکھیں۔"],
"dD7NPy": ["خاکہ"],
+ "dDBZ0j": [
+ [
+ "0",
+ "plural",
+ {
+ "one": ["#", " منسلکہ بھیجنے کے لیے تیار ہے"],
+ "other": ["#", " منسلکات بھیجنے کے لیے تیار ہیں"]
+ }
+ ]
+ ],
"dDpCOp": ["نام بدل گیا مگر سائیڈ بار پرانا ہو سکتا ہے — دوبارہ مطابقت کے لیے تازہ کریں"],
"dEgA5A": ["منسوخ کریں"],
"dFrqBg": [["0"], " پلگ ان"],
@@ -3307,6 +3346,26 @@
"dOHMA0": ["منتقل نہیں ہو سکا"],
"dOxPd4": ["فٹ نوٹ"],
"dQHSCs": ["تبدیل کریں (اصل حذف کریں)"],
+ "dRCAgQ": [
+ [
+ "tooLargeTotalCount",
+ "plural",
+ {
+ "one": [
+ "#",
+ " فائل چھوڑی گئی — فی پیغام منسلکات کا مجموعہ ",
+ ["budgetKb"],
+ " KB سے زیادہ نہیں ہو سکتا۔"
+ ],
+ "other": [
+ "#",
+ " فائلیں چھوڑی گئیں — فی پیغام منسلکات کا مجموعہ ",
+ ["budgetKb"],
+ " KB سے زیادہ نہیں ہو سکتا۔"
+ ]
+ }
+ ]
+ ],
"dSORvE": ["موجودہ عمل روک کر اس کے بجائے یہ بھیجتا ہے"],
"dT-HIQ": ["اس صفحے پر بہت زیادہ لائیو حوالے ہیں۔ یہ بورڈ لوڈ نہیں کیا گیا۔"],
"dTaauv": ["وجہ: ", ["reason"]],
@@ -4479,6 +4538,10 @@
"q63KUv": ["MCP اور اسکل شامل کریں"],
"q7F5am": ["عنوان"],
"q8aCbb": ["«", ["0"], "» کے دو ورژن — ماخذ بمقابلہ ", ["editor"]],
+ "q8tKSU": [
+ ["name"],
+ " کا کوئی قابلِ حل راستہ نہیں — ایجنٹ صرف ورک اسپیس کے اندر کی فائلیں پڑھ سکتا ہے۔"
+ ],
"qAQVSD": ["صفحے کے عنوانات کا جواب JSON نہیں تھا"],
"qAhFeg": [
["userName"],
@@ -4508,6 +4571,9 @@
"qTT48-": [
"وکی لنکس جیسے [[Page]] — یہاں لنک کرنے کا ایک معاون طریقہ ہے، لیکن ایک بیرونی ریڈر کچھ بھی حل نہیں کرتا اور بریکٹ دکھاتا ہے۔"
],
+ "qTULIf": [
+ "یہ ایجنٹ منسلکات قبول نہیں کرتا — انہیں ہٹائیں یا ایپ کے اندر کا ایجنٹ منتخب کریں۔"
+ ],
"qTcVwj": ["اس پروجیکٹ کے لیے مہارت براؤز کریں یا اپ لوڈ کریں۔"],
"qTcZZu": ["ٹیگز لوڈ نہیں ہو سکے۔ دوبارہ کوشش کے لیے <0>Esc</0> دبائیں اور دوبارہ کھولیں۔"],
"qX-ABr": ["یا اس کے بجائے براؤزر سے سائن اِن کرنے کے لیے:"],
@@ -4567,6 +4633,7 @@
],
"rJVoVX": ["سورس کے تلاش نتائج"],
"rJm8-2": ["کلپ بورڈ تک رسائی نہیں ہو سکی — تھیم نیچے موجود خانے میں ہے۔"],
+ "rNi1kZ": ["فولڈرز اور خالی فائلیں منسلک نہیں کی جا سکتیں — خود فائلیں چھوڑیں۔"],
"rNifQd": ["خصوصیت ہٹائیں"],
"rQAQus": ["ٹیمپلیٹ محفوظ نہیں ہو سکا: ", ["error"]],
"rQRrkB": ["کل"],
@@ -4943,6 +5010,9 @@
"vPLUCm": ["غائب تصویر ", ["identity"], "۔ حوالہ پر جائیں۔"],
"vPXOUw": ["سورس کا منظر بدلیں"],
"vQIVHc": ["فولڈر کی خصوصیات"],
+ "vQOuVY": [
+ "نوٹ ونڈوز میں منسلکات ابھی دستیاب نہیں — فائلیں منسلک کرنے کے لیے مرکزی ونڈو استعمال کریں۔"
+ ],
"vUP_HF": [
"منسلک AI ٹول کے بغیر پیک کی ",
["packSkillCount", "plural", { "one": ["#", " مہارت"], "other": ["#", " مہارتیں"] }],
diff --git a/packages/app/src/locales/ur/messages.po b/packages/app/src/locales/ur/messages.po
index 1163724ef..944f6eef0 100644
--- a/packages/app/src/locales/ur/messages.po
+++ b/packages/app/src/locales/ur/messages.po
@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid " · references only (no embedded contents)"
msgstr " · صرف حوالہ جات (کوئی ایمبیڈڈ مواد نہیں)"
@@ -146,6 +146,12 @@ msgstr "(کچھ پہلے ہی دوسرے قواعد سے چھپے ہو سکتے
msgid "(symlink)"
msgstr "(سِم لنک)"
+#. placeholder {0}: pendingAttachments.length
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+msgstr "{0, plural, one {# منسلکہ بھیجنے کے لیے تیار ہے} other {# منسلکات بھیجنے کے لیے تیار ہیں}}"
+
#. placeholder {0}: preview.backlinkCount
#: src/editor/link-preview/InternalDocPreviewCard.tsx
msgid "{0, plural, one {# backlink} other {# backlinks}}"
@@ -260,6 +266,13 @@ msgstr "{0, plural, one {پلگ اِن} other {پلگ اِنز}}"
msgid "{0, plural, one {Skill} other {Skills}}"
msgstr "{0, plural, one {مہارت} other {مہارتیں}}"
+#. placeholder {0}: pendingUploads.length
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+msgstr "{0, plural, one {# منسلکہ اپ لوڈ ہو رہا ہے} other {# منسلکات اپ لوڈ ہو رہے ہیں}}"
+
#. placeholder {0}: sibling.name
#: src/lib/acp/config-value-hints.ts
msgid "{0} · default"
@@ -353,6 +366,12 @@ msgstr "{1} میں سے {0} پروجیکٹ منتخب"
msgid "{0} of {1} selected"
msgstr "{1} میں سے {0} منتخب"
+#. placeholder {0}: resolvedTarget.displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} ایک لنک کے ذریعے کھلتا ہے اور منسلکات قبول نہیں کرتا — اس کے بجائے ایپ کے اندر کا ایجنٹ منتخب کریں۔"
+
#. placeholder {0}: siblings.length
#: src/components/SkillPluginBundleBanner.tsx
msgid "{0} other skills by this publisher"
@@ -381,6 +400,12 @@ msgstr "{0} کی خصوصیات"
msgid "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
msgstr "{0} یہ مہارت {poolRootRel} کے ذریعے پڑھتا ہے۔ {1} کو «{2}» ملنا روکنے کے لیے کلک کریں — {subRoot} اپنی دیگر مہارتیں رکھے گا مگر {poolRootRel} کی پیروی بند کر دے گا۔"
+#. placeholder {0}: TERMINAL_CLIS[selection.cli].displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} ٹرمینل میں چلتا ہے اور منسلکات قبول نہیں کرتا — اس کے بجائے ایپ کے اندر کا ایجنٹ منتخب کریں۔"
+
#. placeholder {0}: formatToolList( [f.host, ...following.map((o) => o.host)].map(hostLabel), i18n.locale, )
#: src/components/settings/SkillTargetsPicker.tsx
msgid "{0} share this folder."
@@ -510,6 +535,7 @@ msgid "{agentName} couldn't start."
msgstr "{agentName} شروع نہ ہو سکا۔"
#: src/components/acp/ThreadView.tsx
+#: src/lib/acp/launch-agent-thread.ts
msgid "{agentName} doesn't accept image attachments."
msgstr "{agentName} تصویری منسلکات قبول نہیں کرتا۔"
@@ -860,6 +886,14 @@ msgstr "{minutes} منٹ پہلے"
msgid "{name} CLI"
msgstr "{name} CLI"
+#: src/lib/acp/image-attachment.ts
+msgid "{name} has no resolvable path — the agent can only read files inside the workspace."
+msgstr "{name} کا کوئی قابلِ حل راستہ نہیں — ایجنٹ صرف ورک اسپیس کے اندر کی فائلیں پڑھ سکتا ہے۔"
+
+#: src/lib/acp/image-attachment.ts
+msgid "{name} is outside the workspace. Move it into your project first."
+msgstr "{name} ورک اسپیس سے باہر ہے۔ پہلے اسے اپنے پروجیکٹ میں منتقل کریں۔"
+
#: src/components/GraphPanel.tsx
msgid "{nodeCount, plural, one {# node} other {# nodes}}"
msgstr "{nodeCount, plural, one {# نوڈ} other {# نوڈز}}"
@@ -873,6 +907,7 @@ msgid "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
msgstr "{openedWorktreeCount, plural, one {ورک ٹری} other {ورک ٹریز}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
msgstr "{outsideWorkspaceCount, plural, one {ورک اسپیس سے باہر کی # فائل چھوڑی گئی۔} other {ورک اسپیس سے باہر کی # فائلیں چھوڑی گئیں۔}}"
@@ -975,6 +1010,7 @@ msgid "{skillCount, plural, one {skill} other {skills}}"
msgstr "{skillCount, plural, one {مہارت} other {مہارتیں}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
msgstr "{skipTotal, plural, one {# فائل چھوڑی گئی جو منسلک نہیں کی جا سکی۔} other {# فائلیں چھوڑی گئیں جو منسلک نہیں کی جا سکیں۔}}"
@@ -1019,6 +1055,11 @@ msgstr "{templateCount, plural, one {ٹیمپلیٹ} other {ٹیمپلیٹس}}"
msgid "{tokens, plural, one {token} other {tokens}}"
msgstr "{tokens, plural, one {ٹوکن} other {ٹوکنز}}"
+#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
+msgid "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+msgstr "{tooLargeTotalCount, plural, one {# فائل چھوڑی گئی — فی پیغام منسلکات کا مجموعہ {budgetKb} KB سے زیادہ نہیں ہو سکتا۔} other {# فائلیں چھوڑی گئیں — فی پیغام منسلکات کا مجموعہ {budgetKb} KB سے زیادہ نہیں ہو سکتا۔}}"
+
#: src/components/file-tree-problem-indicators.ts
msgid "{total, plural, one {# problem} other {# problems}}"
msgstr "{total, plural, one {# مسئلہ} other {# مسائل}}"
@@ -1028,6 +1069,7 @@ msgid "{truncatedShownCount, plural, one {Showing the first item in one folder
msgstr "{truncatedShownCount, plural, one {ایک فولڈر میں پہلا آئٹم دکھایا جا رہا ہے — اس فولڈر کا باقی حصہ چھپا ہوا ہے۔} other {ایک فولڈر میں پہلے {formattedCount} آئٹمز دکھائے جا رہے ہیں — اس فولڈر کا باقی حصہ چھپا ہوا ہے۔}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
msgstr "{unknownPathCount, plural, one {# فائل چھوڑی گئی — یہ براؤزر پاتھ کے ذریعے فائلیں منسلک نہیں کر سکتا۔} other {# فائلیں چھوڑی گئیں — یہ براؤزر پاتھ کے ذریعے فائلیں منسلک نہیں کر سکتا۔}}"
@@ -2072,7 +2114,7 @@ msgstr "اثاثوں کی تجاویز"
msgid "Asset: {title}"
msgstr "اثاثہ: {title}"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid "Attach a file"
msgstr "فائل منسلک کریں"
@@ -2085,6 +2127,10 @@ msgstr "تصاویر منسلک کریں"
msgid "Attachments"
msgstr "منسلکات"
+#: src/components/BottomComposer.tsx
+msgid "Attachments aren't available in note windows yet — use the main window to attach files."
+msgstr "نوٹ ونڈوز میں منسلکات ابھی دستیاب نہیں — فائلیں منسلک کرنے کے لیے مرکزی ونڈو استعمال کریں۔"
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Attachments must total under 3 MB."
@@ -4052,6 +4098,7 @@ msgid "Couldn't reach the Open Knowledge server to upload {fileName}."
msgstr "{fileName} اپ لوڈ کرنے کے لیے Open Knowledge سرور تک رسائی نہیں ہو سکی۔"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "Couldn't read {fileName}."
msgstr "{fileName} پڑھا نہیں جا سکا۔"
@@ -6042,6 +6089,10 @@ msgstr "فائل ڈراپ زون"
msgid "File duplicated"
msgstr "فائل کی نقل بن گئی"
+#: src/lib/acp/image-attachment.ts
+msgid "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+msgstr "فائل بہت بڑی ہے ({sizeKb} KB) — ہر منسلکہ کی حد {limitKb} KB ہے۔ اسے کراپ کریں یا سائز چھوٹا کر کے دوبارہ کوشش کریں۔"
+
#: src/components/NewItemDialog.tsx
msgid "File name"
msgstr "فائل کا نام"
@@ -6243,6 +6294,13 @@ msgstr "فولڈر شیئر لنک کاپی ہو گیا۔"
msgid "Folder target: {linkTitle}. Click to open the overview."
msgstr "فولڈر کا ہدف: {linkTitle}۔ جائزہ کھولنے کے لیے کلک کریں۔"
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "Folders and empty files can't be attached — drop the files themselves."
+msgstr "فولڈرز اور خالی فائلیں منسلک نہیں کی جا سکتیں — خود فائلیں چھوڑیں۔"
+
#: src/components/acp/ThreadView.tsx
msgid "Follow the agent's edits"
msgstr "ایجنٹ کی ترامیم کی پیروی کریں"
@@ -8632,6 +8690,11 @@ msgstr "ابھی کوئی ایجنٹ ترتیب نہیں دیا گیا — بھ
msgid "no agents — saved, not installed anywhere"
msgstr "کوئی ایجنٹ نہیں — محفوظ، کہیں نصب نہیں"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+msgstr "ابھی کوئی ایجنٹ ترتیب نہیں دیا گیا — فائلیں منسلک کرنے کے لیے «ایجنٹ کنکشنز» میں ایپ کے اندر کا ایجنٹ شامل کریں۔"
+
#: src/components/settings/AgentConnectionsSection.tsx
msgid "No agents available."
msgstr "کوئی ایجنٹ دستیاب نہیں۔"
@@ -9201,6 +9264,10 @@ msgstr "صرف میں"
msgid "Only modified"
msgstr "صرف ترمیم شدہ"
+#: src/lib/acp/image-attachment.ts
+msgid "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+msgstr "صرف PNG، JPEG، GIF اور WebP تصاویر معاون ہیں ({mimeType} موصول ہوا)۔"
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Only PNG, JPEG, or WebP images are allowed."
@@ -10869,7 +10936,7 @@ msgstr "ہٹائیں"
#. placeholder {0}: file.name
#. placeholder {0}: image.name
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/PendingImageStrip.tsx
#: src/components/ImageAttachments.tsx
msgid "Remove {0}"
msgstr "{0} ہٹائیں"
@@ -13773,6 +13840,11 @@ msgstr "یہ {targetNoun} برانچ <0>{shareBranch}</0> سے شیئر ہوا
msgid "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
msgstr "یہ {targetNoun} برانچ <0>{shareBranch}</0> سے شیئر ہوا تھا۔ آپ اس وقت <1>{currentLabel}</1> پر ہیں۔"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "This agent doesn't accept attachments — remove them or choose an in-app agent."
+msgstr "یہ ایجنٹ منسلکات قبول نہیں کرتا — انہیں ہٹائیں یا ایپ کے اندر کا ایجنٹ منتخب کریں۔"
+
#: src/editor/composer-mention/ComposerSlashMenu.tsx
msgid "This agent doesn't offer slash commands"
msgstr "یہ ایجنٹ سلیش کمانڈ پیش نہیں کرتا"
@@ -13828,6 +13900,12 @@ msgstr "یہ ترتیبات > AI ٹولز اور CLI میں مقرر کیا جا
msgid "This comment is on the whole property"
msgstr "یہ تبصرہ پوری خصوصیت پر ہے"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "This composer doesn't accept attachments."
+msgstr "یہاں فائلیں منسلک نہیں کی جا سکتیں۔"
+
#: src/components/DiffViewBoundary.tsx
msgid "This conflict is resolved."
msgstr "یہ تنازع حل ہو گیا ہے۔"
@@ -14654,6 +14732,10 @@ msgstr "ناقابلِ حل فائل {identity}۔ حوالہ پر جائیں۔"
msgid "Unresolvable image {identity}. Go to reference."
msgstr "ناقابلِ حل تصویر {identity}۔ حوالہ پر جائیں۔"
+#: src/lib/acp/image-attachment.ts
+msgid "Unsupported file type: {fileType}."
+msgstr "غیر معاون فائل کی قسم: {fileType}۔"
+
#: src/components/BugReportHistory.tsx
msgid "Untitled report"
msgstr "بلا عنوان رپورٹ"
@@ -14794,6 +14876,7 @@ msgstr "«{0}» کے نام سے اپ لوڈ ہوا — نام «{1}» پہلے
msgid "Uploading"
msgstr "اپ لوڈ کیا جا رہا ہے"
+#: src/components/acp/PendingImageStrip.tsx
#: src/editor/image-upload/index.ts
msgid "Uploading {fileName}"
msgstr "{fileName} اپ لوڈ ہو رہی ہے"
diff --git a/packages/app/src/locales/zh-Hans/messages.json b/packages/app/src/locales/zh-Hans/messages.json
index 80c0bd660..68780ab75 100644
--- a/packages/app/src/locales/zh-Hans/messages.json
+++ b/packages/app/src/locales/zh-Hans/messages.json
@@ -717,6 +717,7 @@
"9euN0m": [["count", "plural", { "other": ["另有 ", "#", " 位跨文档参与者"] }]],
"9fhQRL": ["Beta 通道"],
"9fvog2": ["无法预览:", ["errorDetail"]],
+ "9gu0n7": ["不支持的文件类型:", ["fileType"], "。"],
"9hEdtC": [
"这一个教你的 AI 工具如何使用 OpenKnowledge。它位于项目文件夹中,因此会为每个打开本项目的人安装。"
],
@@ -1148,6 +1149,7 @@
"FjkaiT": ["缩小"],
"Fjz6aJ": ["发送到新对话"],
"FqGWeR": ["无法连接到智能体注册表。"],
+ "FqMKq2": ["仅支持 PNG、JPEG、GIF 和 WebP 图像(收到 ", ["mimeType"], ")。"],
"FqTpiN": ["鸟类维基"],
"Fqr8BP": ["多页 PDF 查看器,带工具栏控件(缩略图、翻页、缩放)。"],
"Fqx38P": ["是什么妨碍了你?"],
@@ -1173,6 +1175,7 @@
"G7-rf8": ["模式语法错误:", ["message"]],
"G7bn_N": ["启动一个智能体"],
"G7cMuO": ["HTML 预览"],
+ "G7gMiG": [["0"], " 在终端中运行,不接受附件,请改选应用内智能体。"],
"G8t9NN": ["添加属性"],
"GA-UkN": [["keyName"], " 类型:", ["typeLabel"], "。点击可更改。"],
"GAohqx": ["删除列"],
@@ -1221,6 +1224,7 @@
"GemPfn": ["解析出链的错误响应失败(HTTP ", ["status"], ")"],
"Gfr4fu": ["服务器无法打开文档"],
"GhjUB_": ["已重新连接"],
+ "Gi8Akx": ["还没有配置任何智能体——要附加文件,请在「智能体连接」中添加应用内智能体。"],
"GidGkh": ["从来源更新"],
"GifIjR": [
"未安装技能“",
@@ -1424,6 +1428,7 @@
"OpenKnowledge 无法读取 .ok/local/config.yml 中的 terminal.shell,将改用可用的 Windows shell。"
],
"K9J00P": ["克隆失败——连接出错"],
+ "K9ViCA": [["name"], " 位于工作区之外。请先将它移入你的项目。"],
"KDrbNG": ["OpenKnowledge 查找了 ", ["subject"], " 的链接"],
"KDuPiY": ["正在上传 ", ["fileName"]],
"KDw4GX": ["重试"],
@@ -1451,6 +1456,13 @@
"KZLdgR": ["最新的规格见 <0>#design-docs</0>。"],
"K_vT1F": ["上游同步"],
"KaFCD3": ["在新标签页中打开这个链接并折叠关系图。"],
+ "Kb08WL": [
+ "文件过大(",
+ ["sizeKb"],
+ " KB)— 每个附件上限为 ",
+ ["limitKb"],
+ " KB。请裁剪或缩小后重试。"
+ ],
"Kbz9RK": ["固定端口号"],
"Kdvukk": ["此文件不适用 Markdown 检查。"],
"KeXgA-": ["找不到该段落 — 它所在的文本可能已更改。"],
@@ -1571,6 +1583,7 @@
"M92_0q": ["关闭评论"],
"M9597s": ["正在准备共享 URL…"],
"MBKkUy": ["skills.sh 不可用;改为显示 GitHub 结果(没有安装量排名)。"],
+ "MBfjUk": [["0", "plural", { "other": ["正在上传 ", "#", " 个附件"] }]],
"MCjC9A": ["删除 ", ["deleteDescriptorLabel"]],
"MDBJwN": ["不好用"],
"MDZSJe": ["智能体执行定时任务的时间。"],
@@ -2034,6 +2047,7 @@
"Sc1bKE": ["未能及时清除“", ["docName"], "”的本地协作数据。请重新加载后重试。"],
"ScwcF2": ["该位置已存在一个项目。请换一个上级文件夹。"],
"Sg-6Bo": [["errorCount", "plural", { "other": ["#", " 个错误"] }]],
+ "SgAFuo": ["此处无法添加附件。"],
"SgKLfA": ["未连接到 GitHub。"],
"Sh3Qkg": ["没有匹配的分支。"],
"Si7mIR": ["生成报告"],
@@ -2756,6 +2770,7 @@
"cHhH3i": ["一个必需的 git 工具"],
"cIFYZn": ["在你退出登录期间,无论此设置如何,更新最多每 3 分钟检查一次。"],
"cIptmH": ["在 Claude 桌面应用中"],
+ "cK5W4m": [["0"], " 通过链接打开,不接受附件,请改选应用内智能体。"],
"cLP0Lf": ["远程技能来源"],
"cLn264": ["无法读取此主题文件"],
"cMMb6H": ["已安装 ", ["imported"], " 个,但 ", ["failed"], " 个失败:", ["failedNames"]],
@@ -2827,6 +2842,7 @@
"d6qW27": [["agentName"], " 报告:", ["headline"]],
"dCforW": ["写入此文件失败。请查看 OpenKnowledge 日志了解原因。"],
"dD7NPy": ["大纲"],
+ "dDBZ0j": [["0", "plural", { "other": ["#", " 个附件已准备好发送"] }]],
"dDpCOp": ["重命名成功,但侧边栏可能不是最新的——请刷新以重新同步"],
"dEgA5A": ["取消"],
"dFrqBg": [["0"], " 插件"],
@@ -2845,6 +2861,15 @@
"dOHMA0": ["移动失败"],
"dOxPd4": ["脚注"],
"dQHSCs": ["转换(删除原文件)"],
+ "dRCAgQ": [
+ [
+ "tooLargeTotalCount",
+ "plural",
+ {
+ "other": ["已跳过 ", "#", " 个文件 — 每条消息的附件总计不能超过 ", ["budgetKb"], " KB。"]
+ }
+ ]
+ ],
"dSORvE": ["停止当前运行并改为发送此内容"],
"dT-HIQ": ["此页面的实时引用过多。此画板未加载。"],
"dTaauv": ["原因:", ["reason"]],
@@ -3862,6 +3887,7 @@
"q63KUv": ["添加 MCP 和技能"],
"q7F5am": ["标题"],
"q8aCbb": ["“", ["0"], "”有两个版本——来源与 ", ["editor"]],
+ "q8tKSU": [["name"], " 没有可解析的路径 — 智能体只能读取工作区内的文件。"],
"qAQVSD": ["页面标题响应不是 JSON"],
"qAhFeg": [["userName"], " · ", ["tabCount", "plural", { "other": ["#", " 个标签页"] }]],
"qAx7xG": ["内容根目录中的固定文件夹"],
@@ -3887,6 +3913,7 @@
"qTT48-": [
"像 [[Page]] 这样的 Wiki 链接 — 一种受支持的链接方式,但外部阅读器无法解析任何内容并显示括号。"
],
+ "qTULIf": ["该智能体不接受附件,请移除附件或改选应用内智能体。"],
"qTcVwj": ["为这个项目浏览或上传技能。"],
"qTcZZu": ["加载标签失败。按 <0>Esc</0> 后重新打开可重试。"],
"qX-ABr": ["或者改用浏览器登录:"],
@@ -3940,6 +3967,7 @@
"rIFV5h": [["0"], " 插件从其缓存提供这些技能 — OK 绝不会编辑或更新它们。"],
"rJVoVX": ["源码查找结果"],
"rJm8-2": ["无法访问剪贴板 — 主题内容已显示在下方框中。"],
+ "rNi1kZ": ["无法附加文件夹和空文件,请直接拖放文件本身。"],
"rNifQd": ["移除属性"],
"rQAQus": ["无法保存模板:", ["error"]],
"rQRrkB": ["昨天"],
@@ -4260,6 +4288,7 @@
"vPLUCm": ["图片 ", ["identity"], " 不存在。转到引用位置。"],
"vPXOUw": ["切换源码视图"],
"vQIVHc": ["文件夹属性"],
+ "vQOuVY": ["便签窗口暂不支持附件,请在主窗口中添加文件。"],
"vUP_HF": [
"没有已连接的 AI 工具,此入门包的 ",
["packSkillCount", "plural", { "one": ["#", " 项技能"], "other": ["#", " 项技能"] }],
diff --git a/packages/app/src/locales/zh-Hans/messages.po b/packages/app/src/locales/zh-Hans/messages.po
index c8d37e704..49baf6e83 100644
--- a/packages/app/src/locales/zh-Hans/messages.po
+++ b/packages/app/src/locales/zh-Hans/messages.po
@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid " · references only (no embedded contents)"
msgstr " · 仅引用(无嵌入内容)"
@@ -146,6 +146,12 @@ msgstr "(其中一些可能已被其他规则隐藏)"
msgid "(symlink)"
msgstr "(符号链接)"
+#. placeholder {0}: pendingAttachments.length
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+msgstr "{0, plural, other {# 个附件已准备好发送}}"
+
#. placeholder {0}: preview.backlinkCount
#: src/editor/link-preview/InternalDocPreviewCard.tsx
msgid "{0, plural, one {# backlink} other {# backlinks}}"
@@ -260,6 +266,13 @@ msgstr "{0, plural, other {插件}}"
msgid "{0, plural, one {Skill} other {Skills}}"
msgstr "{0, plural, other {技能}}"
+#. placeholder {0}: pendingUploads.length
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+msgstr "{0, plural, other {正在上传 # 个附件}}"
+
#. placeholder {0}: sibling.name
#: src/lib/acp/config-value-hints.ts
msgid "{0} · default"
@@ -353,6 +366,12 @@ msgstr "已选择 {1} 个项目中的 {0} 个"
msgid "{0} of {1} selected"
msgstr "已选择 {1} 项中的 {0} 项"
+#. placeholder {0}: resolvedTarget.displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} 通过链接打开,不接受附件,请改选应用内智能体。"
+
#. placeholder {0}: siblings.length
#: src/components/SkillPluginBundleBanner.tsx
msgid "{0} other skills by this publisher"
@@ -381,6 +400,12 @@ msgstr "{0} 属性"
msgid "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
msgstr "{0} 通过 {poolRootRel} 读取这个技能。点击可让 {1} 不再获取“{2}”——{subRoot} 保留其他技能,但不再跟随 {poolRootRel}。"
+#. placeholder {0}: TERMINAL_CLIS[selection.cli].displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} 在终端中运行,不接受附件,请改选应用内智能体。"
+
#. placeholder {0}: formatToolList( [f.host, ...following.map((o) => o.host)].map(hostLabel), i18n.locale, )
#: src/components/settings/SkillTargetsPicker.tsx
msgid "{0} share this folder."
@@ -510,6 +535,7 @@ msgid "{agentName} couldn't start."
msgstr "{agentName} 无法启动。"
#: src/components/acp/ThreadView.tsx
+#: src/lib/acp/launch-agent-thread.ts
msgid "{agentName} doesn't accept image attachments."
msgstr "{agentName} 不接受图像附件。"
@@ -860,6 +886,14 @@ msgstr "{minutes} 分钟前"
msgid "{name} CLI"
msgstr "{name} CLI"
+#: src/lib/acp/image-attachment.ts
+msgid "{name} has no resolvable path — the agent can only read files inside the workspace."
+msgstr "{name} 没有可解析的路径 — 智能体只能读取工作区内的文件。"
+
+#: src/lib/acp/image-attachment.ts
+msgid "{name} is outside the workspace. Move it into your project first."
+msgstr "{name} 位于工作区之外。请先将它移入你的项目。"
+
#: src/components/GraphPanel.tsx
msgid "{nodeCount, plural, one {# node} other {# nodes}}"
msgstr "{nodeCount, plural, other {# 个节点}}"
@@ -873,6 +907,7 @@ msgid "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
msgstr "{openedWorktreeCount, plural, other {worktree}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
msgstr "{outsideWorkspaceCount, plural, other {已跳过 # 个工作区外的文件。}}"
@@ -975,6 +1010,7 @@ msgid "{skillCount, plural, one {skill} other {skills}}"
msgstr "{skillCount, plural, other {技能}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
msgstr "{skipTotal, plural, other {已跳过 # 个无法附加的文件。}}"
@@ -1019,6 +1055,11 @@ msgstr "{templateCount, plural, other {模板}}"
msgid "{tokens, plural, one {token} other {tokens}}"
msgstr "{tokens, plural, other {token}}"
+#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
+msgid "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+msgstr "{tooLargeTotalCount, plural, other {已跳过 # 个文件 — 每条消息的附件总计不能超过 {budgetKb} KB。}}"
+
#: src/components/file-tree-problem-indicators.ts
msgid "{total, plural, one {# problem} other {# problems}}"
msgstr "{total, plural, other {# 个问题}}"
@@ -1028,6 +1069,7 @@ msgid "{truncatedShownCount, plural, one {Showing the first item in one folder
msgstr "{truncatedShownCount, plural, other {只显示某个文件夹里的前 {formattedCount} 个项目——该文件夹的其余内容已隐藏。}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
msgstr "{unknownPathCount, plural, other {已跳过 # 个文件 — 此浏览器无法按路径附加文件。}}"
@@ -2072,7 +2114,7 @@ msgstr "资源建议"
msgid "Asset: {title}"
msgstr "资源:{title}"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid "Attach a file"
msgstr "附加文件"
@@ -2085,6 +2127,10 @@ msgstr "附加图片"
msgid "Attachments"
msgstr "附件"
+#: src/components/BottomComposer.tsx
+msgid "Attachments aren't available in note windows yet — use the main window to attach files."
+msgstr "便签窗口暂不支持附件,请在主窗口中添加文件。"
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Attachments must total under 3 MB."
@@ -4052,6 +4098,7 @@ msgid "Couldn't reach the Open Knowledge server to upload {fileName}."
msgstr "无法连接到 Open Knowledge 服务器以上传 {fileName}。"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "Couldn't read {fileName}."
msgstr "无法读取 {fileName}。"
@@ -6042,6 +6089,10 @@ msgstr "文件拖放区"
msgid "File duplicated"
msgstr "已创建文件副本"
+#: src/lib/acp/image-attachment.ts
+msgid "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+msgstr "文件过大({sizeKb} KB)— 每个附件上限为 {limitKb} KB。请裁剪或缩小后重试。"
+
#: src/components/NewItemDialog.tsx
msgid "File name"
msgstr "文件名"
@@ -6243,6 +6294,13 @@ msgstr "已复制文件夹共享链接。"
msgid "Folder target: {linkTitle}. Click to open the overview."
msgstr "目标文件夹:{linkTitle}。点击可打开总览。"
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "Folders and empty files can't be attached — drop the files themselves."
+msgstr "无法附加文件夹和空文件,请直接拖放文件本身。"
+
#: src/components/acp/ThreadView.tsx
msgid "Follow the agent's edits"
msgstr "跟随智能体的编辑"
@@ -8632,6 +8690,11 @@ msgstr "还没有配置任何智能体——请从发送菜单中选一个。"
msgid "no agents — saved, not installed anywhere"
msgstr "未选择智能体 — 仅保存,不安装到任何位置"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+msgstr "还没有配置任何智能体——要附加文件,请在「智能体连接」中添加应用内智能体。"
+
#: src/components/settings/AgentConnectionsSection.tsx
msgid "No agents available."
msgstr "没有可用的智能体。"
@@ -9201,6 +9264,10 @@ msgstr "仅自己"
msgid "Only modified"
msgstr "仅显示已修改的"
+#: src/lib/acp/image-attachment.ts
+msgid "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+msgstr "仅支持 PNG、JPEG、GIF 和 WebP 图像(收到 {mimeType})。"
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Only PNG, JPEG, or WebP images are allowed."
@@ -10869,7 +10936,7 @@ msgstr "移除"
#. placeholder {0}: file.name
#. placeholder {0}: image.name
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/PendingImageStrip.tsx
#: src/components/ImageAttachments.tsx
msgid "Remove {0}"
msgstr "移除 {0}"
@@ -13773,6 +13840,11 @@ msgstr "这个{targetNoun}是从 <0>{shareBranch}</0> 分支共享的。它在
msgid "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
msgstr "这个{targetNoun}是从 <0>{shareBranch}</0> 分支共享的。你当前在 <1>{currentLabel}</1> 上。"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "This agent doesn't accept attachments — remove them or choose an in-app agent."
+msgstr "该智能体不接受附件,请移除附件或改选应用内智能体。"
+
#: src/editor/composer-mention/ComposerSlashMenu.tsx
msgid "This agent doesn't offer slash commands"
msgstr "此智能体不提供斜杠命令"
@@ -13828,6 +13900,12 @@ msgstr "这可以在「设置 > AI 工具与 CLI」中配置"
msgid "This comment is on the whole property"
msgstr "这条评论针对的是整个属性"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "This composer doesn't accept attachments."
+msgstr "此处无法添加附件。"
+
#: src/components/DiffViewBoundary.tsx
msgid "This conflict is resolved."
msgstr "此冲突已解决。"
@@ -14654,6 +14732,10 @@ msgstr "无法解析文件 {identity}。转到引用位置。"
msgid "Unresolvable image {identity}. Go to reference."
msgstr "无法解析图片 {identity}。转到引用位置。"
+#: src/lib/acp/image-attachment.ts
+msgid "Unsupported file type: {fileType}."
+msgstr "不支持的文件类型:{fileType}。"
+
#: src/components/BugReportHistory.tsx
msgid "Untitled report"
msgstr "未命名报告"
@@ -14794,6 +14876,7 @@ msgstr "已作为“{0}”上传——名称“{1}”已被占用。"
msgid "Uploading"
msgstr "正在上传"
+#: src/components/acp/PendingImageStrip.tsx
#: src/editor/image-upload/index.ts
msgid "Uploading {fileName}"
msgstr "正在上传 {fileName}"
diff --git a/packages/app/src/locales/zh-Hant/messages.json b/packages/app/src/locales/zh-Hant/messages.json
index 84b058f42..4a53baf90 100644
--- a/packages/app/src/locales/zh-Hant/messages.json
+++ b/packages/app/src/locales/zh-Hant/messages.json
@@ -719,6 +719,7 @@
"9euN0m": [["count", "plural", { "other": ["另有 ", "#", " 位跨文件參與者"] }]],
"9fhQRL": ["Beta 通道"],
"9fvog2": ["無法預覽:", ["errorDetail"]],
+ "9gu0n7": ["不支援的檔案類型:", ["fileType"], "。"],
"9hEdtC": [
"這一個教你的 AI 工具如何使用 OpenKnowledge。它位於專案資料夾中,因此會為每個開啟這個專案的人安裝。"
],
@@ -1154,6 +1155,7 @@
"FjkaiT": ["縮小"],
"Fjz6aJ": ["傳送到新對話"],
"FqGWeR": ["無法連上代理登錄檔。"],
+ "FqMKq2": ["僅支援 PNG、JPEG、GIF 和 WebP 圖片(收到 ", ["mimeType"], ")。"],
"FqTpiN": ["鳥類維基"],
"Fqr8BP": ["多頁 PDF 檢視器,附工具列控制項(縮圖、翻頁、縮放)。"],
"Fqx38P": ["是什麼卡住了你?"],
@@ -1179,6 +1181,7 @@
"G7-rf8": ["模式語法錯誤:", ["message"]],
"G7bn_N": ["啟動一個代理"],
"G7cMuO": ["HTML 預覽"],
+ "G7gMiG": [["0"], " 在終端機中執行,不接受附件,請改選應用程式內的智慧代理。"],
"G8t9NN": ["新增屬性"],
"GA-UkN": [["keyName"], " 類型:", ["typeLabel"], "。點一下可變更。"],
"GAohqx": ["刪除欄"],
@@ -1227,6 +1230,7 @@
"GemPfn": ["解析外連連結的錯誤回應失敗(HTTP ", ["status"], ")"],
"Gfr4fu": ["伺服器無法開啟文件"],
"GhjUB_": ["已重新連線"],
+ "Gi8Akx": ["還沒有設定任何代理——要附加檔案,請在「智慧代理連線」中新增應用程式內的智慧代理。"],
"GidGkh": ["從來源更新"],
"GifIjR": [
"未安裝技能「",
@@ -1434,6 +1438,7 @@
"OpenKnowledge 無法讀取 .ok/local/config.yml 中的 terminal.shell,將改用可用的 Windows shell。"
],
"K9J00P": ["複製失敗——連線出錯"],
+ "K9ViCA": [["name"], " 位於工作區之外。請先將它移入你的專案。"],
"KDrbNG": ["OpenKnowledge 查詢了 ", ["subject"], " 的連結"],
"KDuPiY": ["正在上傳 ", ["fileName"]],
"KDw4GX": ["再試一次"],
@@ -1461,6 +1466,13 @@
"KZLdgR": ["最新的規格見 <0>#design-docs</0>。"],
"K_vT1F": ["上游同步"],
"KaFCD3": ["在新分頁中開啟這個連結並摺疊關係圖。"],
+ "Kb08WL": [
+ "檔案過大(",
+ ["sizeKb"],
+ " KB)— 每個附件上限為 ",
+ ["limitKb"],
+ " KB。請裁切或縮小後再試一次。"
+ ],
"Kbz9RK": ["固定連接埠號碼"],
"Kdvukk": ["此檔案不適用 Markdown 檢查。"],
"KeXgA-": ["找不到該段落 — 它所在的文字可能已變更。"],
@@ -1591,6 +1603,7 @@
"M92_0q": ["關閉註解"],
"M9597s": ["正在準備分享 URL…"],
"MBKkUy": ["skills.sh 無法使用;改為顯示 GitHub 結果(沒有安裝次數排名)。"],
+ "MBfjUk": [["0", "plural", { "other": ["正在上傳 ", "#", " 個附件"] }]],
"MCjC9A": ["刪除 ", ["deleteDescriptorLabel"]],
"MDBJwN": ["不好用"],
"MDZSJe": ["代理執行排程工作的時間。"],
@@ -2056,6 +2069,7 @@
"Sc1bKE": ["來不及清除「", ["docName"], "」的本機協作資料。請重新載入後再試一次。"],
"ScwcF2": ["這個位置已經有一個專案了。請換一個上層資料夾。"],
"Sg-6Bo": [["errorCount", "plural", { "other": ["#", " 個錯誤"] }]],
+ "SgAFuo": ["此處無法附加檔案。"],
"SgKLfA": ["尚未連接到 GitHub。"],
"Sh3Qkg": ["沒有相符的分支。"],
"Si7mIR": ["建立回報"],
@@ -2780,6 +2794,7 @@
"cHhH3i": ["一個必要的 git 工具"],
"cIFYZn": ["在你登出期間,無論此設定為何,更新最多每 3 分鐘檢查一次。"],
"cIptmH": ["在 Claude Desktop App 中"],
+ "cK5W4m": [["0"], " 透過連結開啟,不接受附件,請改選應用程式內的智慧代理。"],
"cLP0Lf": ["遠端技能來源"],
"cLn264": ["無法讀取這個主題檔案"],
"cMMb6H": ["已安裝 ", ["imported"], " 個,但 ", ["failed"], " 個失敗:", ["failedNames"]],
@@ -2851,6 +2866,7 @@
"d6qW27": [["agentName"], " 回報:", ["headline"]],
"dCforW": ["寫入此檔案失敗。請查看 OpenKnowledge 記錄檔以了解原因。"],
"dD7NPy": ["大綱"],
+ "dDBZ0j": [["0", "plural", { "other": ["#", " 個附件已準備好傳送"] }]],
"dDpCOp": ["重新命名成功,但側邊欄可能不是最新的——請重新整理以重新同步"],
"dEgA5A": ["取消"],
"dFrqBg": [["0"], " 外掛"],
@@ -2869,6 +2885,15 @@
"dOHMA0": ["移動失敗"],
"dOxPd4": ["註腳"],
"dQHSCs": ["轉換(刪除原始檔案)"],
+ "dRCAgQ": [
+ [
+ "tooLargeTotalCount",
+ "plural",
+ {
+ "other": ["已跳過 ", "#", " 個檔案 — 每則訊息的附件總計不能超過 ", ["budgetKb"], " KB。"]
+ }
+ ]
+ ],
"dSORvE": ["停止目前執行並改為傳送此內容"],
"dT-HIQ": ["此頁面的即時引用過多。此畫板未載入。"],
"dTaauv": ["原因:", ["reason"]],
@@ -3892,6 +3917,7 @@
"q63KUv": ["新增 MCP 和技能"],
"q7F5am": ["標題"],
"q8aCbb": ["「", ["0"], "」有兩個版本——來源與 ", ["editor"]],
+ "q8tKSU": [["name"], " 沒有可解析的路徑 — 智慧代理只能讀取工作區內的檔案。"],
"qAQVSD": ["頁面標題回應不是 JSON"],
"qAhFeg": [["userName"], " · ", ["tabCount", "plural", { "other": ["#", " 個分頁"] }]],
"qAx7xG": ["內容根目錄中的固定資料夾"],
@@ -3917,6 +3943,7 @@
"qTT48-": [
"像 [[Page]] 這樣的 Wiki 連結 — 一種受支援的連結方式,但外部閱讀器無法解析任何內容並顯示括號。"
],
+ "qTULIf": ["此智慧代理不接受附件,請移除附件或改選應用程式內的智慧代理。"],
"qTcVwj": ["為這個專案瀏覽或上傳技能。"],
"qTcZZu": ["載入標籤失敗。按 <0>Esc</0> 後重新開啟可再試一次。"],
"qX-ABr": ["或者改用瀏覽器登入:"],
@@ -3970,6 +3997,7 @@
"rIFV5h": [["0"], " 外掛從其快取提供這些技能 — OK 絕不會編輯或更新它們。"],
"rJVoVX": ["原始碼尋找結果"],
"rJm8-2": ["無法存取剪貼簿 — 主題內容已顯示在下方方塊中。"],
+ "rNi1kZ": ["無法附加資料夾和空檔案,請直接拖放檔案本身。"],
"rNifQd": ["移除屬性"],
"rQAQus": ["無法儲存範本:", ["error"]],
"rQRrkB": ["昨天"],
@@ -4292,6 +4320,7 @@
"vPLUCm": ["圖片 ", ["identity"], " 不存在。前往引用位置。"],
"vPXOUw": ["切換原始碼檢視"],
"vQIVHc": ["資料夾屬性"],
+ "vQOuVY": ["筆記視窗尚不支援附件,請在主視窗中附加檔案。"],
"vUP_HF": [
"沒有已連接的 AI 工具,此入門套件的 ",
["packSkillCount", "plural", { "one": ["#", " 項技能"], "other": ["#", " 項技能"] }],
diff --git a/packages/app/src/locales/zh-Hant/messages.po b/packages/app/src/locales/zh-Hant/messages.po
index b7a825258..e41f4bb21 100644
--- a/packages/app/src/locales/zh-Hant/messages.po
+++ b/packages/app/src/locales/zh-Hant/messages.po
@@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid " · references only (no embedded contents)"
msgstr " · 僅引用(無嵌入內容)"
@@ -146,6 +146,12 @@ msgstr "(其中有些可能已被其他規則隱藏)"
msgid "(symlink)"
msgstr "(符號連結)"
+#. placeholder {0}: pendingAttachments.length
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {# attachment is ready to send} other {# attachments are ready to send}}"
+msgstr "{0, plural, other {# 個附件已準備好傳送}}"
+
#. placeholder {0}: preview.backlinkCount
#: src/editor/link-preview/InternalDocPreviewCard.tsx
msgid "{0, plural, one {# backlink} other {# backlinks}}"
@@ -260,6 +266,13 @@ msgstr "{0, plural, other {外掛程式}}"
msgid "{0, plural, one {Skill} other {Skills}}"
msgstr "{0, plural, other {技能}}"
+#. placeholder {0}: pendingUploads.length
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0, plural, one {Uploading # attachment} other {Uploading # attachments}}"
+msgstr "{0, plural, other {正在上傳 # 個附件}}"
+
#. placeholder {0}: sibling.name
#: src/lib/acp/config-value-hints.ts
msgid "{0} · default"
@@ -353,6 +366,12 @@ msgstr "已選取 {1} 個專案中的 {0} 個"
msgid "{0} of {1} selected"
msgstr "已選取 {1} 項中的 {0} 項"
+#. placeholder {0}: resolvedTarget.displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} opens via a link and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} 透過連結開啟,不接受附件,請改選應用程式內的智慧代理。"
+
#. placeholder {0}: siblings.length
#: src/components/SkillPluginBundleBanner.tsx
msgid "{0} other skills by this publisher"
@@ -381,6 +400,12 @@ msgstr "{0} 屬性"
msgid "{0} reads this skill via {poolRootRel}. Click to stop {1} getting \"{2}\" — {subRoot} keeps its other skills but stops following {poolRootRel}."
msgstr "{0} 透過 {poolRootRel} 讀取這個技能。點一下可讓 {1} 不再取得「{2}」——{subRoot} 保留其他技能,但不再跟隨 {poolRootRel}。"
+#. placeholder {0}: TERMINAL_CLIS[selection.cli].displayName
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "{0} runs in a terminal and doesn't accept attachments — choose an in-app agent instead."
+msgstr "{0} 在終端機中執行,不接受附件,請改選應用程式內的智慧代理。"
+
#. placeholder {0}: formatToolList( [f.host, ...following.map((o) => o.host)].map(hostLabel), i18n.locale, )
#: src/components/settings/SkillTargetsPicker.tsx
msgid "{0} share this folder."
@@ -510,6 +535,7 @@ msgid "{agentName} couldn't start."
msgstr "{agentName} 無法啟動。"
#: src/components/acp/ThreadView.tsx
+#: src/lib/acp/launch-agent-thread.ts
msgid "{agentName} doesn't accept image attachments."
msgstr "{agentName} 不接受圖片附件。"
@@ -860,6 +886,14 @@ msgstr "{minutes} 分鐘前"
msgid "{name} CLI"
msgstr "{name} CLI"
+#: src/lib/acp/image-attachment.ts
+msgid "{name} has no resolvable path — the agent can only read files inside the workspace."
+msgstr "{name} 沒有可解析的路徑 — 智慧代理只能讀取工作區內的檔案。"
+
+#: src/lib/acp/image-attachment.ts
+msgid "{name} is outside the workspace. Move it into your project first."
+msgstr "{name} 位於工作區之外。請先將它移入你的專案。"
+
#: src/components/GraphPanel.tsx
msgid "{nodeCount, plural, one {# node} other {# nodes}}"
msgstr "{nodeCount, plural, other {# 個節點}}"
@@ -873,6 +907,7 @@ msgid "{openedWorktreeCount, plural, one {worktree} other {worktrees}}"
msgstr "{openedWorktreeCount, plural, other {worktree}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{outsideWorkspaceCount, plural, one {Skipped # file outside the workspace.} other {Skipped # files outside the workspace.}}"
msgstr "{outsideWorkspaceCount, plural, other {已跳過 # 個工作區外的檔案。}}"
@@ -975,6 +1010,7 @@ msgid "{skillCount, plural, one {skill} other {skills}}"
msgstr "{skillCount, plural, other {技能}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{skipTotal, plural, one {Skipped # file that couldn't be attached.} other {Skipped # files that couldn't be attached.}}"
msgstr "{skipTotal, plural, other {已跳過 # 個無法附加的檔案。}}"
@@ -1019,6 +1055,11 @@ msgstr "{templateCount, plural, other {範本}}"
msgid "{tokens, plural, one {token} other {tokens}}"
msgstr "{tokens, plural, other {token}}"
+#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
+msgid "{tooLargeTotalCount, plural, one {Skipped # file — attachments can't total more than {budgetKb} KB per message.} other {Skipped # files — attachments can't total more than {budgetKb} KB per message.}}"
+msgstr "{tooLargeTotalCount, plural, other {已跳過 # 個檔案 — 每則訊息的附件總計不能超過 {budgetKb} KB。}}"
+
#: src/components/file-tree-problem-indicators.ts
msgid "{total, plural, one {# problem} other {# problems}}"
msgstr "{total, plural, other {# 個問題}}"
@@ -1028,6 +1069,7 @@ msgid "{truncatedShownCount, plural, one {Showing the first item in one folder
msgstr "{truncatedShownCount, plural, other {只顯示某個資料夾裡的前 {formattedCount} 個項目——該資料夾的其餘內容已隱藏。}}"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "{unknownPathCount, plural, one {Skipped # file — this browser can't attach files by path.} other {Skipped # files — this browser can't attach files by path.}}"
msgstr "{unknownPathCount, plural, other {已跳過 # 個檔案 — 此瀏覽器無法依路徑附加檔案。}}"
@@ -2072,7 +2114,7 @@ msgstr "資源建議"
msgid "Asset: {title}"
msgstr "資產:{title}"
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/AttachFilesButton.tsx
msgid "Attach a file"
msgstr "附加檔案"
@@ -2085,6 +2127,10 @@ msgstr "附加圖片"
msgid "Attachments"
msgstr "附件"
+#: src/components/BottomComposer.tsx
+msgid "Attachments aren't available in note windows yet — use the main window to attach files."
+msgstr "筆記視窗尚不支援附件,請在主視窗中附加檔案。"
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Attachments must total under 3 MB."
@@ -4052,6 +4098,7 @@ msgid "Couldn't reach the Open Knowledge server to upload {fileName}."
msgstr "無法連上 Open Knowledge 伺服器來上傳 {fileName}。"
#: src/components/acp/ThreadView.tsx
+#: src/editor/use-composer-attachments.ts
msgid "Couldn't read {fileName}."
msgstr "無法讀取 {fileName}。"
@@ -6042,6 +6089,10 @@ msgstr "檔案拖放區"
msgid "File duplicated"
msgstr "已建立檔案副本"
+#: src/lib/acp/image-attachment.ts
+msgid "File is too large ({sizeKb} KB) — each attachment is capped at {limitKb} KB. Crop or resize it and try again."
+msgstr "檔案過大({sizeKb} KB)— 每個附件上限為 {limitKb} KB。請裁切或縮小後再試一次。"
+
#: src/components/NewItemDialog.tsx
msgid "File name"
msgstr "檔案名稱"
@@ -6243,6 +6294,13 @@ msgstr "已複製資料夾分享連結。"
msgid "Folder target: {linkTitle}. Click to open the overview."
msgstr "目標資料夾:{linkTitle}。點一下可開啟總覽。"
+#: src/components/acp/ThreadView.tsx
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "Folders and empty files can't be attached — drop the files themselves."
+msgstr "無法附加資料夾和空檔案,請直接拖放檔案本身。"
+
#: src/components/acp/ThreadView.tsx
msgid "Follow the agent's edits"
msgstr "跟著代理的編輯走"
@@ -8632,6 +8690,11 @@ msgstr "還沒有設定任何代理——請從傳送選單中挑一個。"
msgid "no agents — saved, not installed anywhere"
msgstr "未選擇代理 — 僅保存,不安裝到任何位置"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "No agents are set up yet — add an in-app agent in Agent connections to attach files."
+msgstr "還沒有設定任何代理——要附加檔案,請在「智慧代理連線」中新增應用程式內的智慧代理。"
+
#: src/components/settings/AgentConnectionsSection.tsx
msgid "No agents available."
msgstr "沒有可用的代理。"
@@ -9201,6 +9264,10 @@ msgstr "僅自己"
msgid "Only modified"
msgstr "只顯示已修改的"
+#: src/lib/acp/image-attachment.ts
+msgid "Only PNG, JPEG, GIF, and WebP images are supported (got {mimeType})."
+msgstr "僅支援 PNG、JPEG、GIF 和 WebP 圖片(收到 {mimeType})。"
+
#: src/components/FeedbackForm.tsx
#: src/components/ImageAttachments.tsx
msgid "Only PNG, JPEG, or WebP images are allowed."
@@ -10869,7 +10936,7 @@ msgstr "移除"
#. placeholder {0}: file.name
#. placeholder {0}: image.name
-#: src/components/acp/ThreadView.tsx
+#: src/components/acp/PendingImageStrip.tsx
#: src/components/ImageAttachments.tsx
msgid "Remove {0}"
msgstr "移除 {0}"
@@ -13773,6 +13840,11 @@ msgstr "這個{targetNoun}是從 <0>{shareBranch}</0> 分支分享的。它在
msgid "This {targetNoun} was shared from branch <0>{shareBranch}</0>. You're currently on <1>{currentLabel}</1>."
msgstr "這個{targetNoun}是從 <0>{shareBranch}</0> 分支分享的。你目前在 <1>{currentLabel}</1> 上。"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+msgid "This agent doesn't accept attachments — remove them or choose an in-app agent."
+msgstr "此智慧代理不接受附件,請移除附件或改選應用程式內的智慧代理。"
+
#: src/editor/composer-mention/ComposerSlashMenu.tsx
msgid "This agent doesn't offer slash commands"
msgstr "此智慧代理不提供斜線指令"
@@ -13828,6 +13900,12 @@ msgstr "這可以在「設定 > AI 工具與 CLI」中設定"
msgid "This comment is on the whole property"
msgstr "這則註解是針對整個屬性的"
+#: src/components/BottomComposer.tsx
+#: src/components/empty-state/CreatePromptComposer.tsx
+#: src/editor/ComposerMentionInput.tsx
+msgid "This composer doesn't accept attachments."
+msgstr "此處無法附加檔案。"
+
#: src/components/DiffViewBoundary.tsx
msgid "This conflict is resolved."
msgstr "此衝突已解決。"
@@ -14654,6 +14732,10 @@ msgstr "無法解析檔案 {identity}。前往引用位置。"
msgid "Unresolvable image {identity}. Go to reference."
msgstr "無法解析圖片 {identity}。前往引用位置。"
+#: src/lib/acp/image-attachment.ts
+msgid "Unsupported file type: {fileType}."
+msgstr "不支援的檔案類型:{fileType}。"
+
#: src/components/BugReportHistory.tsx
msgid "Untitled report"
msgstr "未命名回報"
@@ -14794,6 +14876,7 @@ msgstr "已用「{0}」這個名稱上傳——名稱「{1}」已被占用。"
msgid "Uploading"
msgstr "正在上傳"
+#: src/components/acp/PendingImageStrip.tsx
#: src/editor/image-upload/index.ts
msgid "Uploading {fileName}"
msgstr "正在上傳 {fileName}"
diff --git a/packages/app/tests/a11y/component-blocks.e2e.ts b/packages/app/tests/a11y/component-blocks.e2e.ts
index 1b0328a7c..39d755e6b 100644
--- a/packages/app/tests/a11y/component-blocks.e2e.ts
+++ b/packages/app/tests/a11y/component-blocks.e2e.ts
@@ -74,7 +74,10 @@ test('A11Y02: NodeSelection announces component via aria-live region', async ({
if (foundPos !== -1) editor.chain().focus().setNodeSelection(foundPos).run();
});
- const liveRegion = page.locator('[role="status"][aria-live="polite"]').first();
+ const liveRegion = page
+ .getByTestId('editor-scroll-container')
+ .locator('[role="status"][aria-live="polite"]')
+ .first();
await expect(liveRegion).toBeAttached({ timeout: 2_000 });
await expect(liveRegion).toContainText('Selected: Callout', { timeout: 2_000 });
});
diff --git a/packages/app/tests/stress/jsx-halo-semantics.e2e.ts b/packages/app/tests/stress/jsx-halo-semantics.e2e.ts
index 3636c5cec..f68fe9020 100644
--- a/packages/app/tests/stress/jsx-halo-semantics.e2e.ts
+++ b/packages/app/tests/stress/jsx-halo-semantics.e2e.ts
@@ -155,7 +155,9 @@ test('AC27: SelectionAnnouncer aria-live updates through TextSelection-inside
await setupDoc(page, api, '<Callout type="note">\n\nbody\n\n</Callout>\n\nafter paragraph\n');
const callout = page.locator('.jsx-component-wrapper[data-component-type="callout"]').first();
await callout.waitFor({ state: 'visible' });
- const liveRegion = page.locator('[role="status"][aria-live="polite"]');
+ const liveRegion = page
+ .getByTestId('editor-scroll-container')
+ .locator('[role="status"][aria-live="polite"]');
await driftSelectionIntoFirstJsxBody(page, 'Callout');
await expect(liveRegion).toContainText('Selected: Callout', { timeout: 2_000 });
diff --git a/packages/app/tests/stress/selection-indicator.e2e.ts b/packages/app/tests/stress/selection-indicator.e2e.ts
index 155ec9e71..7a18d58d5 100644
--- a/packages/app/tests/stress/selection-indicator.e2e.ts
+++ b/packages/app/tests/stress/selection-indicator.e2e.ts
@@ -461,7 +461,9 @@ test('S8: aria-live textContent announces the selected block', async ({ page, ap
await selectFirstJsxComponent(page, 'Accordion');
- const liveRegion = page.locator('[role="status"][aria-live="polite"]');
+ const liveRegion = page
+ .getByTestId('editor-scroll-container')
+ .locator('[role="status"][aria-live="polite"]');
await expect(liveRegion).toContainText('Selected: Accordion', { timeout: 2_000 });
});
@@ -687,7 +689,7 @@ test('S16: axe-core — zero critical violations on selection-layer surfaces', a
const results = await new AxeBuilder({ page })
.include('.ProseMirror:not(.composer-prosemirror)')
- .include('[role="status"][aria-live="polite"]')
+ .include('[data-testid="editor-scroll-container"] [role="status"][aria-live="polite"]')
.withTags(['wcag2a', 'wcag2aa'])
.analyze();
@@ -717,11 +719,15 @@ test('S18: rapid selection changes coalesce into a single aria-live announcement
);
await page.waitForSelector('.jsx-component-wrapper[data-component-type="img"]');
- const liveRegion = page.locator('[role="status"][aria-live="polite"]');
+ const liveRegion = page
+ .getByTestId('editor-scroll-container')
+ .locator('[role="status"][aria-live="polite"]');
await expect(liveRegion).toBeAttached();
await page.evaluate(() => {
- const region = document.querySelector('[role="status"][aria-live="polite"]');
+ const region = document.querySelector(
+ '[data-testid="editor-scroll-container"] [role="status"][aria-live="polite"]',
+ );
if (!region) throw new Error('live region not found');
// biome-ignore lint/suspicious/noExplicitAny: test-only global
(window as any).__ariaLiveMutations = [];