The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(artifacts): show agent files in their folder
M3gA-Mindd0731577ddb2
diff --git a/app/src/components/chat/ChatFilesPanel.tsx b/app/src/components/chat/ChatFilesPanel.tsxindex 4ee9ae1ac0..57bfcbec86 100644--- a/app/src/components/chat/ChatFilesPanel.tsx+++ b/app/src/components/chat/ChatFilesPanel.tsx@@ -6,7 +6,7 @@ import {type ArtifactErrorCode,deleteArtifact,downloadArtifact,- revealArtifactInFileManager,+ revealArtifact,} from '../../services/artifactDownloadService';import {type ArtifactSnapshot,@@ -23,7 +23,8 @@ import { extensionFor } from './artifactExtension';* Mounted by {@link ChatFilesChip}. Renders one row per artifact with:* - kind icon + title + human-readable size* - Download (Tauri `download_artifact_to_downloads`)- * - Show-in-folder (only after a successful download in this session)+ * - Show in folder: opens the file manager at the artifact's real file in+ * the visible files folder (#5505)* - Delete with a confirm-step (optimistic slice removal + RPC call,* re-upsert on failure with a toast).*@@ -64,6 +65,8 @@ function localizeErrorCode(return t('chat.files.error.download_failed');case 'DELETE_FAILED':return t('chat.files.error.delete_failed');+ case 'REVEAL_FAILED':+ return t('chat.files.error.reveal_failed');case 'CANCELLED':// User-initiated dialog dismissal — not a real error. Callers treat// it as a no-op; surface nothing (fall back to raw text if passed).@@ -155,7 +158,6 @@ function KindIcon({ kind }: { kind: ArtifactSnapshot['kind'] }) {interface RowDownloadState {state: 'idle' | 'downloading' | 'done' | 'error';- path?: string;/** Already-localized error headline ready for direct render. */error?: string;}@@ -167,6 +169,8 @@ export default function ChatFilesPanel({ threadId, artifacts, onClose }: ChatFilconst [confirmDeleteId, setConfirmDeleteId] = useState<string | null>(null);const [downloadState, setDownloadState] = useState<Record<string, RowDownloadState>>({});const [deleteError, setDeleteError] = useState<string | null>(null);+ // Per-row "Show in folder" failure, already localized.+ const [revealError, setRevealError] = useState<Record<string, string>>({});// Esc closes. Use keydown not keyup so a panel that opened via Enter// doesn't immediately re-trigger its trigger on the same release.@@ -206,7 +210,7 @@ export default function ChatFilesPanel({ threadId, artifacts, onClose }: ChatFilsetDownloadState(prev => ({...prev,[artifact.artifactId]: outcome.ok- ? { state: 'done', path: outcome.path }+ ? { state: 'done' }: {state: 'error',// Prefer the localized headline; only fall back to the raw@@ -217,9 +221,14 @@ export default function ChatFilesPanel({ threadId, artifacts, onClose }: ChatFil}));};- const handleReveal = async (path: string) => {- if (path) {- await revealArtifactInFileManager(path);+ const handleReveal = async (artifact: ArtifactSnapshot) => {+ setRevealError(({ [artifact.artifactId]: _cleared, ...rest }) => rest);+ const outcome = await revealArtifact(artifact.artifactId);+ if (!outcome.ok) {+ setRevealError(prev => ({+ ...prev,+ [artifact.artifactId]: localizeErrorCode(t, outcome.code, outcome.error),+ }));}};@@ -341,17 +350,15 @@ export default function ChatFilesPanel({ threadId, artifacts, onClose }: ChatFil? t('chat.artifact.downloading'): t('chat.artifact.download')}</Button>- {row.state === 'done' && row.path && (- <Button- variant="tertiary"- size="xs"- onClick={() => void handleReveal(row.path!)}- analyticsId={`chat-files-reveal-${artifact.kind}`}- data-testid={`chat-files-reveal-${artifact.artifactId}`}- className="text-[11px] underline text-sage-600">- {t('chat.artifact.reveal')}- </Button>- )}+ <Button+ variant="tertiary"+ size="xs"+ onClick={() => void handleReveal(artifact)}+ analyticsId={`chat-files-reveal-${artifact.kind}`}+ data-testid={`chat-files-reveal-${artifact.artifactId}`}+ className="text-[11px] underline text-sage-600">+ {t('chat.artifact.reveal')}+ </Button><ButtoniconOnlyvariant="tertiary"@@ -377,6 +384,13 @@ export default function ChatFilesPanel({ threadId, artifacts, onClose }: ChatFil</Button></div>)}+ {revealError[artifact.artifactId] && (+ <p+ className="text-[11px] text-coral-600 dark:text-coral-400 mt-0.5 wrap-break-word"+ data-testid={`chat-files-reveal-error-${artifact.artifactId}`}>+ {revealError[artifact.artifactId]}+ </p>+ )}{row.state === 'error' && row.error && (<p className="text-[11px] text-coral-600 dark:text-coral-400 mt-0.5 wrap-break-word">{t('chat.artifact.download_failed').replace('{reason}', row.error)}diff --git a/app/src/components/chat/__tests__/ChatFilesChip.test.tsx b/app/src/components/chat/__tests__/ChatFilesChip.test.tsxindex bdb4c84252..dd2cde0753 100644--- a/app/src/components/chat/__tests__/ChatFilesChip.test.tsx+++ b/app/src/components/chat/__tests__/ChatFilesChip.test.tsx@@ -15,7 +15,7 @@ vi.mock('../../../services/artifactDownloadService', () => ({listArtifactsForThread: vi.fn(),downloadArtifact: vi.fn(),deleteArtifact: vi.fn(),- revealArtifactInFileManager: vi.fn(),+ revealArtifact: vi.fn(),}));const THREAD = 't-chip-1';diff --git a/app/src/components/chat/__tests__/ChatFilesPanel.test.tsx b/app/src/components/chat/__tests__/ChatFilesPanel.test.tsxindex d9d59d5ca3..d4285d5677 100644--- a/app/src/components/chat/__tests__/ChatFilesPanel.test.tsx+++ b/app/src/components/chat/__tests__/ChatFilesPanel.test.tsx@@ -6,7 +6,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';import {deleteArtifact,downloadArtifact,- revealArtifactInFileManager,+ revealArtifact,} from '../../../services/artifactDownloadService';import chatRuntimeReducer, {type ArtifactSnapshot,@@ -17,7 +17,7 @@ import ChatFilesPanel from '../ChatFilesPanel';vi.mock('../../../services/artifactDownloadService', () => ({downloadArtifact: vi.fn(),deleteArtifact: vi.fn(),- revealArtifactInFileManager: vi.fn(),+ revealArtifact: vi.fn(),}));const THREAD = 't-panel-1';@@ -89,12 +89,7 @@ describe('ChatFilesPanel', () => {expect(screen.getByTestId('chat-files-delete-art-2')).toBeInTheDocument();});- it('on Download click → calls downloadArtifact + surfaces a Show-in-folder button on success', async () => {- const a = readyArtifact('art-1', 'Climate Deck');- vi.mocked(downloadArtifact).mockResolvedValueOnce({- ok: true,- path: '/Users/me/Downloads/Climate Deck.pptx',- });+ const renderOne = (a: ArtifactSnapshot) => {const store = mkStore([{threadId: THREAD,@@ -110,18 +105,44 @@ describe('ChatFilesPanel', () => {<ChatFilesPanel threadId={THREAD} artifacts={[a]} onClose={() => {}} /></Provider>);- fireEvent.click(screen.getByTestId('chat-files-download-art-1'));- await waitFor(() => {- expect(screen.getByTestId('chat-files-reveal-art-1')).toBeInTheDocument();+ };++ it('on Download click → calls downloadArtifact', async () => {+ vi.mocked(downloadArtifact).mockResolvedValueOnce({+ ok: true,+ path: '/Users/me/Downloads/Climate Deck.pptx',});- expect(downloadArtifact).toHaveBeenCalledWith('art-1', 'Climate Deck', 'pptx');+ renderOne(readyArtifact('art-1', 'Climate Deck'));+ fireEvent.click(screen.getByTestId('chat-files-download-art-1'));+ await waitFor(() =>+ expect(downloadArtifact).toHaveBeenCalledWith('art-1', 'Climate Deck', 'pptx')+ );+ });++ it('offers Show in folder on every ready file, without downloading first (#5505)', async () => {+ vi.mocked(revealArtifact).mockResolvedValueOnce({ ok: true });+ renderOne(readyArtifact('art-1', 'Climate Deck'));fireEvent.click(screen.getByTestId('chat-files-reveal-art-1'));- await waitFor(() => {- expect(revealArtifactInFileManager).toHaveBeenCalledWith(- '/Users/me/Downloads/Climate Deck.pptx'- );++ await waitFor(() => expect(revealArtifact).toHaveBeenCalledWith('art-1'));+ expect(downloadArtifact).not.toHaveBeenCalled();+ expect(screen.queryByTestId('chat-files-reveal-error-art-1')).not.toBeInTheDocument();+ });++ it('says so when the file cannot be shown', async () => {+ vi.mocked(revealArtifact).mockResolvedValueOnce({+ ok: false,+ code: 'REVEAL_FAILED',+ error: 'raw detail',});+ renderOne(readyArtifact('art-1', 'Climate Deck'));++ fireEvent.click(screen.getByTestId('chat-files-reveal-art-1'));++ expect(await screen.findByTestId('chat-files-reveal-error-art-1')).toHaveTextContent(+ 'Couldn’t show the file. It may have been moved or deleted outside OpenHuman.'+ );});it('Delete → Cancel keeps the artifact and does NOT call the RPC', async () => {diff --git a/app/src/components/settings/panels/FilesFolderSection.tsx b/app/src/components/settings/panels/FilesFolderSection.tsxindex 85372ab381..131898cbac 100644--- a/app/src/components/settings/panels/FilesFolderSection.tsx+++ b/app/src/components/settings/panels/FilesFolderSection.tsx@@ -1,6 +1,7 @@import { useEffect, useRef, useState } from 'react';import { useT } from '../../../lib/i18n/I18nContext';+import { revealPath } from '../../../utils/openUrl';import {type AgentPaths,openhumanGetAgentPaths,@@ -61,6 +62,16 @@ const FilesFolderSection = () => {}};+ const openFolder = async () => {+ if (!paths) return;+ setError(null);+ try {+ await revealPath(paths.files_dir);+ } catch {+ setError(t('settings.agentAccess.filesFolder.openError'));+ }+ };+const trimmed = input.trim();const unchanged = paths !== null && trimmed === paths.files_dir;@@ -102,6 +113,16 @@ const FilesFolderSection = () => {data-testid="files-folder-save">{t('settings.agentAccess.filesFolder.save')}</Button>+ <Button+ type="button"+ variant="tertiary"+ size="sm"+ onClick={() => void openFolder()}+ disabled={paths === null}+ analyticsId="settings-files-folder-open"+ data-testid="files-folder-open">+ {t('settings.agentAccess.filesFolder.open')}+ </Button>{paths?.files_dir_source === 'override' && (<Buttontype="button"diff --git a/app/src/components/settings/panels/__tests__/FilesFolderSection.test.tsx b/app/src/components/settings/panels/__tests__/FilesFolderSection.test.tsxindex f2fc6a5c3a..5c0cda005a 100644--- a/app/src/components/settings/panels/__tests__/FilesFolderSection.test.tsx+++ b/app/src/components/settings/panels/__tests__/FilesFolderSection.test.tsx@@ -2,6 +2,7 @@ import { fireEvent, screen, waitFor } from '@testing-library/react';import { beforeEach, describe, expect, it, vi } from 'vitest';import { renderWithProviders } from '../../../../test/test-utils';+import { revealPath } from '../../../../utils/openUrl';import {type AgentPaths,openhumanGetAgentPaths,@@ -16,6 +17,8 @@ vi.mock('../../../../utils/tauriCommands', async () => {return { ...actual, openhumanGetAgentPaths: vi.fn(), openhumanUpdateAgentPaths: vi.fn() };});+vi.mock('../../../../utils/openUrl', () => ({ revealPath: vi.fn() }));+const DEFAULT = '/home/u/OpenHuman/projects/Files';const paths = (overrides: Partial<AgentPaths> = {}): AgentPaths => ({@@ -113,4 +116,28 @@ describe('FilesFolderSection', () => {expect(await screen.findByText('Could not load the files folder.')).toBeInTheDocument();expect(input()).toBeDisabled();});++ it('Show in folder opens the configured folder', async () => {+ mockGet.mockResolvedValue({+ result: paths({ files_dir: '/data/Mine', files_dir_source: 'override' }),+ logs: [],+ });+ vi.mocked(revealPath).mockResolvedValueOnce(undefined);+ renderWithProviders(<FilesFolderSection />);+ await waitFor(() => expect(input().value).toBe('/data/Mine'));++ fireEvent.click(screen.getByTestId('files-folder-open'));++ await waitFor(() => expect(revealPath).toHaveBeenCalledWith('/data/Mine'));+ });++ it('says so when the folder cannot be opened', async () => {+ vi.mocked(revealPath).mockRejectedValueOnce(new Error('no file manager'));+ renderWithProviders(<FilesFolderSection />);+ await waitFor(() => expect(input().value).toBe(DEFAULT));++ fireEvent.click(screen.getByTestId('files-folder-open'));++ expect(await screen.findByText('Couldn’t open the files folder.')).toBeInTheDocument();+ });});diff --git a/app/src/lib/i18n/ar.ts b/app/src/lib/i18n/ar.tsindex c035f18d42..324f639fa4 100644--- a/app/src/lib/i18n/ar.ts+++ b/app/src/lib/i18n/ar.ts@@ -5326,6 +5326,8 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.reset': 'استخدام الافتراضي','settings.agentAccess.filesFolder.saved': 'تم تحديث مجلد الملفات','settings.agentAccess.filesFolder.loadError': 'تعذّر تحميل مجلد الملفات.',+ 'settings.agentAccess.filesFolder.open': 'إظهار في المجلد',+ 'settings.agentAccess.filesFolder.openError': 'تعذّر فتح مجلد الملفات.','settings.agentAccess.alwaysAllow': 'الأدوات المتدنية دائما','settings.agentAccess.alwaysAllowDesc':'الأدوات التي وضعت علامة "الطرق تسمح" في الدردشة دون أن تسأل. أزيلي واحدة ليتم دفعها مجدداً',@@ -6294,6 +6296,7 @@ const messages: TranslationMap = {'chat.files.error.resolve_failed': 'تعذّر تحديد الملف. حاول مرة أخرى.','chat.files.error.download_failed': 'فشل التنزيل. حاول مرة أخرى.','chat.files.error.delete_failed': 'تعذّر حذف الملف. حاول مرة أخرى.',+ 'chat.files.error.reveal_failed': 'تعذّر عرض الملف. ربما نُقل أو حُذف خارج OpenHuman.','memory.tab.council': 'Council','activity.tabs.automations': 'أتمتة','activity.tabs.automationsDescription':diff --git a/app/src/lib/i18n/bn.ts b/app/src/lib/i18n/bn.tsindex 6ebe07ed72..7ef6648afc 100644--- a/app/src/lib/i18n/bn.ts+++ b/app/src/lib/i18n/bn.ts@@ -5444,6 +5444,8 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.reset': 'ডিফল্ট ব্যবহার করুন','settings.agentAccess.filesFolder.saved': 'ফাইল ফোল্ডার আপডেট হয়েছে','settings.agentAccess.filesFolder.loadError': 'ফাইল ফোল্ডার লোড করা যায়নি।',+ 'settings.agentAccess.filesFolder.open': 'ফোল্ডারে দেখান',+ 'settings.agentAccess.filesFolder.openError': 'ফাইল ফোল্ডার খোলা যায়নি।','settings.agentAccess.alwaysAllow': 'সর্বদা অপসারণযোগ্য সরঞ্জাম','settings.agentAccess.alwaysAllowDesc':'জিজ্ঞাসা না করে আলাপনের ক্ষেত্রে "সর্বদা" প্রয়োগ করা হবে। পুনরায় লেখার জন্য একটি ফোল্ডার মুছে ফেলা হবে।',@@ -6435,6 +6437,8 @@ const messages: TranslationMap = {'chat.files.error.resolve_failed': 'আর্টিফ্যাক্ট সমাধান করা যায়নি। আবার চেষ্টা করুন।','chat.files.error.download_failed': 'ডাউনলোড ব্যর্থ হয়েছে। আবার চেষ্টা করুন।','chat.files.error.delete_failed': 'ফাইল মোছা যায়নি। আবার চেষ্টা করুন।',+ 'chat.files.error.reveal_failed':+ 'ফাইলটি দেখানো যায়নি। এটি হয়তো OpenHuman-এর বাইরে সরানো বা মুছে ফেলা হয়েছে।','memory.tab.council': 'Council','activity.tabs.automations': 'অটোমেশন','activity.tabs.automationsDescription':diff --git a/app/src/lib/i18n/de.ts b/app/src/lib/i18n/de.tsindex 332a9a4e99..7501060e66 100644--- a/app/src/lib/i18n/de.ts+++ b/app/src/lib/i18n/de.ts@@ -5582,6 +5582,8 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.reset': 'Standard verwenden','settings.agentAccess.filesFolder.saved': 'Dateiordner aktualisiert','settings.agentAccess.filesFolder.loadError': 'Der Dateiordner konnte nicht geladen werden.',+ 'settings.agentAccess.filesFolder.open': 'Im Ordner anzeigen',+ 'settings.agentAccess.filesFolder.openError': 'Der Dateiordner konnte nicht geöffnet werden.','settings.agentAccess.alwaysAllow': 'Immer erlaubte Werkzeuge','settings.agentAccess.alwaysAllowDesc':'Tools, die Sie im Chatlauf ohne zu fragen als "Immer zulassen" markiert haben. Entfernen Sie eine, um erneut aufgefordert zu werden.',@@ -6594,6 +6596,8 @@ const messages: TranslationMap = {'Das Artefakt konnte nicht aufgelöst werden. Bitte erneut versuchen.','chat.files.error.download_failed': 'Download fehlgeschlagen. Bitte erneut versuchen.','chat.files.error.delete_failed': 'Datei konnte nicht gelöscht werden. Bitte erneut versuchen.',+ 'chat.files.error.reveal_failed':+ 'Die Datei konnte nicht angezeigt werden. Sie wurde möglicherweise außerhalb von OpenHuman verschoben oder gelöscht.','memory.tab.council': 'Council','activity.tabs.automations': 'Automatisierungen','activity.tabs.automationsDescription':diff --git a/app/src/lib/i18n/en.ts b/app/src/lib/i18n/en.tsindex f5f3345316..8f39da51c7 100644--- a/app/src/lib/i18n/en.ts+++ b/app/src/lib/i18n/en.ts@@ -6241,6 +6241,8 @@ const en: TranslationMap = {'settings.agentAccess.filesFolder.reset': 'Use default','settings.agentAccess.filesFolder.saved': 'Files folder updated','settings.agentAccess.filesFolder.loadError': 'Could not load the files folder.',+ 'settings.agentAccess.filesFolder.open': 'Show in folder',+ 'settings.agentAccess.filesFolder.openError': 'Couldn’t open the files folder.','settings.agentAccess.alwaysAllow': 'Always-allowed tools','settings.agentAccess.alwaysAllowDesc':'Tools you marked "Always allow" in chat run without asking. Remove one to be prompted again.',@@ -7298,6 +7300,8 @@ const en: TranslationMap = {'chat.files.error.resolve_failed': 'Couldn’t resolve the artifact. Please try again.','chat.files.error.download_failed': 'Download failed. Please try again.','chat.files.error.delete_failed': 'Couldn’t delete the file. Please try again.',+ 'chat.files.error.reveal_failed':+ 'Couldn’t show the file. It may have been moved or deleted outside OpenHuman.',// First-run initialization (harness_init)'harnessInit.title': 'Setting things up',diff --git a/app/src/lib/i18n/es.ts b/app/src/lib/i18n/es.tsindex c9fafcaab3..538715a7fd 100644--- a/app/src/lib/i18n/es.ts+++ b/app/src/lib/i18n/es.ts@@ -5537,6 +5537,8 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.reset': 'Usar la predeterminada','settings.agentAccess.filesFolder.saved': 'Carpeta de archivos actualizada','settings.agentAccess.filesFolder.loadError': 'No se pudo cargar la carpeta de archivos.',+ 'settings.agentAccess.filesFolder.open': 'Mostrar en la carpeta',+ 'settings.agentAccess.filesFolder.openError': 'No se pudo abrir la carpeta de archivos.','settings.agentAccess.alwaysAllow': 'Herramientas siempre permitidas','settings.agentAccess.alwaysAllowDesc':'Las herramientas que marcaste como "Permitir siempre" en el chat se ejecutan sin pedir permiso. Elimina una para que se te pregunte nuevamente.',@@ -6557,6 +6559,8 @@ const messages: TranslationMap = {'chat.files.error.resolve_failed': 'No se pudo resolver el artefacto. Inténtalo de nuevo.','chat.files.error.download_failed': 'La descarga falló. Inténtalo de nuevo.','chat.files.error.delete_failed': 'No se pudo eliminar el archivo. Inténtalo de nuevo.',+ 'chat.files.error.reveal_failed':+ 'No se pudo mostrar el archivo. Puede que se haya movido o eliminado fuera de OpenHuman.','memory.tab.council': 'Council','activity.tabs.automations': 'Automatizaciones','activity.tabs.automationsDescription':diff --git a/app/src/lib/i18n/fr.ts b/app/src/lib/i18n/fr.tsindex 9ef463b0a1..6544d4a4fd 100644--- a/app/src/lib/i18n/fr.ts+++ b/app/src/lib/i18n/fr.ts@@ -5562,6 +5562,8 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.reset': 'Utiliser le dossier par défaut','settings.agentAccess.filesFolder.saved': 'Dossier des fichiers mis à jour','settings.agentAccess.filesFolder.loadError': 'Impossible de charger le dossier des fichiers.',+ 'settings.agentAccess.filesFolder.open': 'Afficher dans le dossier',+ 'settings.agentAccess.filesFolder.openError': 'Impossible d’ouvrir le dossier des fichiers.','settings.agentAccess.alwaysAllow': 'Outils toujours autorisés','settings.agentAccess.alwaysAllowDesc':"Les outils que vous avez marqués « Toujours autoriser » dans le chat s'exécutent sans demander. Supprimez-en un pour être invité à nouveau.",@@ -6582,6 +6584,8 @@ const messages: TranslationMap = {'chat.files.error.resolve_failed': 'Impossible de résoudre l’artefact. Réessayez.','chat.files.error.download_failed': 'Échec du téléchargement. Réessayez.','chat.files.error.delete_failed': 'Impossible de supprimer le fichier. Réessayez.',+ 'chat.files.error.reveal_failed':+ 'Impossible d’afficher le fichier. Il a peut-être été déplacé ou supprimé en dehors d’OpenHuman.','memory.tab.council': 'Council','activity.tabs.automations': 'Automatisations','activity.tabs.automationsDescription':diff --git a/app/src/lib/i18n/hi.ts b/app/src/lib/i18n/hi.tsindex 02e437b217..839effd27b 100644--- a/app/src/lib/i18n/hi.ts+++ b/app/src/lib/i18n/hi.ts@@ -5447,6 +5447,8 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.reset': 'डिफ़ॉल्ट उपयोग करें','settings.agentAccess.filesFolder.saved': 'फ़ाइल फ़ोल्डर अपडेट हो गया','settings.agentAccess.filesFolder.loadError': 'फ़ाइल फ़ोल्डर लोड नहीं हो सका।',+ 'settings.agentAccess.filesFolder.open': 'फ़ोल्डर में दिखाएँ',+ 'settings.agentAccess.filesFolder.openError': 'फ़ाइल फ़ोल्डर नहीं खोला जा सका।','settings.agentAccess.alwaysAllow': 'हमेशा की अनुमति उपकरण','settings.agentAccess.alwaysAllowDesc':'उपकरण जिन्हें आपने बिना पूछे चैट रन में "अलवे अनुमति" चिह्नित किया। एक बार फिर से शुरू करने के लिए।',@@ -6437,6 +6439,8 @@ const messages: TranslationMap = {'chat.files.error.resolve_failed': 'आर्टिफैक्ट को हल नहीं किया जा सका। पुनः प्रयास करें।','chat.files.error.download_failed': 'डाउनलोड विफल रहा। पुनः प्रयास करें।','chat.files.error.delete_failed': 'फ़ाइल हटाई नहीं जा सकी। पुनः प्रयास करें।',+ 'chat.files.error.reveal_failed':+ 'फ़ाइल नहीं दिखाई जा सकी। हो सकता है कि इसे OpenHuman के बाहर हटाया या मिटाया गया हो।','memory.tab.council': 'Council','activity.tabs.automations': 'स्वचालन','activity.tabs.automationsDescription':diff --git a/app/src/lib/i18n/id.ts b/app/src/lib/i18n/id.tsindex faee0f800e..a0e79ca722 100644--- a/app/src/lib/i18n/id.ts+++ b/app/src/lib/i18n/id.ts@@ -5478,6 +5478,8 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.reset': 'Gunakan bawaan','settings.agentAccess.filesFolder.saved': 'Folder file diperbarui','settings.agentAccess.filesFolder.loadError': 'Folder file tidak dapat dimuat.',+ 'settings.agentAccess.filesFolder.open': 'Tampilkan di folder',+ 'settings.agentAccess.filesFolder.openError': 'Folder file tidak dapat dibuka.','settings.agentAccess.alwaysAllow': 'Selalu-diperbolehkan alat','settings.agentAccess.alwaysAllowDesc':'Perkakas yang Anda tandai "Always allow" dalam run percakapan tanpa bertanya. Hapus satu yang akan diminta lagi.',@@ -6470,6 +6472,8 @@ const messages: TranslationMap = {'chat.files.error.resolve_failed': 'Tidak dapat memuat artefak. Coba lagi.','chat.files.error.download_failed': 'Unduhan gagal. Coba lagi.','chat.files.error.delete_failed': 'Tidak bisa menghapus file. Coba lagi.',+ 'chat.files.error.reveal_failed':+ 'File tidak dapat ditampilkan. File mungkin telah dipindahkan atau dihapus di luar OpenHuman.','memory.tab.council': 'Council','activity.tabs.automations': 'Otomatisasi','activity.tabs.automationsDescription':diff --git a/app/src/lib/i18n/it.ts b/app/src/lib/i18n/it.tsindex 66ce4c1e6c..b0f273ae14 100644--- a/app/src/lib/i18n/it.ts+++ b/app/src/lib/i18n/it.ts@@ -5528,6 +5528,8 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.reset': 'Usa quella predefinita','settings.agentAccess.filesFolder.saved': 'Cartella dei file aggiornata','settings.agentAccess.filesFolder.loadError': 'Impossibile caricare la cartella dei file.',+ 'settings.agentAccess.filesFolder.open': 'Mostra nella cartella',+ 'settings.agentAccess.filesFolder.openError': 'Impossibile aprire la cartella dei file.','settings.agentAccess.alwaysAllow': 'Strumenti sempre consentiti','settings.agentAccess.alwaysAllowDesc':'Gli strumenti che hai contrassegnato come "Consenti sempre" in chat funzionano senza chiedere. Rimuovine uno per ricevere nuovamente la richiesta.',@@ -6539,6 +6541,8 @@ const messages: TranslationMap = {'chat.files.error.resolve_failed': 'Impossibile risolvere l’artefatto. Riprova.','chat.files.error.download_failed': 'Download non riuscito. Riprova.','chat.files.error.delete_failed': 'Impossibile eliminare il file. Riprova.',+ 'chat.files.error.reveal_failed':+ 'Impossibile mostrare il file. Potrebbe essere stato spostato o eliminato al di fuori di OpenHuman.','memory.tab.council': 'Council','activity.tabs.automations': 'Automazioni','activity.tabs.automationsDescription':diff --git a/app/src/lib/i18n/ko.ts b/app/src/lib/i18n/ko.tsindex 7032211f4a..7d62c83582 100644--- a/app/src/lib/i18n/ko.ts+++ b/app/src/lib/i18n/ko.ts@@ -5386,6 +5386,8 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.reset': '기본값 사용','settings.agentAccess.filesFolder.saved': '파일 폴더가 업데이트되었습니다','settings.agentAccess.filesFolder.loadError': '파일 폴더를 불러올 수 없습니다.',+ 'settings.agentAccess.filesFolder.open': '폴더에서 보기',+ 'settings.agentAccess.filesFolder.openError': '파일 폴더를 열 수 없습니다.','settings.agentAccess.alwaysAllow': '항상 허용된 도구','settings.agentAccess.alwaysAllowDesc':'채팅에서 "항상 허용"으로 표시한 도구는 확인 없이 실행됩니다. 다시 확인을 받으려면 항목을 제거하세요.',@@ -6363,6 +6365,8 @@ const messages: TranslationMap = {'chat.files.error.resolve_failed': '아티팩트를 해석할 수 없습니다. 다시 시도해주세요.','chat.files.error.download_failed': '다운로드에 실패했습니다. 다시 시도해주세요.','chat.files.error.delete_failed': '파일을 삭제하지 못했습니다. 다시 시도해주세요.',+ 'chat.files.error.reveal_failed':+ '파일을 표시할 수 없습니다. OpenHuman 외부에서 이동되었거나 삭제되었을 수 있습니다.','memory.tab.council': 'Council','activity.tabs.automations': '자동화','activity.tabs.automationsDescription':diff --git a/app/src/lib/i18n/pl.ts b/app/src/lib/i18n/pl.tsindex 993b4adbe0..124f5e3073 100644--- a/app/src/lib/i18n/pl.ts+++ b/app/src/lib/i18n/pl.ts@@ -5522,6 +5522,8 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.reset': 'Użyj domyślnego','settings.agentAccess.filesFolder.saved': 'Zaktualizowano folder plików','settings.agentAccess.filesFolder.loadError': 'Nie udało się wczytać folderu plików.',+ 'settings.agentAccess.filesFolder.open': 'Pokaż w folderze',+ 'settings.agentAccess.filesFolder.openError': 'Nie udało się otworzyć folderu plików.','settings.agentAccess.alwaysAllow': 'Zawsze dozwolone narzędzia','settings.agentAccess.alwaysAllowDesc':'Narzędzia oznaczone w czacie jako „Zawsze zezwalaj” działają bez pytania. Usuń narzędzie, aby znów wymagało potwierdzenia.',@@ -6582,6 +6584,8 @@ const messages: TranslationMap = {'Nie udało się odnaleźć artefaktu. Prosimy spróbować ponownie.','chat.files.error.download_failed': 'Pobieranie nie powiodło się. Prosimy spróbować ponownie.','chat.files.error.delete_failed': 'Nie udało się usunąć pliku. Prosimy spróbować ponownie.',+ 'chat.files.error.reveal_failed':+ 'Nie udało się pokazać pliku. Mógł zostać przeniesiony lub usunięty poza OpenHuman.','harnessInit.title': 'Trwa konfiguracja',diff --git a/app/src/lib/i18n/pt.ts b/app/src/lib/i18n/pt.tsindex 9693ecd9b8..8852adfefa 100644--- a/app/src/lib/i18n/pt.ts+++ b/app/src/lib/i18n/pt.ts@@ -5522,6 +5522,8 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.reset': 'Usar a padrão','settings.agentAccess.filesFolder.saved': 'Pasta de arquivos atualizada','settings.agentAccess.filesFolder.loadError': 'Não foi possível carregar a pasta de arquivos.',+ 'settings.agentAccess.filesFolder.open': 'Mostrar na pasta',+ 'settings.agentAccess.filesFolder.openError': 'Não foi possível abrir a pasta de arquivos.','settings.agentAccess.alwaysAllow': 'Ferramentas sempre permitidas','settings.agentAccess.alwaysAllowDesc':'As ferramentas que você marcou como "Sempre permitir" no chat funcionam sem perguntar. Remova uma para ser solicitado novamente.',@@ -6529,6 +6531,8 @@ const messages: TranslationMap = {'chat.files.error.resolve_failed': 'Não foi possível resolver o artefato. Tente novamente.','chat.files.error.download_failed': 'O download falhou. Tente novamente.','chat.files.error.delete_failed': 'Não foi possível excluir o arquivo. Tente novamente.',+ 'chat.files.error.reveal_failed':+ 'Não foi possível mostrar o arquivo. Ele pode ter sido movido ou excluído fora do OpenHuman.','memory.tab.council': 'Council','activity.tabs.automations': 'Automações','activity.tabs.automationsDescription':diff --git a/app/src/lib/i18n/ru.ts b/app/src/lib/i18n/ru.tsindex 93f335038b..7866b33111 100644--- a/app/src/lib/i18n/ru.ts+++ b/app/src/lib/i18n/ru.ts@@ -5493,6 +5493,8 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.reset': 'Использовать по умолчанию','settings.agentAccess.filesFolder.saved': 'Папка файлов обновлена','settings.agentAccess.filesFolder.loadError': 'Не удалось загрузить папку файлов.',+ 'settings.agentAccess.filesFolder.open': 'Показать в папке',+ 'settings.agentAccess.filesFolder.openError': 'Не удалось открыть папку файлов.','settings.agentAccess.alwaysAllow': 'Всегда разрешенные инструменты','settings.agentAccess.alwaysAllowDesc':'Инструменты, которые вы отметили в чате как «Всегда разрешать», запускаются без запроса. Удалите один, чтобы запрос появился снова.',@@ -6493,6 +6495,8 @@ const messages: TranslationMap = {'chat.files.error.resolve_failed': 'Не удалось получить артефакт. Попробуйте ещё раз.','chat.files.error.download_failed': 'Не удалось загрузить файл. Попробуйте ещё раз.','chat.files.error.delete_failed': 'Не удалось удалить файл. Попробуйте ещё раз.',+ 'chat.files.error.reveal_failed':+ 'Не удалось показать файл. Возможно, он был перемещён или удалён вне OpenHuman.','memory.tab.council': 'Council','activity.tabs.automations': 'Автоматизации','activity.tabs.automationsDescription':diff --git a/app/src/lib/i18n/zh-CN.ts b/app/src/lib/i18n/zh-CN.tsindex 6230a81d8b..8796ebb378 100644--- a/app/src/lib/i18n/zh-CN.ts+++ b/app/src/lib/i18n/zh-CN.ts@@ -5158,6 +5158,8 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.reset': '使用默认文件夹','settings.agentAccess.filesFolder.saved': '文件保存文件夹已更新','settings.agentAccess.filesFolder.loadError': '无法加载文件保存文件夹。',+ 'settings.agentAccess.filesFolder.open': '在文件夹中显示',+ 'settings.agentAccess.filesFolder.openError': '无法打开文件保存文件夹。','settings.agentAccess.alwaysAllow': '始终允许的工具','settings.agentAccess.alwaysAllowDesc':'你在聊天中标记为“始终允许”的工具会直接运行且不再询问。移除后会重新提示。',@@ -6092,6 +6094,7 @@ const messages: TranslationMap = {'chat.files.error.resolve_failed': '无法解析 artifact。请重试。','chat.files.error.download_failed': '下载失败。请重试。','chat.files.error.delete_failed': '无法删除文件。请重试。',+ 'chat.files.error.reveal_failed': '无法显示该文件。它可能已在 OpenHuman 之外被移动或删除。','memory.tab.council': 'Council','activity.tabs.automations': '自动化','activity.tabs.automationsDescription': '可复用、可运行的流程:目标及达成目标的步骤。',diff --git a/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx b/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsxindex 64f967b267..05cf2f3cb4 100644--- a/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx+++ b/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx@@ -129,7 +129,7 @@ vi.mock('../../utils/openUrl', () => ({ openUrl: vi.fn() }));vi.mock('../../services/artifactDownloadService', () => ({listArtifactsForThread: vi.fn().mockResolvedValue({ ok: true, artifacts: [] }),saveArtifactViaDialog: vi.fn(),- revealArtifactInFileManager: vi.fn(),+ revealArtifact: vi.fn(),}));vi.mock('../../services/coreRpcClient', async orig => {diff --git a/app/src/services/__tests__/artifactDownloadService.test.ts b/app/src/services/__tests__/artifactDownloadService.test.tsindex cbf9f62a75..e179ee1d42 100644--- a/app/src/services/__tests__/artifactDownloadService.test.ts+++ b/app/src/services/__tests__/artifactDownloadService.test.ts@@ -2,13 +2,13 @@* artifactDownloadService coverage (#3024).** Exercises every branch of `downloadArtifact`, `deleteArtifact`, and- * `revealArtifactInFileManager` — including the typed error-code+ * `revealArtifact` — including the typed error-code* payloads, the title double-extension guard, and the non-Tauri /* empty-id / RPC-error / invoke-error paths.** Mocks: `safeInvoke` + `isTauri` from `utils/tauriCommands/common`,- * `callCoreRpc` from `services/coreRpcClient`, and `revealItemInDir`- * from `@tauri-apps/plugin-opener`. The service has no other I/O.+ * `callCoreRpc` from `services/coreRpcClient`, and `revealPath` from+ * `utils/openUrl`. The service has no other I/O.*/import { beforeEach, describe, expect, it, vi } from 'vitest';@@ -16,7 +16,7 @@ import {deleteArtifact,downloadArtifact,listArtifactsForThread,- revealArtifactInFileManager,+ revealArtifact,saveArtifactViaDialog,} from '../artifactDownloadService';import { callCoreRpc } from '../coreRpcClient';@@ -24,7 +24,7 @@ import { callCoreRpc } from '../coreRpcClient';const hoisted = vi.hoisted(() => ({invoke: vi.fn(),isTauri: vi.fn(() => true),- revealItemInDir: vi.fn(),+ revealPath: vi.fn(),}));vi.mock('../../utils/tauriCommands/common', () => ({@@ -34,8 +34,8 @@ vi.mock('../../utils/tauriCommands/common', () => ({vi.mock('../coreRpcClient', () => ({ callCoreRpc: vi.fn() }));-vi.mock('@tauri-apps/plugin-opener', () => ({- revealItemInDir: (...args: unknown[]) => hoisted.revealItemInDir(...args),+vi.mock('../../utils/openUrl', () => ({+ revealPath: (...args: unknown[]) => hoisted.revealPath(...args),}));describe('listArtifactsForThread', () => {@@ -402,38 +402,58 @@ describe('deleteArtifact', () => {});});-describe('revealArtifactInFileManager', () => {+describe('revealArtifact', () => {beforeEach(() => {vi.clearAllMocks();hoisted.isTauri.mockReturnValue(true);});- it('returns false when outside Tauri (no plugin call)', async () => {+ it('needs the desktop app', async () => {hoisted.isTauri.mockReturnValueOnce(false);- const ok = await revealArtifactInFileManager('/some/path');- expect(ok).toBe(false);- expect(hoisted.revealItemInDir).not.toHaveBeenCalled();+ const outcome = await revealArtifact('art-1');+ expect(outcome).toEqual(expect.objectContaining({ ok: false, code: 'NOT_DESKTOP' }));+ expect(callCoreRpc).not.toHaveBeenCalled();+ expect(hoisted.revealPath).not.toHaveBeenCalled();});- it('returns false for an empty / whitespace path', async () => {- const ok = await revealArtifactInFileManager(' ');- expect(ok).toBe(false);- expect(hoisted.revealItemInDir).not.toHaveBeenCalled();+ it('reveals the real file the core reports, not a Downloads copy', async () => {+ vi.mocked(callCoreRpc).mockResolvedValueOnce({+ absolute_path: '/Users/me/OpenHuman/projects/Files/deck.pptx',+ });+ hoisted.revealPath.mockResolvedValueOnce(undefined);++ const outcome = await revealArtifact('art-1');++ expect(outcome).toEqual({ ok: true });+ expect(callCoreRpc).toHaveBeenCalledWith({+ method: 'openhuman.ai_get_artifact',+ params: { artifact_id: 'art-1' },+ });+ expect(hoisted.revealPath).toHaveBeenCalledWith('/Users/me/OpenHuman/projects/Files/deck.pptx');});- it('delegates to revealItemInDir on success', async () => {- hoisted.revealItemInDir.mockResolvedValueOnce(undefined);- const ok = await revealArtifactInFileManager('/Users/me/Downloads/deck.pptx');- expect(ok).toBe(true);- expect(hoisted.revealItemInDir).toHaveBeenCalledWith('/Users/me/Downloads/deck.pptx');+ it('reports a file the core cannot resolve (e.g. moved or deleted)', async () => {+ vi.mocked(callCoreRpc).mockRejectedValueOnce(new Error('file missing for id=art-1'));+ const outcome = await revealArtifact('art-1');+ expect(outcome).toEqual({+ ok: false,+ code: 'RESOLVE_FAILED',+ error: 'file missing for id=art-1',+ });+ expect(hoisted.revealPath).not.toHaveBeenCalled();});- it('swallows plugin errors and returns false (best-effort reveal)', async () => {- const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});- hoisted.revealItemInDir.mockRejectedValueOnce(new Error('plugin failed'));- const ok = await revealArtifactInFileManager('/Users/me/Downloads/deck.pptx');- expect(ok).toBe(false);- warn.mockRestore();+ it('reports a file manager that refuses the path', async () => {+ vi.mocked(callCoreRpc).mockResolvedValueOnce({ absolute_path: 'C:\\Users\\x\\deck.pptx' });+ hoisted.revealPath.mockRejectedValueOnce(new Error('path on another OS'));+ const outcome = await revealArtifact('art-1');+ expect(outcome).toEqual({ ok: false, code: 'REVEAL_FAILED', error: 'path on another OS' });+ });++ it('rejects an empty id without calling the core', async () => {+ const outcome = await revealArtifact(' ');+ expect(outcome).toEqual(expect.objectContaining({ ok: false, code: 'MISSING_ARTIFACT_ID' }));+ expect(callCoreRpc).not.toHaveBeenCalled();});});diff --git a/app/src/services/artifactDownloadService.ts b/app/src/services/artifactDownloadService.tsindex b4e486516e..294955026a 100644--- a/app/src/services/artifactDownloadService.ts+++ b/app/src/services/artifactDownloadService.ts@@ -19,8 +19,7 @@* No-ops outside Tauri (browser dev preview) — export only makes sense in* the desktop shell.*/-import { revealItemInDir } from '@tauri-apps/plugin-opener';-+import { revealPath } from '../utils/openUrl';import { safeInvoke as invoke, isTauri } from '../utils/tauriCommands/common';import { callCoreRpc } from './coreRpcClient';@@ -39,7 +38,8 @@ export type ArtifactErrorCode =| 'RESOLVE_FAILED'| 'DOWNLOAD_FAILED'| 'CANCELLED'- | 'DELETE_FAILED';+ | 'DELETE_FAILED'+ | 'REVEAL_FAILED';/** Outcome surfaced to the UI for a single download attempt. */interface DownloadArtifactOutcome {@@ -311,19 +311,31 @@ export async function deleteArtifact(artifactId: string): Promise<DeleteArtifact}}-export async function revealArtifactInFileManager(absolutePath: string): Promise<boolean> {- if (!isTauri()) return false;- if (!absolutePath.trim()) return false;+/** Outcome of a "Show in folder" request. */+export type RevealArtifactOutcome =+ | { ok: true }+ | { ok: false; code: ArtifactErrorCode; error: string };++/**+ * Open the OS file manager at an artifact's file (#5505). The file lives in+ * the visible files folder (`~/OpenHuman/projects/Files` by default), so this+ * shows the real file, not a Downloads copy. The path comes from the core+ * (`ai_get_artifact`), which also reports a file moved or deleted outside+ * OpenHuman; `revealPath` refuses a path from a core running on another OS.+ */+export async function revealArtifact(artifactId: string): Promise<RevealArtifactOutcome> {+ if (!isTauri()) {+ return { ok: false, code: 'NOT_DESKTOP', error: 'Show in folder needs the desktop app' };+ }+ const resolved = await resolveArtifactForExport(artifactId, '', '');+ if (!resolved.ok) {+ return { ok: false, code: resolved.code, error: resolved.error };+ }try {- // Use the plugin's typed binding — the raw `invoke('plugin:opener|- // reveal_item_in_dir', { path })` shape silently no-ops because the- // plugin expects `{ paths: [absolutePath] }` (array). The binding- // handles the wrap.- await revealItemInDir(absolutePath);- return true;+ await revealPath(resolved.sourcePath);+ return { ok: true };} catch (err) {- // Swallow — reveal is best-effort, the file is already saved.- console.warn('[artifact] revealItemInDir failed:', err);- return false;+ const reason = err instanceof Error ? err.message : String(err);+ return { ok: false, code: 'REVEAL_FAILED', error: reason };}}diff --git a/docs/RELEASE-MANUAL-SMOKE.md b/docs/RELEASE-MANUAL-SMOKE.mdindex b3008c2205..a8b05880e8 100644--- a/docs/RELEASE-MANUAL-SMOKE.md+++ b/docs/RELEASE-MANUAL-SMOKE.md@@ -90,6 +90,7 @@ Applies to every release, all platforms.### Cross-platform+- [ ] **Agent files land in a visible folder** — Ask the agent for a short document or deck. Expected: the file appears in `~/OpenHuman/projects/Files` under its title (not in `~/.openhuman`); **Show in folder** in the chat Files panel opens the file manager at it; Settings → Agent OS access → **Files folder** shows that path, **Show in folder** opens it, and choosing another folder sends the next file there while the earlier file still opens. On an upgraded install, files from before the upgrade have moved into the folder.- [ ] **Caller-owned inference works without an OpenHuman session** — In a local workspace without an OpenHuman login, configure Ollama/LM Studio/MLX/oMLX/local-openai or an independently authenticated Claude Code/Agent SDK provider. Run chat and an agent flow routed entirely to that provider. For a named harness agent, also configure the summarization route to managed inference and verify that the agent still uses its local route; reversing those routes must retain the managed agent's session requirement. Expected: no OpenHuman session requirement. Select managed inference instead: it must still require a backend session. With LocalOnly privacy enabled, local runtimes remain allowed and Claude subprocesses remain blocked as external inference.- [ ] **LocalOnly blocks remote search** — Configure a remote search provider and enable LocalOnly privacy. Invoke `web_search_tool` with a harmless query. Expected: the tool returns a policy-blocked result and does not dispatch to the provider. Switch privacy to Standard and confirm the same tool can complete.