From 0f32663aa0a746c9022b928d8ce89a5532f4d961 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Tue, 3 Nov 2026 18:03:43 -0800 Subject: [PATCH] feat(ui): a markdown composer with chips and a compact settings bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The composer is now a CodeMirror editor running a port of alphaXiv's markdown live preview: formatting renders in place and its marks reveal under the caret. Reveals wait for the mouse button to come up, so a drag selects the text it started on instead of chasing marks that appear under the pointer; a drag that covers a span's text then grows to take its marks. Colors come from the theme's syntax and link tokens, so both themes hold. /commands, @paths that exist in the checkout, and attachments render as atomic chips. Pasted, dropped and uploaded files are cited in the draft as [Image #n] / [PDF #n] at the caret; a send carries only the cited attachments, renumbered in order of mention, so deleting a chip deletes the attachment and the agent sees where each image belongs. This replaces the thumbnail row and the textarea mirror that painted skill chips. Below the box, a Knife-style bar: data sources and mode chips on the left; model, effort and permissions on the right. Effort and permissions split out of the old settings menu, and autonomy joins permissions as a second section. Claude's ultracode, xhigh plus dynamic workflows, toggles beneath the effort levels. The box grows to eight lines, then scrolls; its top edge drags to a remembered height, replacing the textarea resizer from #863 under the same storage keys. Message refs (`msg_…`) paste into the draft as chips with the cited message's author and first words, and read as pills in sent messages. Copy link on a message puts its ref on the clipboard. A ref in the user's own message now expands for the agent like one an agent sends, so the agent reads the cited words instead of an id it cannot look up. `@` opens one add-context menu: files, alphaXiv library papers and chats in the project. A paper enters the draft as a markdown link to its alphaXiv page and shows as a chip, as does one added from the library button, now beside data sources in the bar; a chat enters as its id. Assisted-by: claude-opus-5.5 --- arc/agents.md | 10 +- src/local/chat/mod.rs | 13 +- ui/messages/ar.json | 9 +- ui/messages/en.json | 9 +- ui/messages/es.json | 9 +- ui/messages/fa.json | 9 +- ui/messages/hi.json | 9 +- ui/messages/ja.json | 9 +- ui/messages/ko.json | 9 +- ui/messages/pl.json | 9 +- ui/messages/ru.json | 9 +- ui/messages/tr.json | 9 +- ui/messages/zh-CN.json | 9 +- ui/package.json | 8 + ui/pnpm-lock.yaml | 526 +++++++++++++ ui/src/App.tsx | 2 +- ui/src/agentMessages.ts | 7 + ui/src/api.ts | 7 +- ui/src/components/ChatLinks.tsx | 41 +- ui/src/components/ChatPanel.tsx | 898 ++++++++++------------- ui/src/components/ComposerEditor.tsx | 694 ++++++++++++++++++ ui/src/components/ContextMeter.tsx | 2 +- ui/src/components/FileMentionMenu.tsx | 49 -- ui/src/components/LibraryPicker.tsx | 12 +- ui/src/components/LitSourceLogo.tsx | 7 +- ui/src/components/Md.tsx | 10 +- ui/src/components/MentionMenu.tsx | 93 +++ ui/src/components/ModelPicker.tsx | 310 +++++--- ui/src/components/SkillChips.tsx | 443 +++-------- ui/src/composerCommands.ts | 13 +- ui/src/composerStash.ts | 31 + ui/src/fileMentions.ts | 20 + ui/src/markdownLivePreview.ts | 612 +++++++++++++++ ui/src/queries/chat.ts | 9 + ui/tests/composerCommands.test.mjs | 24 - ui/tests/composerFocus.test.mjs | 24 +- ui/tests/composerIme.test.mjs | 80 +- ui/tests/composerStash.test.mjs | 11 + ui/tests/failedComposerRecovery.test.mjs | 51 +- ui/tests/fileMentions.test.mjs | 16 + ui/tests/markdownLivePreview.test.mjs | 44 ++ ui/tests/queryConsumers.test.mjs | 2 +- ui/tests/startHarness.test.mjs | 2 +- 43 files changed, 2956 insertions(+), 1214 deletions(-) create mode 100644 ui/src/components/ComposerEditor.tsx delete mode 100644 ui/src/components/FileMentionMenu.tsx create mode 100644 ui/src/components/MentionMenu.tsx create mode 100644 ui/src/markdownLivePreview.ts create mode 100644 ui/tests/markdownLivePreview.test.mjs diff --git a/arc/agents.md b/arc/agents.md index 85702db21..b3d97e346 100644 --- a/arc/agents.md +++ b/arc/agents.md @@ -218,10 +218,12 @@ only the agent reads the refs expanded and the instructions around them. The dashboard shows it as the sender's message, and a finished run by its outcome. **Messages travel by reference.** Each user message reaches its agent tagged -with a short ref from its id. A ref in a task or message expands to the cited -message, its chat and its attachments, so a delegate reads the user's own words -rather than a paraphrase. In the dashboard, a ref or chat id an agent writes is -a link to that message or chat. An agent can read any chat. It can message or answer +with a short ref from its id. A ref in a task or message, the user's included, +expands to the cited message, its chat and its attachments, so a delegate reads +the user's own words rather than a paraphrase. In the dashboard, a ref is a +link to that message wherever it is written, and a chat id an agent writes is a +link to that chat; Copy link on a message puts its ref on the clipboard, and the +composer shows a pasted ref as a chip. An agent can read any chat. It can message or answer its own delegates, and any other chat whose permission mode orx can read and is no broader than its own, and it can stop its own delegates. diff --git a/src/local/chat/mod.rs b/src/local/chat/mod.rs index 9cd750c22..9e9596baf 100644 --- a/src/local/chat/mod.rs +++ b/src/local/chat/mod.rs @@ -4790,12 +4790,13 @@ impl ChatHost { text: project .filter(|_| orx.is_none()) .map(|project| { - expand_slash_skills( + let text = expand_slash_skills( &project, &text, Some(&session.harness), Some(session_id), - ) + ); + delegation::expand_refs(&store, &text).unwrap_or(text) }) .unwrap_or_else(|| text.clone()), display: orx @@ -5932,7 +5933,13 @@ impl ChatHost { let mut turn_text = prepared_input.unwrap_or_else(|| { let mut expanded = contextualize_messages(messages, |text| { if orx.is_empty() { - expand_slash_skills(&project, text, Some(&session.harness), Some(&session.id)) + let text = expand_slash_skills( + &project, + text, + Some(&session.harness), + Some(&session.id), + ); + delegation::expand_refs(&store, &text).unwrap_or(text) } else { text.to_string() } diff --git a/ui/messages/ar.json b/ui/messages/ar.json index 6036576b8..8fdb3ee96 100644 --- a/ui/messages/ar.json +++ b/ui/messages/ar.json @@ -109,8 +109,6 @@ "chat_panel_reject": "رفض", "chat_panel_remove": "إزالة", "chat_panel_remove_annotation": "إزالة التعليق", - "chat_panel_remove_file": "إزالة الملف", - "chat_panel_remove_image": "إزالة الصورة", "chat_panel_remove_queued_message": "إزالة الرسالة من قائمة الانتظار", "chat_panel_rename": "إعادة تسمية", "chat_panel_reviewed_code_changes": "راجع تغييرات الشيفرة", @@ -744,8 +742,8 @@ "a11y_trackio_charts": "مخططات Trackio لهذا التشغيل", "experiment_overview_visualize": "تصوّر", "detail_drawer_trackio_no_data": "لم يسجّل هذا التشغيل أي بيانات في Trackio بعد.", - "a11y_preview_skill": "معاينة مهارة /{name}", "a11y_skill": "مهارة {name}", + "a11y_preview_skill": "معاينة مهارة /{name}", "a11y_actions_for": "إجراءات {name}", "a11y_browse_code_on": "تصفّح الشيفرة على {branch}", "a11y_remove_annotation": "إزالة التعليق {number}", @@ -1026,6 +1024,7 @@ "model_picker_mode": "الوضع", "model_picker_permissions": "الأذونات", "model_picker_fast_mode": "الوضع السريع", + "model_picker_ultracode_description": "جهد عالٍ جدًا مع مسارات عمل ديناميكية.", "model_picker_new_chat_harness": "ابدأ محادثة جديدة لاستخدام هذا الوكيل", "model_picker_autonomy": "الاستقلالية", "model_picker_autonomy_agentic": "وكيل مستقل", @@ -1210,6 +1209,7 @@ "copy_command_description": "نسخ آخر رد", "export_command_description": "تنزيل هذه المحادثة بتنسيق Markdown", "chat_copy_response": "نسخ الرد", + "chat_copy_message_link": "نسخ الرابط", "chat_nothing_to_copy": "لا يوجد رد لنسخه بعد", "chat_nothing_to_export": "لا يوجد شيء لتصديره بعد", "chat_export_you": "أنت", @@ -1628,6 +1628,9 @@ "account_offline_reason": "تعذر الوصول إلى OpenResearch على {url}. تحقق من تشغيله ثم حاول مجددًا.", "account_server_reason": "أرجع OpenResearch على {url} خطأ{status}. تحقق مجددًا.", "library_picker": "مكتبة alphaXiv", + "mention_menu_files": "الملفات", + "mention_menu_papers": "الأوراق", + "mention_menu_chats": "المحادثات", "library_search": "البحث في المكتبة", "library_recent": "المضافة مؤخرًا", "library_no_matches": "لا توجد نتائج", diff --git a/ui/messages/en.json b/ui/messages/en.json index 0f38a16f1..999493ddc 100644 --- a/ui/messages/en.json +++ b/ui/messages/en.json @@ -109,8 +109,6 @@ "chat_panel_reject": "Reject", "chat_panel_remove": "Remove", "chat_panel_remove_annotation": "Remove annotation", - "chat_panel_remove_file": "Remove file", - "chat_panel_remove_image": "Remove image", "chat_panel_remove_queued_message": "Remove queued message", "chat_panel_rename": "Rename", "chat_panel_reviewed_code_changes": "Reviewed code changes", @@ -745,8 +743,8 @@ "a11y_trackio_charts": "Trackio charts for this run", "experiment_overview_visualize": "Visualize", "detail_drawer_trackio_no_data": "This run has not logged to Trackio yet.", - "a11y_preview_skill": "Preview /{name} skill", "a11y_skill": "{name} skill", + "a11y_preview_skill": "Preview /{name} skill", "a11y_actions_for": "Actions for {name}", "a11y_browse_code_on": "Browse code on {branch}", "a11y_remove_annotation": "Remove annotation {number}", @@ -1027,6 +1025,7 @@ "model_picker_mode": "Mode", "model_picker_permissions": "Permissions", "model_picker_fast_mode": "Fast mode", + "model_picker_ultracode_description": "Extra high effort with dynamic workflows.", "model_picker_new_chat_harness": "Start a new chat to use this harness", "model_picker_autonomy": "Autonomy", "model_picker_autonomy_agentic": "Agentic", @@ -1211,6 +1210,7 @@ "copy_command_description": "Copy the last response", "export_command_description": "Download this chat as Markdown", "chat_copy_response": "Copy response", + "chat_copy_message_link": "Copy link", "chat_nothing_to_copy": "No response to copy yet", "chat_nothing_to_export": "Nothing to export yet", "chat_export_you": "You", @@ -1628,6 +1628,9 @@ "account_offline_reason": "Can’t reach OpenResearch at {url}. Check that it’s running, then try again.", "account_server_reason": "OpenResearch at {url} returned an error{status}. Check again.", "library_picker": "alphaXiv library", + "mention_menu_files": "Files", + "mention_menu_papers": "Papers", + "mention_menu_chats": "Chats", "library_search": "Search library", "library_recent": "Recently added", "library_no_matches": "No matches", diff --git a/ui/messages/es.json b/ui/messages/es.json index 1481fb260..915777c41 100644 --- a/ui/messages/es.json +++ b/ui/messages/es.json @@ -109,8 +109,6 @@ "chat_panel_reject": "Rechazar", "chat_panel_remove": "Quitar", "chat_panel_remove_annotation": "Quitar anotación", - "chat_panel_remove_file": "Quitar archivo", - "chat_panel_remove_image": "Quitar imagen", "chat_panel_remove_queued_message": "Quitar mensaje en cola", "chat_panel_rename": "Renombrar", "chat_panel_reviewed_code_changes": "Revisó cambios en el código", @@ -745,8 +743,8 @@ "a11y_trackio_charts": "Gráficos de Trackio de esta ejecución", "experiment_overview_visualize": "Visualizar", "detail_drawer_trackio_no_data": "Esta ejecución aún no ha registrado datos en Trackio.", - "a11y_preview_skill": "Vista previa de la skill /{name}", "a11y_skill": "Skill {name}", + "a11y_preview_skill": "Vista previa de la skill /{name}", "a11y_actions_for": "Acciones para {name}", "a11y_browse_code_on": "Explorar el código en {branch}", "a11y_remove_annotation": "Quitar la anotación {number}", @@ -1027,6 +1025,7 @@ "model_picker_mode": "Modo", "model_picker_permissions": "Permisos", "model_picker_fast_mode": "Modo rápido", + "model_picker_ultracode_description": "Esfuerzo extra alto con flujos de trabajo dinámicos.", "model_picker_new_chat_harness": "Inicia un chat nuevo para usar este agente", "model_picker_autonomy": "Autonomía", "model_picker_autonomy_agentic": "Agéntico", @@ -1211,6 +1210,7 @@ "copy_command_description": "Copia la última respuesta", "export_command_description": "Descarga este chat en Markdown", "chat_copy_response": "Copiar respuesta", + "chat_copy_message_link": "Copiar enlace", "chat_nothing_to_copy": "Aún no hay ninguna respuesta que copiar", "chat_nothing_to_export": "Aún no hay nada que exportar", "chat_export_you": "Tú", @@ -1628,6 +1628,9 @@ "account_offline_reason": "No se puede conectar con OpenResearch en {url}. Comprueba que esté en ejecución y vuelve a intentarlo.", "account_server_reason": "OpenResearch en {url} devolvió un error{status}. Compruébalo de nuevo.", "library_picker": "Biblioteca de alphaXiv", + "mention_menu_files": "Archivos", + "mention_menu_papers": "Artículos", + "mention_menu_chats": "Chats", "library_search": "Buscar en la biblioteca", "library_recent": "Añadidos recientemente", "library_no_matches": "Sin resultados", diff --git a/ui/messages/fa.json b/ui/messages/fa.json index 85dde3411..f05dd4e07 100644 --- a/ui/messages/fa.json +++ b/ui/messages/fa.json @@ -109,8 +109,6 @@ "chat_panel_reject": "رد کردن", "chat_panel_remove": "حذف", "chat_panel_remove_annotation": "حذف یادداشت", - "chat_panel_remove_file": "حذف فایل", - "chat_panel_remove_image": "حذف تصویر", "chat_panel_remove_queued_message": "حذف پیام صف", "chat_panel_rename": "تغییر نام", "chat_panel_reviewed_code_changes": "تغییرات کد بازبینی شد", @@ -739,8 +737,8 @@ "a11y_trackio_charts": "نمودارهای Trackio برای این اجرا", "experiment_overview_visualize": "مصورسازی", "detail_drawer_trackio_no_data": "این اجرا هنوز چیزی در Trackio ثبت نکرده است.", - "a11y_preview_skill": "پیش‌نمایش مهارت ‎/{name}", "a11y_skill": "مهارت {name}", + "a11y_preview_skill": "پیش‌نمایش مهارت ‎/{name}", "a11y_actions_for": "عملیات {name}", "a11y_browse_code_on": "مرور کد در شاخهٔ {branch}", "a11y_remove_annotation": "حذف یادداشت {number}", @@ -1021,6 +1019,7 @@ "model_picker_mode": "حالت", "model_picker_permissions": "مجوزها", "model_picker_fast_mode": "حالت سریع", + "model_picker_ultracode_description": "استدلال بسیار بالا با گردش‌کارهای پویا.", "model_picker_new_chat_harness": "برای استفاده از این عامل، گفت‌وگوی جدیدی شروع کنید", "model_picker_autonomy": "خودمختاری", "model_picker_autonomy_agentic": "خودکار", @@ -1205,6 +1204,7 @@ "copy_command_description": "کپی آخرین پاسخ", "export_command_description": "دانلود این گفت‌وگو به‌صورت Markdown", "chat_copy_response": "کپی پاسخ", + "chat_copy_message_link": "کپی پیوند", "chat_nothing_to_copy": "هنوز پاسخی برای کپی وجود ندارد", "chat_nothing_to_export": "هنوز چیزی برای خروجی گرفتن وجود ندارد", "chat_export_you": "شما", @@ -1628,6 +1628,9 @@ "account_offline_reason": "اتصال به OpenResearch در {url} ممکن نیست. از اجرای آن مطمئن شوید و دوباره تلاش کنید.", "account_server_reason": "OpenResearch در {url} خطایی برگرداند{status}. دوباره بررسی کنید.", "library_picker": "کتابخانهٔ alphaXiv", + "mention_menu_files": "فایل‌ها", + "mention_menu_papers": "مقاله‌ها", + "mention_menu_chats": "گفتگوها", "library_search": "جستجو در کتابخانه", "library_recent": "تازه افزوده‌شده", "library_no_matches": "نتیجه‌ای یافت نشد", diff --git a/ui/messages/hi.json b/ui/messages/hi.json index cdf2d99c5..c663641b0 100644 --- a/ui/messages/hi.json +++ b/ui/messages/hi.json @@ -109,8 +109,6 @@ "chat_panel_reject": "अस्वीकार करें", "chat_panel_remove": "हटाएं", "chat_panel_remove_annotation": "एनोटेशन हटाएं", - "chat_panel_remove_file": "फ़ाइल हटाएं", - "chat_panel_remove_image": "इमेज हटाएं", "chat_panel_remove_queued_message": "कतार में लगा संदेश हटाएं", "chat_panel_rename": "नाम बदलें", "chat_panel_reviewed_code_changes": "कोड में बदलावों की समीक्षा की", @@ -745,8 +743,8 @@ "a11y_trackio_charts": "इस रन के Trackio चार्ट", "experiment_overview_visualize": "विज़ुअलाइज़ करें", "detail_drawer_trackio_no_data": "इस रन ने अभी तक Trackio में लॉग नहीं किया है।", - "a11y_preview_skill": "/{name} स्किल का पूर्वावलोकन करें", "a11y_skill": "{name} स्किल", + "a11y_preview_skill": "/{name} स्किल का पूर्वावलोकन करें", "a11y_actions_for": "{name} के लिए क्रियाएं", "a11y_browse_code_on": "{branch} पर कोड ब्राउज़ करें", "a11y_remove_annotation": "एनोटेशन {number} हटाएं", @@ -1027,6 +1025,7 @@ "model_picker_mode": "मोड", "model_picker_permissions": "अनुमतियाँ", "model_picker_fast_mode": "तेज़ मोड", + "model_picker_ultracode_description": "अतिरिक्त उच्च प्रयास स्तर, गतिशील वर्कफ़्लो के साथ।", "model_picker_new_chat_harness": "इस एजेंट का उपयोग करने के लिए नई चैट शुरू करें", "model_picker_autonomy": "स्वायत्तता", "model_picker_autonomy_agentic": "एजेंटिक", @@ -1211,6 +1210,7 @@ "copy_command_description": "आखिरी जवाब कॉपी करें", "export_command_description": "इस चैट को Markdown के रूप में डाउनलोड करें", "chat_copy_response": "जवाब कॉपी करें", + "chat_copy_message_link": "लिंक कॉपी करें", "chat_nothing_to_copy": "कॉपी करने के लिए अभी कोई जवाब नहीं है", "chat_nothing_to_export": "एक्सपोर्ट करने के लिए अभी कुछ नहीं है", "chat_export_you": "आप", @@ -1628,6 +1628,9 @@ "account_offline_reason": "{url} पर OpenResearch से संपर्क नहीं हो सका। जाँचें कि वह चल रहा है, फिर दोबारा कोशिश करें।", "account_server_reason": "{url} पर OpenResearch ने त्रुटि लौटाई{status}। फिर जाँचें।", "library_picker": "alphaXiv लाइब्रेरी", + "mention_menu_files": "फ़ाइलें", + "mention_menu_papers": "पेपर", + "mention_menu_chats": "चैट", "library_search": "लाइब्रेरी खोजें", "library_recent": "हाल ही में जोड़े गए", "library_no_matches": "कोई परिणाम नहीं", diff --git a/ui/messages/ja.json b/ui/messages/ja.json index 4a05c4505..20f3de186 100644 --- a/ui/messages/ja.json +++ b/ui/messages/ja.json @@ -109,8 +109,6 @@ "chat_panel_reject": "却下", "chat_panel_remove": "削除", "chat_panel_remove_annotation": "注釈を削除", - "chat_panel_remove_file": "ファイルを削除", - "chat_panel_remove_image": "画像を削除", "chat_panel_remove_queued_message": "待機中のメッセージを削除", "chat_panel_rename": "名前を変更", "chat_panel_reviewed_code_changes": "コードの変更をレビューしました", @@ -745,8 +743,8 @@ "a11y_trackio_charts": "この実行の Trackio グラフ", "experiment_overview_visualize": "可視化", "detail_drawer_trackio_no_data": "この実行はまだ Trackio に記録していません。", - "a11y_preview_skill": "/{name} スキルをプレビュー", "a11y_skill": "{name} スキル", + "a11y_preview_skill": "/{name} スキルをプレビュー", "a11y_actions_for": "{name} の操作", "a11y_browse_code_on": "{branch} のコードを閲覧", "a11y_remove_annotation": "注釈 {number} を削除", @@ -1027,6 +1025,7 @@ "model_picker_mode": "モード", "model_picker_permissions": "権限", "model_picker_fast_mode": "高速モード", + "model_picker_ultracode_description": "非常に高い推論レベルと動的ワークフロー。", "model_picker_new_chat_harness": "このエージェントを使用するには新しいチャットを開始してください", "model_picker_autonomy": "自律性", "model_picker_autonomy_agentic": "自律エージェント", @@ -1211,6 +1210,7 @@ "copy_command_description": "最後の応答をコピー", "export_command_description": "このチャットを Markdown としてダウンロード", "chat_copy_response": "応答をコピー", + "chat_copy_message_link": "リンクをコピー", "chat_nothing_to_copy": "コピーする応答はまだありません", "chat_nothing_to_export": "エクスポートする内容はまだありません", "chat_export_you": "あなた", @@ -1628,6 +1628,9 @@ "account_offline_reason": "{url} のOpenResearchに接続できません。起動していることを確認して、もう一度お試しください。", "account_server_reason": "{url} のOpenResearchでエラーが発生しました{status}。もう一度確認してください。", "library_picker": "alphaXiv ライブラリ", + "mention_menu_files": "ファイル", + "mention_menu_papers": "論文", + "mention_menu_chats": "チャット", "library_search": "ライブラリを検索", "library_recent": "最近追加した論文", "library_no_matches": "該当なし", diff --git a/ui/messages/ko.json b/ui/messages/ko.json index e71f78b37..b1d303e7f 100644 --- a/ui/messages/ko.json +++ b/ui/messages/ko.json @@ -109,8 +109,6 @@ "chat_panel_reject": "거부", "chat_panel_remove": "제거", "chat_panel_remove_annotation": "주석 제거", - "chat_panel_remove_file": "파일 제거", - "chat_panel_remove_image": "이미지 제거", "chat_panel_remove_queued_message": "대기 메시지 제거", "chat_panel_rename": "이름 변경", "chat_panel_reviewed_code_changes": "코드 변경 검토 완료", @@ -745,8 +743,8 @@ "a11y_trackio_charts": "이 실행의 Trackio 차트", "experiment_overview_visualize": "시각화", "detail_drawer_trackio_no_data": "이 실행은 아직 Trackio에 기록하지 않았습니다.", - "a11y_preview_skill": "/{name} 스킬 미리보기", "a11y_skill": "{name} 스킬", + "a11y_preview_skill": "/{name} 스킬 미리보기", "a11y_actions_for": "{name} 작업", "a11y_browse_code_on": "{branch}의 코드 탐색", "a11y_remove_annotation": "주석 {number} 제거", @@ -1027,6 +1025,7 @@ "model_picker_mode": "모드", "model_picker_permissions": "권한", "model_picker_fast_mode": "빠른 모드", + "model_picker_ultracode_description": "매우 높은 추론 수준과 동적 워크플로.", "model_picker_new_chat_harness": "이 에이전트를 사용하려면 새 채팅을 시작하세요", "model_picker_autonomy": "자율성", "model_picker_autonomy_agentic": "자율 에이전트", @@ -1211,6 +1210,7 @@ "copy_command_description": "마지막 응답 복사", "export_command_description": "이 채팅을 Markdown으로 다운로드", "chat_copy_response": "응답 복사", + "chat_copy_message_link": "링크 복사", "chat_nothing_to_copy": "아직 복사할 응답이 없습니다", "chat_nothing_to_export": "아직 내보낼 내용이 없습니다", "chat_export_you": "사용자", @@ -1628,6 +1628,9 @@ "account_offline_reason": "{url}의 OpenResearch에 연결할 수 없습니다. 실행 중인지 확인하고 다시 시도하세요.", "account_server_reason": "{url}의 OpenResearch에서 오류가 발생했습니다{status}. 다시 확인하세요.", "library_picker": "alphaXiv 라이브러리", + "mention_menu_files": "파일", + "mention_menu_papers": "논문", + "mention_menu_chats": "채팅", "library_search": "라이브러리 검색", "library_recent": "최근 추가한 논문", "library_no_matches": "검색 결과 없음", diff --git a/ui/messages/pl.json b/ui/messages/pl.json index 608be1d59..bf0273d44 100644 --- a/ui/messages/pl.json +++ b/ui/messages/pl.json @@ -109,8 +109,6 @@ "chat_panel_reject": "Odrzuć", "chat_panel_remove": "Usuń", "chat_panel_remove_annotation": "Usuń adnotację", - "chat_panel_remove_file": "Usuń plik", - "chat_panel_remove_image": "Usuń obraz", "chat_panel_remove_queued_message": "Usuń wiadomość z kolejki", "chat_panel_rename": "Zmień nazwę", "chat_panel_reviewed_code_changes": "Sprawdzono zmiany w kodzie", @@ -745,8 +743,8 @@ "a11y_trackio_charts": "Wykresy Trackio dla tego uruchomienia", "experiment_overview_visualize": "Wizualizuj", "detail_drawer_trackio_no_data": "To uruchomienie nie zapisało jeszcze danych w Trackio.", - "a11y_preview_skill": "Podgląd umiejętności /{name}", "a11y_skill": "Umiejętność {name}", + "a11y_preview_skill": "Podgląd umiejętności /{name}", "a11y_actions_for": "Operacje na elemencie {name}", "a11y_browse_code_on": "Przeglądaj kod gałęzi {branch}", "a11y_remove_annotation": "Usuń adnotację {number}", @@ -1027,6 +1025,7 @@ "model_picker_mode": "Tryb", "model_picker_permissions": "Uprawnienia", "model_picker_fast_mode": "Tryb szybki", + "model_picker_ultracode_description": "Bardzo wysoki poziom rozumowania z dynamicznymi przepływami pracy.", "model_picker_new_chat_harness": "Rozpocznij nowy czat, aby użyć tego agenta", "model_picker_autonomy": "Samodzielność", "model_picker_autonomy_agentic": "Samodzielny agent", @@ -1211,6 +1210,7 @@ "copy_command_description": "Skopiuj ostatnią odpowiedź", "export_command_description": "Pobierz ten czat w formacie Markdown", "chat_copy_response": "Kopiuj odpowiedź", + "chat_copy_message_link": "Kopiuj link", "chat_nothing_to_copy": "Nie ma jeszcze odpowiedzi do skopiowania", "chat_nothing_to_export": "Nie ma jeszcze niczego do wyeksportowania", "chat_export_you": "Ty", @@ -1628,6 +1628,9 @@ "account_offline_reason": "Nie można połączyć się z OpenResearch pod adresem {url}. Sprawdź, czy działa, i spróbuj ponownie.", "account_server_reason": "OpenResearch pod adresem {url} zwrócił błąd{status}. Sprawdź ponownie.", "library_picker": "Biblioteka alphaXiv", + "mention_menu_files": "Pliki", + "mention_menu_papers": "Publikacje", + "mention_menu_chats": "Czaty", "library_search": "Szukaj w bibliotece", "library_recent": "Ostatnio dodane", "library_no_matches": "Brak wyników", diff --git a/ui/messages/ru.json b/ui/messages/ru.json index 576e4d3cc..2f999e835 100644 --- a/ui/messages/ru.json +++ b/ui/messages/ru.json @@ -109,8 +109,6 @@ "chat_panel_reject": "Отклонить", "chat_panel_remove": "Удалить", "chat_panel_remove_annotation": "Удалить пометку", - "chat_panel_remove_file": "Удалить файл", - "chat_panel_remove_image": "Удалить изображение", "chat_panel_remove_queued_message": "Удалить сообщение из очереди", "chat_panel_rename": "Переименовать", "chat_panel_reviewed_code_changes": "Проверка изменений в коде", @@ -745,8 +743,8 @@ "a11y_trackio_charts": "Графики Trackio для этого запуска", "experiment_overview_visualize": "Визуализация", "detail_drawer_trackio_no_data": "Этот запуск ещё ничего не записал в Trackio.", - "a11y_preview_skill": "Предпросмотр навыка /{name}", "a11y_skill": "Навык {name}", + "a11y_preview_skill": "Предпросмотр навыка /{name}", "a11y_actions_for": "Действия для {name}", "a11y_browse_code_on": "Просмотр кода в {branch}", "a11y_remove_annotation": "Удалить пометку {number}", @@ -1027,6 +1025,7 @@ "model_picker_mode": "Режим", "model_picker_permissions": "Разрешения", "model_picker_fast_mode": "Быстрый режим", + "model_picker_ultracode_description": "Очень высокое усилие с динамическими рабочими процессами.", "model_picker_new_chat_harness": "Чтобы использовать этого агента, начните новый чат", "model_picker_autonomy": "Самостоятельность", "model_picker_autonomy_agentic": "Агент", @@ -1211,6 +1210,7 @@ "copy_command_description": "Скопировать последний ответ", "export_command_description": "Скачать этот чат в формате Markdown", "chat_copy_response": "Скопировать ответ", + "chat_copy_message_link": "Скопировать ссылку", "chat_nothing_to_copy": "Ответа для копирования пока нет", "chat_nothing_to_export": "Экспортировать пока нечего", "chat_export_you": "Вы", @@ -1628,6 +1628,9 @@ "account_offline_reason": "Не удаётся подключиться к OpenResearch по адресу {url}. Убедитесь, что он запущен, и попробуйте снова.", "account_server_reason": "OpenResearch по адресу {url} вернул ошибку{status}. Проверьте ещё раз.", "library_picker": "Библиотека alphaXiv", + "mention_menu_files": "Файлы", + "mention_menu_papers": "Статьи", + "mention_menu_chats": "Чаты", "library_search": "Поиск в библиотеке", "library_recent": "Недавно добавленные", "library_no_matches": "Нет результатов", diff --git a/ui/messages/tr.json b/ui/messages/tr.json index cf3e36049..c2757ec32 100644 --- a/ui/messages/tr.json +++ b/ui/messages/tr.json @@ -109,8 +109,6 @@ "chat_panel_reject": "Reddet", "chat_panel_remove": "Kaldır", "chat_panel_remove_annotation": "Notu kaldır", - "chat_panel_remove_file": "Dosyayı kaldır", - "chat_panel_remove_image": "Görseli kaldır", "chat_panel_remove_queued_message": "Sıradaki mesajı kaldır", "chat_panel_rename": "Yeniden adlandır", "chat_panel_reviewed_code_changes": "Kod değişikliklerini inceledi", @@ -745,8 +743,8 @@ "a11y_trackio_charts": "Bu çalıştırmanın Trackio grafikleri", "experiment_overview_visualize": "Görselleştir", "detail_drawer_trackio_no_data": "Bu çalıştırma henüz Trackio'ya kayıt yapmadı.", - "a11y_preview_skill": "/{name} skill'ini önizle", "a11y_skill": "{name} skill'i", + "a11y_preview_skill": "/{name} skill'ini önizle", "a11y_actions_for": "{name} için işlemler", "a11y_browse_code_on": "{branch} dalındaki koda göz at", "a11y_remove_annotation": "{number} numaralı notu kaldır", @@ -1027,6 +1025,7 @@ "model_picker_mode": "Mod", "model_picker_permissions": "İzinler", "model_picker_fast_mode": "Hızlı mod", + "model_picker_ultracode_description": "Dinamik iş akışlarıyla ekstra yüksek çaba.", "model_picker_new_chat_harness": "Bu harness'i kullanmak için yeni bir sohbet başlatın", "model_picker_autonomy": "Özerklik", "model_picker_autonomy_agentic": "Ajanik", @@ -1211,6 +1210,7 @@ "copy_command_description": "Son yanıtı kopyala", "export_command_description": "Bu sohbeti Markdown olarak indir", "chat_copy_response": "Yanıtı kopyala", + "chat_copy_message_link": "Bağlantıyı kopyala", "chat_nothing_to_copy": "Henüz kopyalanacak yanıt yok", "chat_nothing_to_export": "Henüz dışa aktarılacak bir şey yok", "chat_export_you": "Siz", @@ -1628,6 +1628,9 @@ "account_offline_reason": "{url} adresindeki OpenResearch'e ulaşılamıyor. Çalıştığını denetleyip yeniden deneyin.", "account_server_reason": "{url} adresindeki OpenResearch bir hata döndürdü{status}. Yeniden denetleyin.", "library_picker": "alphaXiv kitaplığı", + "mention_menu_files": "Dosyalar", + "mention_menu_papers": "Makaleler", + "mention_menu_chats": "Sohbetler", "library_search": "Kitaplıkta ara", "library_recent": "Son eklenenler", "library_no_matches": "Eşleşme yok", diff --git a/ui/messages/zh-CN.json b/ui/messages/zh-CN.json index d48da2964..c2d07f0e2 100644 --- a/ui/messages/zh-CN.json +++ b/ui/messages/zh-CN.json @@ -109,8 +109,6 @@ "chat_panel_reject": "拒绝", "chat_panel_remove": "移除", "chat_panel_remove_annotation": "移除批注", - "chat_panel_remove_file": "移除文件", - "chat_panel_remove_image": "移除图片", "chat_panel_remove_queued_message": "移除排队消息", "chat_panel_rename": "重命名", "chat_panel_reviewed_code_changes": "已审查代码更改", @@ -739,8 +737,8 @@ "a11y_trackio_charts": "此运行的 Trackio 图表", "experiment_overview_visualize": "可视化", "detail_drawer_trackio_no_data": "此运行尚未向 Trackio 记录数据。", - "a11y_preview_skill": "预览 /{name} 技能", "a11y_skill": "{name} 技能", + "a11y_preview_skill": "预览 /{name} 技能", "a11y_actions_for": "{name} 的操作", "a11y_browse_code_on": "浏览分支 {branch} 上的代码", "a11y_remove_annotation": "移除批注 {number}", @@ -1021,6 +1019,7 @@ "model_picker_mode": "模式", "model_picker_permissions": "权限", "model_picker_fast_mode": "快速模式", + "model_picker_ultracode_description": "超高推理强度,并启用动态工作流。", "model_picker_new_chat_harness": "开始新聊天以使用此代理", "model_picker_autonomy": "自主程度", "model_picker_autonomy_agentic": "自主", @@ -1205,6 +1204,7 @@ "copy_command_description": "复制最新回复", "export_command_description": "将此聊天下载为 Markdown", "chat_copy_response": "复制回复", + "chat_copy_message_link": "复制链接", "chat_nothing_to_copy": "还没有可复制的回复", "chat_nothing_to_export": "还没有可导出的内容", "chat_export_you": "你", @@ -1628,6 +1628,9 @@ "account_offline_reason": "无法连接到 {url} 的 OpenResearch。请确认它正在运行,然后重试。", "account_server_reason": "{url} 的 OpenResearch 返回错误{status}。请重新检查。", "library_picker": "alphaXiv 文库", + "mention_menu_files": "文件", + "mention_menu_papers": "论文", + "mention_menu_chats": "对话", "library_search": "搜索文库", "library_recent": "最近添加", "library_no_matches": "无匹配结果", diff --git a/ui/package.json b/ui/package.json index d39ae4b06..0d428043f 100644 --- a/ui/package.json +++ b/ui/package.json @@ -17,7 +17,15 @@ "dependencies": { "@base-ui/react": "^1.9.0", "@clo/react-markdown": "jsr:1.1.1", + "@codemirror/commands": "^6.11.1", + "@codemirror/lang-markdown": "^6.5.2", + "@codemirror/language": "^6.13.1", + "@codemirror/language-data": "^6.5.2", + "@codemirror/state": "^6.7.6", + "@codemirror/view": "^6.43.15", "@inlang/paraglide-js": "^2.25.0", + "@lezer/common": "^1.5.5", + "@lezer/highlight": "^1.2.5", "@tanstack/react-hotkeys": "0.17.0", "@tanstack/react-query": "^5.102.8", "@tanstack/react-router": "^1.170.32", diff --git a/ui/pnpm-lock.yaml b/ui/pnpm-lock.yaml index 8c3d567e4..dbe2c6f58 100644 --- a/ui/pnpm-lock.yaml +++ b/ui/pnpm-lock.yaml @@ -200,9 +200,33 @@ importers: '@clo/react-markdown': specifier: jsr:1.1.1 version: '@jsr/clo__react-markdown@1.1.1' + '@codemirror/commands': + specifier: ^6.11.1 + version: 6.11.1 + '@codemirror/lang-markdown': + specifier: ^6.5.2 + version: 6.5.2 + '@codemirror/language': + specifier: ^6.13.1 + version: 6.13.1 + '@codemirror/language-data': + specifier: ^6.5.2 + version: 6.5.2 + '@codemirror/state': + specifier: ^6.7.6 + version: 6.7.6 + '@codemirror/view': + specifier: ^6.43.15 + version: 6.43.15 '@inlang/paraglide-js': specifier: ^2.25.0 version: 2.25.0(typescript@5.9.3)(vite@6.4.3(jiti@2.7.0)(lightningcss@1.32.0)) + '@lezer/common': + specifier: ^1.5.5 + version: 1.5.5 + '@lezer/highlight': + specifier: ^1.2.5 + version: 1.2.5 '@tanstack/react-hotkeys': specifier: 0.17.0 version: 0.17.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7) @@ -431,6 +455,96 @@ packages: '@types/react': optional: true + '@codemirror/autocomplete@6.20.4': + resolution: {integrity: sha512-yF8RhOf2SXlg00+qtupzLhrglcas61boqaONiNcbPIebHCpJocpqTBA6dyrtUrQO47hqyTdeob/3XnYilT7TaQ==} + + '@codemirror/commands@6.11.1': + resolution: {integrity: sha512-O/4hG3SC1YwcmQ0d2UVNDs+AsaNWd1iHVxbTeEBuqH+6bExAiPK3iS/BvpY6rZGURALv4ZD3sIgcCmRvw3ehBg==} + + '@codemirror/lang-angular@0.1.4': + resolution: {integrity: sha512-oap+gsltb/fzdlTQWD6BFF4bSLKcDnlxDsLdePiJpCVNKWXSTAbiiQeYI3UmES+BLAdkmIC1WjyztC1pi/bX4g==} + + '@codemirror/lang-cpp@6.0.3': + resolution: {integrity: sha512-URM26M3vunFFn9/sm6rzqrBzDgfWuDixp85uTY49wKudToc2jTHUrKIGGKs+QWND+YLofNNZpxcNGRynFJfvgA==} + + '@codemirror/lang-css@6.3.1': + resolution: {integrity: sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg==} + + '@codemirror/lang-go@6.0.1': + resolution: {integrity: sha512-7fNvbyNylvqCphW9HD6WFnRpcDjr+KXX/FgqXy5H5ZS0eC5edDljukm/yNgYkwTsgp2busdod50AOTIy6Jikfg==} + + '@codemirror/lang-html@6.4.12': + resolution: {integrity: sha512-pw2ReWKUqSkbvh76RAT4NYxiogRu+PWkR2ukAwO9uOgrm8uipkzjtKKtNpyeAQwHOqxEeSvAXZ6vr3AfyB9y/w==} + + '@codemirror/lang-java@6.0.2': + resolution: {integrity: sha512-m5Nt1mQ/cznJY7tMfQTJchmrjdjQ71IDs+55d1GAa8DGaB8JXWsVCkVT284C3RTASaY43YknrK2X3hPO/J3MOQ==} + + '@codemirror/lang-javascript@6.2.5': + resolution: {integrity: sha512-zD4e5mS+50htS7F+TYjBPsiIFGanfVqg4HyUz6WNFikgOPf2BgKlx+TQedI1w6n/IqRBVBbBWmGFdLB/7uxO4A==} + + '@codemirror/lang-jinja@6.0.1': + resolution: {integrity: sha512-P5kyHLObzjtbGj16h+hyvZTxJhSjBEeSx4wMjbnAf3b0uwTy2+F0zGjMZL4PQOm/mh2eGZ5xUDVZXgwP783Nsw==} + + '@codemirror/lang-json@6.0.2': + resolution: {integrity: sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==} + + '@codemirror/lang-less@6.0.2': + resolution: {integrity: sha512-EYdQTG22V+KUUk8Qq582g7FMnCZeEHsyuOJisHRft/mQ+ZSZ2w51NupvDUHiqtsOy7It5cHLPGfHQLpMh9bqpQ==} + + '@codemirror/lang-liquid@6.3.3': + resolution: {integrity: sha512-U9EnyzWuAx1TX3MZSKDXydKH734n1Aogk/ijKdW+jdIwmbf9zSPQYOIKggC/b2PTRjQb7ddvMktmxnfTLuv/SQ==} + + '@codemirror/lang-markdown@6.5.2': + resolution: {integrity: sha512-AwBOdkWYuA//WcM0xO5PfHPUcmz/O2i5o0Nsg1U69SII/loCJlFI1Romd9xp2HYb1kYJRGZotyqRghuHH5n8Kw==} + + '@codemirror/lang-php@6.0.2': + resolution: {integrity: sha512-ZKy2v1n8Fc8oEXj0Th0PUMXzQJ0AIR6TaZU+PbDHExFwdu+guzOA4jmCHS1Nz4vbFezwD7LyBdDnddSJeScMCA==} + + '@codemirror/lang-python@6.2.1': + resolution: {integrity: sha512-IRjC8RUBhn9mGR9ywecNhB51yePWCGgvHfY1lWN/Mrp3cKuHr0isDKia+9HnvhiWNnMpbGhWrkhuWOc09exRyw==} + + '@codemirror/lang-rust@6.0.2': + resolution: {integrity: sha512-EZaGjCUegtiU7kSMvOfEZpaCReowEf3yNidYu7+vfuGTm9ow4mthAparY5hisJqOHmJowVH3Upu+eJlUji6qqA==} + + '@codemirror/lang-sass@6.0.2': + resolution: {integrity: sha512-l/bdzIABvnTo1nzdY6U+kPAC51czYQcOErfzQ9zSm9D8GmNPD0WTW8st/CJwBTPLO8jlrbyvlSEcN20dc4iL0Q==} + + '@codemirror/lang-sql@6.10.0': + resolution: {integrity: sha512-6ayPkEd/yRw0XKBx5uAiToSgGECo/GY2NoJIHXIIQh1EVwLuKoU8BP/qK0qH5NLXAbtJRLuT73hx7P9X34iO4w==} + + '@codemirror/lang-vue@0.1.3': + resolution: {integrity: sha512-QSKdtYTDRhEHCfo5zOShzxCmqKJvgGrZwDQSdbvCRJ5pRLWBS7pD/8e/tH44aVQT6FKm0t6RVNoSUWHOI5vNug==} + + '@codemirror/lang-wast@6.0.2': + resolution: {integrity: sha512-Imi2KTpVGm7TKuUkqyJ5NRmeFWF7aMpNiwHnLQe0x9kmrxElndyH0K6H/gXtWwY6UshMRAhpENsgfpSwsgmC6Q==} + + '@codemirror/lang-xml@6.1.0': + resolution: {integrity: sha512-3z0blhicHLfwi2UgkZYRPioSgVTo9PV5GP5ducFH6FaHy0IAJRg+ixj5gTR1gnT/glAIC8xv4w2VL1LoZfs+Jg==} + + '@codemirror/lang-yaml@6.1.3': + resolution: {integrity: sha512-AZ8DJBuXGVHybpBQhmZtgew5//4hv3tdkXnr3vDmOUMJRuB6vn/uuwtmTOTlqEaQFg3hQSVeA90NmvIQyUV6FQ==} + + '@codemirror/language-data@6.5.2': + resolution: {integrity: sha512-CPkWBKrNS8stYbEU5kwBwTf3JB1kghlbh4FSAwzGW2TEscdeHHH4FGysREW86Mqnj3Qn09s0/6Ea/TutmoTobg==} + + '@codemirror/language@6.13.1': + resolution: {integrity: sha512-zfvU2r3TyylQLMj/te+5CnQ0rSqZi8B1oTCBbQkagcLW4Xc6imab6qN+pEJhsuNOLaJqiRyBXp9UhWA1DhVvDw==} + + '@codemirror/legacy-modes@6.5.5': + resolution: {integrity: sha512-9ltT214oMb3Y1w5eAZMSigzrjzZnMI2Wa3Feq73rU/i4C56MkwrpfswfQYOr28C5pXr6dWwspNTMyeHXlzWMxg==} + + '@codemirror/lint@6.9.7': + resolution: {integrity: sha512-28/+iWLYxKxsvGYhSYL7zaCZqLz5+FFFDq9tVsvGv9kv8RY4fFAchJ5WX9M3YrrRlTIsECjsXPqeNgnSmNP2dg==} + + '@codemirror/state@6.7.6': + resolution: {integrity: sha512-kAz+AncRtKuIknedxT1bq4XwXv4UowhbkHU1myPrtVb/jZtImWuV5BXzv5vK6i3kYACsdiZiQKFQQ5Mq7elW8w==} + + '@codemirror/streamparser@6.0.0': + resolution: {integrity: sha512-JTFPF6xrfjt0mnfGPgzcLiMwYmvIyNaoizp8BYzv8FE8KrT6GBGDZ190rtt+O7Wke3gG/MFHyiY9YGNeimof4w==} + + '@codemirror/view@6.43.15': + resolution: {integrity: sha512-HHsfpqFeHyXLs983pSRe38Xajs0vFWZQ2BuX0m7Ki8w3jZ5iD8cuR3lBz2/5/X53Dhf32SBHKh6rtSTB6tKeGw==} + '@esbuild/aix-ppc64@0.25.12': resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==} engines: {node: '>=18'} @@ -643,6 +757,57 @@ packages: '@jsr/clo__react-markdown@1.1.1': resolution: {integrity: sha512-no2p+01aol5OiHGUwzYGkAKDWWPGpNAlumZezytP+zidXMGSTFChHs7k7j3ILM8SYaTK0HyVg1to4yumyuX97A==, tarball: https://npm.jsr.io/~/11/@jsr/clo__react-markdown/1.1.1.tgz} + '@lezer/common@1.5.5': + resolution: {integrity: sha512-Pw7PVCndruF1pb3ebCxpSVpkMHSDjwRCLcTRw+RizUKco5QbWylwq2g4lnG/RYN7yTTQDXE9F77MwtkAyphrjg==} + + '@lezer/cpp@1.1.6': + resolution: {integrity: sha512-vh9gWWJOXFVY8HBHK3Twzq8MgwG2iN4GSyzBP9sCGTe37P15x2R14VaBQk0VA0ezTRN1KHYBBsHhvpGZ2Xy/pA==} + + '@lezer/css@1.3.9': + resolution: {integrity: sha512-ZmzgvTOBdJWGIsY/ItAfN7UW8DV802oZG+jeG6E508SwEzz5YhuAajptpWPICvIyqYAD2+VjMdOS40GgGkyEOQ==} + + '@lezer/go@1.0.1': + resolution: {integrity: sha512-xToRsYxwsgJNHTgNdStpcvmbVuKxTapV0dM0wey1geMMRc9aggoVyKgzYp41D2/vVOx+Ii4hmE206kvxIXBVXQ==} + + '@lezer/highlight@1.2.5': + resolution: {integrity: sha512-O1GMVKgtf5YspFaRzpmqkVgMtIk2HG9uMAbH6wdAIdNh3TVzCsch/+cRi+6l2//UGDKe6NB9BW3cvuR5ezMQ0w==} + + '@lezer/html@1.3.13': + resolution: {integrity: sha512-oI7n6NJml729m7pjm9lvLvmXbdoMoi2f+1pwSDJkl9d68zGr7a9Btz8NdHTGQZtW2DA25ybeuv/SyDb9D5tseg==} + + '@lezer/java@1.1.5': + resolution: {integrity: sha512-JppTd1iKHpeNlLYw/Zl8JX7zSY5HqAzK4zZ05lpn8l8Sk7Fo5KAKiDiMiezKoT5lfeC2xZf8HeKp1tSctj4G6Q==} + + '@lezer/javascript@1.5.6': + resolution: {integrity: sha512-sEvOqpl4vJQca0NugSQK02vQPbc5KrvoojnYGoqqFgFO0MtcYhwGiHKVEB+LuXYJnfyXo4QPA8ztbrEa4Fw5NA==} + + '@lezer/json@1.0.3': + resolution: {integrity: sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ==} + + '@lezer/lr@1.4.12': + resolution: {integrity: sha512-On9HU4oMMiHPMkQDgoTnGahjgG5n/MkN38CgG77sMraKLL+3JBbeQNi1FcCXV9QRqwF9/BUXP3caHyJC1fBOTQ==} + + '@lezer/markdown@1.8.1': + resolution: {integrity: sha512-M5YmEcKWO4mJ45Y1hECwqyu8cLv25EiXOK554PVOvDOWOP0olwelHHQUWr9sjF+d1bENVhy0nfJ8E57XZUTiXg==} + + '@lezer/php@1.0.6': + resolution: {integrity: sha512-QJ2xNXPmsm/Z3IpThq8fnJrEIVpxhsIoj6GZBW0JYEd/l9zxpJZW216X4fzqQY4vgpdGIumypvI4uQjd4tnYtw==} + + '@lezer/python@1.1.19': + resolution: {integrity: sha512-MhQIURHRytsNzP/YXnqpYKW6la6voAH3kyplTOOiCdjyFY6cWWGFVmYVdHIPrElqSDf4iCDktQCockB9FxuhzQ==} + + '@lezer/rust@1.0.3': + resolution: {integrity: sha512-XxErOjZzQ7yJt1agUT4fu9qQvESZ3acgoxpPaPTPOiUx+duCjaVAtZGFIgphkHxlN05djdVAIOy/wItShMEjqQ==} + + '@lezer/sass@1.1.0': + resolution: {integrity: sha512-3mMGdCTUZ/84ArHOuXWQr37pnf7f+Nw9ycPUeKX+wu19b7pSMcZGLbaXwvD2APMBDOGxPmpK/O6S1v1EvLoqgQ==} + + '@lezer/xml@1.0.6': + resolution: {integrity: sha512-CdDwirL0OEaStFue/66ZmFSeppuL6Dwjlk8qk153mSQwiSH/Dlri4GNymrNWnUmPl2Um7QfV1FO9KFUyX3Twww==} + + '@lezer/yaml@1.0.4': + resolution: {integrity: sha512-2lrrHqxalACEbxIbsjhqGpSW8kWpUKuY6RHgnSAFZa6qK62wvnPxA8hGOwOoDbwHcOFs5M4o27mjGu+P7TvBmw==} + '@lix-js/sdk-darwin-arm64@0.12.3': resolution: {integrity: sha512-YeMJyYGk+QwvQe8O4AAcBMgfNm68IjAGDvuvZHr1U1rIb3GC2kYFStajqf4mT4BGc+cN65/P/2kkqEo+Igu/sA==} cpu: [arm64] @@ -666,6 +831,9 @@ packages: '@lix-js/sdk@0.12.3': resolution: {integrity: sha512-T2194yoZsM2S9kyRmI8UtEJL0fgXYAkeY9jZ/PVyC0K78/wmBvrqOSt9SdvgYxM5qnZ57re3NLOjVlV+X5hWxQ==} + '@marijn/find-cluster-break@1.0.4': + resolution: {integrity: sha512-Wy0V7+SGUjnF9/TkiM1hKVDPj7jKXduPNboMVtHTA8dySMURWqfg/JZ9E2Sq8JgSJmkl7k7Qe9FLeMSrSraWmQ==} + '@napi-rs/canvas-android-arm64@1.0.9': resolution: {integrity: sha512-4LGXk2/0HVzE29K8SzML5WubgCp++B1FH3qgl35XmSZE+lLdr6P9VRQEnZ0MCLZMTSuJP41yyhtoiVNEuvrTIA==} engines: {node: '>= 10'} @@ -1310,6 +1478,9 @@ packages: cookie-es@3.1.1: resolution: {integrity: sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg==} + crelt@1.0.7: + resolution: {integrity: sha512-aK6BbWfhf4U/wCcLHKPJl/xa6VkVstRaPywWtMKGwuOLc/wZTyQYuoxgvZnNsBvv7Kg3YTBQYYBCggcviQczuA==} + csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} @@ -1929,6 +2100,9 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} + style-mod@4.1.4: + resolution: {integrity: sha512-XXWIQt633/EpAFx8aZDOTjBzrCaGmhvEQlQo6MVPfa2OzO2cWo+4hV9h+6UkHYlXGfy+ODXKUdP7Pthmcu5ATw==} + style-to-js@1.1.21: resolution: {integrity: sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==} @@ -2101,6 +2275,9 @@ packages: yaml: optional: true + w3c-keyname@2.2.8: + resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} + warning@4.0.3: resolution: {integrity: sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==} @@ -2289,6 +2466,254 @@ snapshots: optionalDependencies: '@types/react': 19.2.17 + '@codemirror/autocomplete@6.20.4': + dependencies: + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.5 + + '@codemirror/commands@6.11.1': + dependencies: + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.5 + + '@codemirror/lang-angular@0.1.4': + dependencies: + '@codemirror/lang-html': 6.4.12 + '@codemirror/lang-javascript': 6.2.5 + '@codemirror/language': 6.13.1 + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@codemirror/lang-cpp@6.0.3': + dependencies: + '@codemirror/language': 6.13.1 + '@lezer/cpp': 1.1.6 + + '@codemirror/lang-css@6.3.1': + dependencies: + '@codemirror/autocomplete': 6.20.4 + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@lezer/common': 1.5.5 + '@lezer/css': 1.3.9 + + '@codemirror/lang-go@6.0.1': + dependencies: + '@codemirror/autocomplete': 6.20.4 + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@lezer/common': 1.5.5 + '@lezer/go': 1.0.1 + + '@codemirror/lang-html@6.4.12': + dependencies: + '@codemirror/autocomplete': 6.20.4 + '@codemirror/lang-css': 6.3.1 + '@codemirror/lang-javascript': 6.2.5 + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.5 + '@lezer/css': 1.3.9 + '@lezer/html': 1.3.13 + + '@codemirror/lang-java@6.0.2': + dependencies: + '@codemirror/language': 6.13.1 + '@lezer/java': 1.1.5 + + '@codemirror/lang-javascript@6.2.5': + dependencies: + '@codemirror/autocomplete': 6.20.4 + '@codemirror/language': 6.13.1 + '@codemirror/lint': 6.9.7 + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.5 + '@lezer/javascript': 1.5.6 + + '@codemirror/lang-jinja@6.0.1': + dependencies: + '@codemirror/autocomplete': 6.20.4 + '@codemirror/lang-html': 6.4.12 + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@codemirror/lang-json@6.0.2': + dependencies: + '@codemirror/language': 6.13.1 + '@lezer/json': 1.0.3 + + '@codemirror/lang-less@6.0.2': + dependencies: + '@codemirror/lang-css': 6.3.1 + '@codemirror/language': 6.13.1 + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@codemirror/lang-liquid@6.3.3': + dependencies: + '@codemirror/autocomplete': 6.20.4 + '@codemirror/lang-html': 6.4.12 + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@codemirror/lang-markdown@6.5.2': + dependencies: + '@codemirror/autocomplete': 6.20.4 + '@codemirror/lang-html': 6.4.12 + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.5 + '@lezer/markdown': 1.8.1 + + '@codemirror/lang-php@6.0.2': + dependencies: + '@codemirror/lang-html': 6.4.12 + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@lezer/common': 1.5.5 + '@lezer/php': 1.0.6 + + '@codemirror/lang-python@6.2.1': + dependencies: + '@codemirror/autocomplete': 6.20.4 + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@lezer/common': 1.5.5 + '@lezer/python': 1.1.19 + + '@codemirror/lang-rust@6.0.2': + dependencies: + '@codemirror/language': 6.13.1 + '@lezer/rust': 1.0.3 + + '@codemirror/lang-sass@6.0.2': + dependencies: + '@codemirror/lang-css': 6.3.1 + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@lezer/common': 1.5.5 + '@lezer/sass': 1.1.0 + + '@codemirror/lang-sql@6.10.0': + dependencies: + '@codemirror/autocomplete': 6.20.4 + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@codemirror/lang-vue@0.1.3': + dependencies: + '@codemirror/lang-html': 6.4.12 + '@codemirror/lang-javascript': 6.2.5 + '@codemirror/language': 6.13.1 + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@codemirror/lang-wast@6.0.2': + dependencies: + '@codemirror/language': 6.13.1 + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@codemirror/lang-xml@6.1.0': + dependencies: + '@codemirror/autocomplete': 6.20.4 + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.5 + '@lezer/xml': 1.0.6 + + '@codemirror/lang-yaml@6.1.3': + dependencies: + '@codemirror/autocomplete': 6.20.4 + '@codemirror/language': 6.13.1 + '@codemirror/state': 6.7.6 + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + '@lezer/yaml': 1.0.4 + + '@codemirror/language-data@6.5.2': + dependencies: + '@codemirror/lang-angular': 0.1.4 + '@codemirror/lang-cpp': 6.0.3 + '@codemirror/lang-css': 6.3.1 + '@codemirror/lang-go': 6.0.1 + '@codemirror/lang-html': 6.4.12 + '@codemirror/lang-java': 6.0.2 + '@codemirror/lang-javascript': 6.2.5 + '@codemirror/lang-jinja': 6.0.1 + '@codemirror/lang-json': 6.0.2 + '@codemirror/lang-less': 6.0.2 + '@codemirror/lang-liquid': 6.3.3 + '@codemirror/lang-markdown': 6.5.2 + '@codemirror/lang-php': 6.0.2 + '@codemirror/lang-python': 6.2.1 + '@codemirror/lang-rust': 6.0.2 + '@codemirror/lang-sass': 6.0.2 + '@codemirror/lang-sql': 6.10.0 + '@codemirror/lang-vue': 0.1.3 + '@codemirror/lang-wast': 6.0.2 + '@codemirror/lang-xml': 6.1.0 + '@codemirror/lang-yaml': 6.1.3 + '@codemirror/language': 6.13.1 + '@codemirror/legacy-modes': 6.5.5 + + '@codemirror/language@6.13.1': + dependencies: + '@codemirror/state': 6.7.6 + '@codemirror/streamparser': 6.0.0 + '@codemirror/view': 6.43.15 + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + style-mod: 4.1.4 + + '@codemirror/legacy-modes@6.5.5': + dependencies: + '@codemirror/streamparser': 6.0.0 + + '@codemirror/lint@6.9.7': + dependencies: + '@codemirror/state': 6.7.6 + '@codemirror/view': 6.43.15 + crelt: 1.0.7 + + '@codemirror/state@6.7.6': + dependencies: + '@marijn/find-cluster-break': 1.0.4 + + '@codemirror/streamparser@6.0.0': {} + + '@codemirror/view@6.43.15': + dependencies: + '@codemirror/state': 6.7.6 + crelt: 1.0.7 + style-mod: 4.1.4 + w3c-keyname: 2.2.8 + '@esbuild/aix-ppc64@0.25.12': optional: true @@ -2446,6 +2871,99 @@ snapshots: transitivePeerDependencies: - supports-color + '@lezer/common@1.5.5': {} + + '@lezer/cpp@1.1.6': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@lezer/css@1.3.9': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@lezer/go@1.0.1': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@lezer/highlight@1.2.5': + dependencies: + '@lezer/common': 1.5.5 + + '@lezer/html@1.3.13': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@lezer/java@1.1.5': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@lezer/javascript@1.5.6': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@lezer/json@1.0.3': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@lezer/lr@1.4.12': + dependencies: + '@lezer/common': 1.5.5 + + '@lezer/markdown@1.8.1': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + + '@lezer/php@1.0.6': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@lezer/python@1.1.19': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@lezer/rust@1.0.3': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@lezer/sass@1.1.0': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@lezer/xml@1.0.6': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + + '@lezer/yaml@1.0.4': + dependencies: + '@lezer/common': 1.5.5 + '@lezer/highlight': 1.2.5 + '@lezer/lr': 1.4.12 + '@lix-js/sdk-darwin-arm64@0.12.3': optional: true @@ -2467,6 +2985,8 @@ snapshots: '@lix-js/sdk-linux-x64': 0.12.3 '@lix-js/sdk-win32-x64': 0.12.3 + '@marijn/find-cluster-break@1.0.4': {} + '@napi-rs/canvas-android-arm64@1.0.9': optional: true @@ -3017,6 +3537,8 @@ snapshots: cookie-es@3.1.1: {} + crelt@1.0.7: {} + csstype@3.2.3: {} d3-color@3.1.0: {} @@ -3919,6 +4441,8 @@ snapshots: dependencies: ansi-regex: 5.0.1 + style-mod@4.1.4: {} + style-to-js@1.1.21: dependencies: style-to-object: 1.0.14 @@ -4054,6 +4578,8 @@ snapshots: jiti: 2.7.0 lightningcss: 1.32.0 + w3c-keyname@2.2.8: {} + warning@4.0.3: dependencies: loose-envify: 1.4.0 diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 1259f3e91..d10c31130 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -684,7 +684,7 @@ export default function App({ runtime, projectId, pane }: { runtime: RuntimeInfo if (focusWasInPanel) pendingTabFocus.current = rightTabKey(fallback); setRightTab(fallback); } else { - if (focusWasInPanel) bodyRef.current?.querySelector(".chat-pane .composer-input textarea")?.focus(); + if (focusWasInPanel) bodyRef.current?.querySelector(".chat-pane .composer-input .cm-content")?.focus(); closePanel(); setPanelMax(false); } diff --git a/ui/src/agentMessages.ts b/ui/src/agentMessages.ts index fb7006325..7e71d2435 100644 --- a/ui/src/agentMessages.ts +++ b/ui/src/agentMessages.ts @@ -1,6 +1,13 @@ /** A message's ref (`msg_` and the start of its id) or a chat's id, as agents write them. */ export const CITED_ID = /(? `#${cited.slice("msg_".length)}`; diff --git a/ui/src/api.ts b/ui/src/api.ts index c83e52ffb..452e1471e 100644 --- a/ui/src/api.ts +++ b/ui/src/api.ts @@ -1552,6 +1552,8 @@ export interface LocalModelConnection { models: Record; } +export type CitedMessage = { projectId: string | null; sessionId: string; messageId: string; harness: HarnessId | null; preview: string }; + export interface ChatActiveRun { sessionId: string; run: Run; @@ -2462,10 +2464,7 @@ export function createApi( ); /** The message an agent cited by ref: where it lives, the agent that wrote it if one did, and its first words. */ - const citedMessage = (cited: string) => - get<{ projectId: string | null; sessionId: string; messageId: string; harness: HarnessId | null; preview: string }>( - `/api/chat/messages/${encodeURIComponent(cited)}`, - ); + const citedMessage = (cited: string) => get(`/api/chat/messages/${encodeURIComponent(cited)}`); const renameChatSession = (sessionId: string, title: string) => patch<{ session: ChatSession }>(`/api/chat/sessions/${sessionId}`, { title }).then( diff --git a/ui/src/components/ChatLinks.tsx b/ui/src/components/ChatLinks.tsx index b93cf7097..c34128d2e 100644 --- a/ui/src/components/ChatLinks.tsx +++ b/ui/src/components/ChatLinks.tsx @@ -1,4 +1,4 @@ -import { createContext, useContext } from "react"; +import { createContext, useContext, type ReactNode } from "react"; import { MessageSquare } from "lucide-react"; import { useQuery } from "@tanstack/react-query"; @@ -7,6 +7,7 @@ import { useWorkspace } from "../workspace"; import { refLabel } from "../agentMessages"; import { m } from "../paraglide/messages.js"; import { HarnessLogo } from "./HarnessLogo"; +import { LitSourceLogo } from "./LitSourceLogo"; /** What a transcript links to when an agent names a message or chat by id. */ export type ChatLinks = { @@ -18,13 +19,8 @@ export type ChatLinks = { export const ChatLinksContext = createContext(null); function useCitedMessage(cited: string) { - const { citedMessage } = useWorkspace().api; - return useQuery({ - queryKey: ["cited-message", cited], - queryFn: () => citedMessage(cited), - staleTime: Infinity, - retry: false, - }).data; + const { citedMessageQuery } = useWorkspace().queries; + return useQuery(citedMessageQuery(cited)).data; } /** A cited message's first words, for a one-line preview. */ @@ -32,6 +28,33 @@ export function CitedWords({ cited }: { cited: string }) { return {useCitedMessage(cited)?.preview || refLabel(cited)}; } +const PILL_CLASS = "context-pill inline-flex max-w-72 items-center gap-1 rounded-md border border-border-variant bg-panel px-1.5 py-px align-middle text-sm leading-[1.3] text-text [&_svg]:text-subtext"; + +/** A message ref or chat id as a link to it, or `fallback` when nothing here can open it. */ +export function CitedRef({ cited, fallback }: { cited: string; fallback: ReactNode }) { + const links = useContext(ChatLinksContext); + if (!links) return fallback; + if (cited.startsWith("msg_")) return ; + const chat = links.chat(cited); + if (!chat) return fallback; + return ( + + ); +} + +/** A paper a message cites, as a pill linking to its alphaXiv page. */ +export function PaperPill({ title, url }: { title: string; url: string }) { + return ( + + + {title} + + ); +} + /** A cited message as an inline pill: who wrote it and its first words. */ export function MessageRefPill({ cited }: { cited: string }) { const links = useContext(ChatLinksContext); @@ -45,7 +68,7 @@ export function MessageRefPill({ cited }: { cited: string }) { {words} ); - const className = "message-ref inline-flex max-w-72 items-center gap-1 rounded-md border border-border-variant bg-panel px-1.5 py-px align-middle text-sm leading-[1.3] text-text [&_svg]:text-subtext"; + const className = `message-ref ${PILL_CLASS}`; if (!links) return {content}; return ( - - )} - {activeHarness && !activeHarness.agentReady && ( -
- {activeHarness.catalogPending ? ( - {activeHarness.name} — {m.onboarding_checking()} - ) : ( - <> - {activeHarness.name} {m.chat_panel_is_unavailable()}{" "} - {activeHarness.agentNote - ? renderNote(activeHarness.agentNote, onRunSetup && { - canRun: (command) => setupPath(command) !== undefined, - onRun: (command) => { - const path = setupPath(command); - if (path) onRunSetup(command, path); - }, - }) - : m.chat_recheck_setup()} - - )} -
- )} - {skillMenuOpen && ( - - )} - {mentionMenuOpen && ( - - )} - {annotations.length > 0 && ( - { - setAnnotations([]); - window.requestAnimationFrame(() => composerRef.current?.focus()); - }} - onRemove={(id) => { - const remaining = annotations.filter((annotation) => annotation.id !== id); - setAnnotations(remaining); - if (remaining.length === 0) { - window.requestAnimationFrame(() => composerRef.current?.focus()); - } - }} - /> - )} - {attachments.length > 0 && ( -
- {attachments.map((a, i) => { - const remove = () => - setAttachments((cur) => cur.filter((_, j) => j !== i)); - return a.mediaType === "application/pdf" ? ( -
- - {a.name ?? "document.pdf"} - -
+
+
+ {unconfirmedSend !== null && ( + + )} + {activeHarness && !activeHarness.agentReady && ( +
+ {activeHarness.catalogPending ? ( + {activeHarness.name} — {m.onboarding_checking()} ) : ( -
- {m.chat_pasted_image()} - -
- ); - })} -
- )} - {(imageInputError ?? attachError) && ( -
- {imageInputError ?? attachError} -
- )} - {settingsError && ( -
- {settingsError} -
- )} -
-