feat(dsh): adapt to DSH 0.1.5-rc.1 and restore the guide description
Baseline moves to DSH 0.1.5-rc.1 — the 0.1.5 line's first release candidate, and the npm `latest` dist-tag now: peer floor ^0.1.5-rc.1, devDependency pins, the CI mount-lane pin and dsh.plugin.json engines all follow. 0.1.5-alpha.2 users stay on v0.19.0-alpha.1. The upstream delta from alpha.2 is small: 373 changed files, mostly version bumps, sidebar preview polish and test snapshots. Exactly two changes touch this plugin, and only one needs work: - `SidebarRightGuideEntry.description` is back (optional). The native guide renders it only while it lists at most 4 entries; a longer list drops every description. The plugin restores `TabDescriptor.description` and the six built-in `guideDesc*` lines (20 dictionaries) verbatim from 0b6ac5d^, but deliberately does NOT restore the old generic `nativeGuideDesc` fallback: the host has no fallback of its own, so a descriptor that declares none now ships no `description` field at all and renders as a clean title-only capsule. Consequence worth knowing: the plugin contributes six guide entries, so the default composition is over the 4-entry limit and shows titles only. The mount lane proves the restored field end to end by shrinking the enabled set to three types through the plugin's own settings route (scratch profile only) and requiring the Files capsule to grow its line. - The built-in `files` type declares a guide description again and uses a coloured folder glyph; the plugin owns that kind, so nothing to do. Verified unchanged from alpha.2 (so nobody re-checks them): the global main-panel model, the file address grammar (util/workspace-path changed only its package.json), the native tab-body host contract (.paneBody is still a block scroller with a definite height), the core/agent/session/ subagent host APIs and the ui-primitives export surface. Restore caveat fixed in the lane: the settings route merges patches key-wise, so undoing a temporary `tabsEnabled` change by posting the original (empty) map leaves the disabled keys behind — the e2e restores every key it touched explicitly.
This commit is contained in:
@@ -82,6 +82,7 @@ export function builtinTabs(ctx: Context, options: BuiltinTabOptions = {}): read
|
||||
return [
|
||||
{
|
||||
id: 'editor',
|
||||
description: () => t('guideDescFiles'),
|
||||
// The single files window: an editor tab with no path IS the file
|
||||
// explorer (empty hint + docked tree); with a path it previews/edits
|
||||
// the file. Visible in the + menu in the explorer's old slot.
|
||||
@@ -148,6 +149,7 @@ export function builtinTabs(ctx: Context, options: BuiltinTabOptions = {}): read
|
||||
// log, and the git status needs a fetch — both stay out of the badge).
|
||||
id: 'git',
|
||||
title: () => t('changes'),
|
||||
description: () => t('guideDescGit'),
|
||||
icon: (size: number) => <IconDiffOutline16 size={size} />,
|
||||
order: 20,
|
||||
single: true,
|
||||
@@ -170,6 +172,7 @@ export function builtinTabs(ctx: Context, options: BuiltinTabOptions = {}): read
|
||||
{
|
||||
id: 'subagent',
|
||||
title: () => t('subagent'),
|
||||
description: () => t('guideDescSubagent'),
|
||||
icon: (size: number) => <IconThinkOutline16 size={size} />,
|
||||
order: 30,
|
||||
single: true,
|
||||
@@ -198,6 +201,7 @@ export function builtinTabs(ctx: Context, options: BuiltinTabOptions = {}): read
|
||||
{
|
||||
id: 'sidechat',
|
||||
title: () => t('sideChat'),
|
||||
description: () => t('guideDescSidechat'),
|
||||
icon: (size: number) => <IconNewChatOutline16 size={size} />,
|
||||
order: 35,
|
||||
// Codex-style: EVERY side conversation is its own tab. A plain open
|
||||
@@ -243,6 +247,7 @@ export function builtinTabs(ctx: Context, options: BuiltinTabOptions = {}): read
|
||||
{
|
||||
id: 'terminal',
|
||||
title: () => t('terminal'),
|
||||
description: () => t('guideDescTerminal'),
|
||||
icon: (size: number) => <IconTerminalOutline16 size={size} />,
|
||||
order: 40,
|
||||
available: (_ctx, _scope, state) => uiTerminalCount(state) < TERMINAL_LIMIT,
|
||||
@@ -307,6 +312,7 @@ export function builtinTabs(ctx: Context, options: BuiltinTabOptions = {}): read
|
||||
{
|
||||
id: 'browser',
|
||||
title: () => t('browser'),
|
||||
description: () => t('guideDescBrowser'),
|
||||
icon: (size: number) => <IconGlobeOutline16 size={size} />,
|
||||
order: 50,
|
||||
// Declarative settings: the sandbox escape hatch, the link-takeover
|
||||
|
||||
@@ -18,6 +18,12 @@
|
||||
/** The ar dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
|
||||
export const ar: Record<string, string> = {
|
||||
files: 'الملفات',
|
||||
guideDescFiles: 'استعرض شجرة ملفات مساحة العمل؛ انقر للمعاينة أو التحرير',
|
||||
guideDescGit: 'تغييرات Git وتعديلات ملفات هذه الجلسة في تبويب واحد',
|
||||
guideDescSubagent: 'بنية الوكلاء الفرعيين والمهام الخلفية مباشرةً',
|
||||
guideDescSidechat: 'خيط متابعة مستقل يرث سياق هذه الجلسة',
|
||||
guideDescTerminal: 'صدفة حقيقية (xterm + pty) مع إعادة الاتصال',
|
||||
guideDescBrowser: 'متصفح مدمج يمكنه فتح روابط المحادثة',
|
||||
changesSessionEmpty: 'لا توجد عمليات ملفات في هذه الجلسة بعد',
|
||||
changesRead: 'قراءة',
|
||||
changesMdReading: 'قراءة',
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
*/
|
||||
export const de: Record<string, string> = {
|
||||
files: 'Dateien',
|
||||
guideDescFiles: 'Dateibaum des Arbeitsbereichs durchsuchen; Klick öffnet Vorschau oder Editor',
|
||||
guideDescGit: 'Git-Änderungen und Dateiänderungen dieser Sitzung in einem Tab',
|
||||
guideDescSubagent: 'Subagent-Topologie und Hintergrundaufgaben, live',
|
||||
guideDescSidechat: 'Ein unabhängiger Folge-Thread mit dem Kontext dieser Sitzung',
|
||||
guideDescTerminal: 'Eine echte Shell (xterm + pty) mit Wiederverbindung',
|
||||
guideDescBrowser: 'Eingebetteter Browser, der Chat-Links übernehmen kann',
|
||||
changesSessionEmpty: 'Noch keine Dateioperationen in dieser Sitzung',
|
||||
changesRead: 'Lesen',
|
||||
changesMdReading: 'Lesen',
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
/** fr dictionary for the `betterSidebar` namespace. */
|
||||
export const fr: Record<string, string> = {
|
||||
files: 'Fichiers',
|
||||
guideDescFiles: 'Parcourir l\'arborescence du workspace ; un clic ouvre l\'aperçu ou l\'édition',
|
||||
guideDescGit: 'Modifications Git et éditions de cette session dans un seul onglet',
|
||||
guideDescSubagent: 'Topologie des sous-agents et tâches d\'arrière-plan, en direct',
|
||||
guideDescSidechat: 'Un fil de suivi indépendant héritant du contexte de cette session',
|
||||
guideDescTerminal: 'Un vrai shell (xterm + pty) avec reconnexion',
|
||||
guideDescBrowser: 'Navigateur intégré, qui peut reprendre les liens du chat',
|
||||
changesSessionEmpty: 'Aucune opération de fichier dans cette session',
|
||||
changesRead: 'Lecture',
|
||||
changesMdReading: 'Lecture',
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
/** The hi dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
|
||||
export const hi: Record<string, string> = {
|
||||
files: 'फ़ाइलें',
|
||||
guideDescFiles: 'वर्कस्पेस फ़ाइल ट्री देखें; क्लिक करने पर प्रीव्यू या संपादन खुलता है',
|
||||
guideDescGit: 'Git बदलाव और इस सत्र के फ़ाइल बदलाव एक ही टैब में',
|
||||
guideDescSubagent: 'सबएजेंट टोपोलॉजी और बैकग्राउंड कार्य, लाइव',
|
||||
guideDescSidechat: 'इस सत्र का संदर्भ विरासत में लेने वाला स्वतंत्र फ़ॉलो-अप थ्रेड',
|
||||
guideDescTerminal: 'असली शेल (xterm + pty), रीकनेक्ट सहित',
|
||||
guideDescBrowser: 'अंतर्निहित ब्राउज़र, चैट के लिंक भी खोल सकता है',
|
||||
changesSessionEmpty: 'इस सत्र में अभी कोई फ़ाइल ऑपरेशन नहीं',
|
||||
changesRead: 'पढ़ना',
|
||||
changesMdReading: 'पठन',
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
|
||||
export const id: Record<string, string> = {
|
||||
files: 'Berkas',
|
||||
guideDescFiles: 'Telusuri pohon berkas workspace; klik untuk pratinjau atau edit',
|
||||
guideDescGit: 'Perubahan Git dan perubahan berkas sesi ini dalam satu tab',
|
||||
guideDescSubagent: 'Topologi subagent dan tugas latar belakang, langsung',
|
||||
guideDescSidechat: 'Utas lanjutan independen yang mewarisi konteks sesi ini',
|
||||
guideDescTerminal: 'Shell sungguhan (xterm + pty), bisa menyambung ulang',
|
||||
guideDescBrowser: 'Peramban tertanam, bisa mengambil alih tautan chat',
|
||||
changesSessionEmpty: 'Belum ada operasi file di sesi ini',
|
||||
changesRead: 'Baca',
|
||||
changesMdReading: 'Baca',
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
|
||||
export const it: Record<string, string> = {
|
||||
files: 'File',
|
||||
guideDescFiles: 'Sfoglia l\'albero del workspace; un clic apre anteprima o editor',
|
||||
guideDescGit: 'Modifiche Git e modifiche ai file di questa sessione in un solo tab',
|
||||
guideDescSubagent: 'Topologia dei subagent e attività in background, in tempo reale',
|
||||
guideDescSidechat: 'Un thread di approfondimento indipendente che eredita il contesto della sessione',
|
||||
guideDescTerminal: 'Una vera shell (xterm + pty) con riconnessione',
|
||||
guideDescBrowser: 'Browser integrato, può aprire i link della chat',
|
||||
changesSessionEmpty: 'Ancora nessuna operazione sui file in questa sessione',
|
||||
changesRead: 'Lettura',
|
||||
changesMdReading: 'Lettura',
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
/** The ja dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
|
||||
export const ja: Record<string, string> = {
|
||||
files: 'ファイル',
|
||||
guideDescFiles: 'ワークスペースのファイルツリーを閲覧し、クリックでプレビュー/編集',
|
||||
guideDescGit: 'Git の変更と今回のセッションのファイル変更を 1 つのタブに',
|
||||
guideDescSubagent: 'サブエージェントの構成とバックグラウンドタスクをリアルタイム表示',
|
||||
guideDescSidechat: '現在のセッションの文脈を引き継ぐ独立した追加スレッド',
|
||||
guideDescTerminal: '本物のシェル(xterm + pty)、再接続対応',
|
||||
guideDescBrowser: '埋め込みブラウザ。チャット内のリンクも引き受け可能',
|
||||
changesSessionEmpty: 'このセッションにはファイル操作がまだありません',
|
||||
changesRead: '読み取り',
|
||||
changesMdReading: '閲覧',
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
|
||||
export const ko: Record<string, string> = {
|
||||
files: '파일',
|
||||
guideDescFiles: '워크스페이스 파일 트리를 보고 클릭하면 미리보기/편집',
|
||||
guideDescGit: 'Git 변경 사항과 이번 세션의 파일 변경을 한 탭에서',
|
||||
guideDescSubagent: '하위 에이전트 구조와 백그라운드 작업을 실시간으로',
|
||||
guideDescSidechat: '현재 세션의 컨텍스트를 이어받는 독립 후속 스레드',
|
||||
guideDescTerminal: '실제 셸(xterm + pty), 재연결 지원',
|
||||
guideDescBrowser: '내장 브라우저, 채팅 링크도 대신 열 수 있음',
|
||||
changesSessionEmpty: '이 세션에 아직 파일 작업이 없습니다',
|
||||
changesRead: '읽기',
|
||||
changesMdReading: '읽기',
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
*/
|
||||
export const nl: Record<string, string> = {
|
||||
files: 'Bestanden',
|
||||
guideDescFiles: 'Blader door de bestandsboom van de workspace; klik opent voorbeeld of editor',
|
||||
guideDescGit: 'Git-wijzigingen en bestandswijzigingen van deze sessie in één tabblad',
|
||||
guideDescSubagent: 'Subagent-topologie en achtergrondtaken, live',
|
||||
guideDescSidechat: 'Een onafhankelijke vervolgthread met de context van deze sessie',
|
||||
guideDescTerminal: 'Een echte shell (xterm + pty) met herverbinding',
|
||||
guideDescBrowser: 'Ingebouwde browser die chatlinks kan overnemen',
|
||||
changesSessionEmpty: 'Nog geen bestandsbewerkingen in deze sessie',
|
||||
changesRead: 'Lezen',
|
||||
changesMdReading: 'Lezen',
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
/** The pl dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
|
||||
export const pl: Record<string, string> = {
|
||||
files: 'Pliki',
|
||||
guideDescFiles: 'Przeglądaj drzewo plików obszaru roboczego; klik otwiera podgląd lub edycję',
|
||||
guideDescGit: 'Zmiany Git i zmiany plików z tej sesji w jednej karcie',
|
||||
guideDescSubagent: 'Topologia subagentów i zadania w tle na żywo',
|
||||
guideDescSidechat: 'Niezależny wątek uzupełniający dziedziczący kontekst tej sesji',
|
||||
guideDescTerminal: 'Prawdziwy shell (xterm + pty) z ponownym łączeniem',
|
||||
guideDescBrowser: 'Wbudowana przeglądarka, może przejmować linki z czatu',
|
||||
changesSessionEmpty: 'Brak operacji na plikach w tej sesji',
|
||||
changesRead: 'Odczyt',
|
||||
changesMdReading: 'Czytanie',
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
export const pt: Record<string, string> = {
|
||||
files: 'Arquivos',
|
||||
guideDescFiles: 'Navegue pela árvore do workspace; um clique abre a pré-visualização ou a edição',
|
||||
guideDescGit: 'Alterações do Git e edições desta sessão em um único separador',
|
||||
guideDescSubagent: 'Topologia de subagentes e tarefas em segundo plano, ao vivo',
|
||||
guideDescSidechat: 'Uma conversa paralela independente que herda o contexto desta sessão',
|
||||
guideDescTerminal: 'Um shell real (xterm + pty) com reconexão',
|
||||
guideDescBrowser: 'Navegador incorporado, que pode abrir links do chat',
|
||||
changesSessionEmpty: 'Ainda sem operações de arquivo nesta sessão',
|
||||
changesRead: 'Leitura',
|
||||
changesMdReading: 'Leitura',
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
|
||||
export const ru: Record<string, string> = {
|
||||
files: 'Файлы',
|
||||
guideDescFiles: 'Дерево файлов рабочей области: клик открывает просмотр или редактор',
|
||||
guideDescGit: 'Изменения Git и правки файлов этой сессии в одной вкладке',
|
||||
guideDescSubagent: 'Топология субагентов и фоновые задачи в реальном времени',
|
||||
guideDescSidechat: 'Независимый дополнительный тред с контекстом этой сессии',
|
||||
guideDescTerminal: 'Настоящий shell (xterm + pty) с переподключением',
|
||||
guideDescBrowser: 'Встроенный браузер, перехватывает ссылки из чата',
|
||||
changesSessionEmpty: 'В этой сессии пока нет файловых операций',
|
||||
changesRead: 'Чтение',
|
||||
changesMdReading: 'Чтение',
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
export const sv: Record<string, string> = {
|
||||
files: 'Filer',
|
||||
guideDescFiles: 'Bläddra i arbetsytans filträd; klick öppnar förhandsvisning eller redigering',
|
||||
guideDescGit: 'Git-ändringar och sessionens filändringar i en flik',
|
||||
guideDescSubagent: 'Subagenttopologi och bakgrundsjobb, live',
|
||||
guideDescSidechat: 'En oberoende uppföljningstråd som ärver sessionens kontext',
|
||||
guideDescTerminal: 'Ett riktigt skal (xterm + pty) med återanslutning',
|
||||
guideDescBrowser: 'Inbäddad webbläsare som kan ta över chattlänkar',
|
||||
changesSessionEmpty: 'Inga filoperationer i den här sessionen ännu',
|
||||
changesRead: 'Läs',
|
||||
changesMdReading: 'Läsning',
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
/** The th dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
|
||||
export const th: Record<string, string> = {
|
||||
files: 'ไฟล์',
|
||||
guideDescFiles: 'เรียกดูแผนผังไฟล์ของเวิร์กสเปซ คลิกเพื่อดูตัวอย่างหรือแก้ไข',
|
||||
guideDescGit: 'การเปลี่ยนแปลง Git และไฟล์ที่แก้ในเซสชันนี้ในแท็บเดียว',
|
||||
guideDescSubagent: 'โครงสร้างซับเอเจนต์และงานเบื้องหลังแบบเรียลไทม์',
|
||||
guideDescSidechat: 'เธรดถามต่ออิสระที่สืบทอดบริบทของเซสชันนี้',
|
||||
guideDescTerminal: 'เชลล์จริง (xterm + pty) เชื่อมต่อใหม่ได้',
|
||||
guideDescBrowser: 'เบราว์เซอร์ในตัว รับช่วงลิงก์จากแชทได้',
|
||||
changesSessionEmpty: 'ยังไม่มีการดำเนินการไฟล์ในเซสชันนี้',
|
||||
changesRead: 'อ่าน',
|
||||
changesMdReading: 'อ่าน',
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
/** The tr dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
|
||||
export const tr: Record<string, string> = {
|
||||
files: 'Dosyalar',
|
||||
guideDescFiles: 'Çalışma alanı dosya ağacına göz atın; tıklayınca önizleme veya düzenleme açılır',
|
||||
guideDescGit: 'Git değişiklikleri ve bu oturumun dosya değişiklikleri tek sekmede',
|
||||
guideDescSubagent: 'Alt ajan topolojisi ve arka plan görevleri, canlı',
|
||||
guideDescSidechat: 'Bu oturumun bağlamını devralan bağımsız bir yan konu',
|
||||
guideDescTerminal: 'Gerçek bir shell (xterm + pty), yeniden bağlanma destekli',
|
||||
guideDescBrowser: 'Sohbet bağlantılarını devralabilen gömülü tarayıcı',
|
||||
changesSessionEmpty: 'Bu oturumda henüz dosya işlemi yok',
|
||||
changesRead: 'Okuma',
|
||||
changesMdReading: 'Okuma',
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
/** The vi dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
|
||||
export const vi: Record<string, string> = {
|
||||
files: 'Tệp',
|
||||
guideDescFiles: 'Duyệt cây tệp của workspace; bấm để xem trước hoặc chỉnh sửa',
|
||||
guideDescGit: 'Thay đổi Git và thay đổi tệp của phiên này trong một tab',
|
||||
guideDescSubagent: 'Sơ đồ subagent và tác vụ nền, theo thời gian thực',
|
||||
guideDescSidechat: 'Luồng hỏi tiếp độc lập kế thừa ngữ cảnh của phiên này',
|
||||
guideDescTerminal: 'Shell thật (xterm + pty), tự kết nối lại',
|
||||
guideDescBrowser: 'Trình duyệt nhúng, có thể mở link trong chat',
|
||||
changesSessionEmpty: 'Chưa có thao tác tệp nào trong phiên này',
|
||||
changesRead: 'Đọc',
|
||||
changesMdReading: 'Đọc',
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
/** The zh-HK dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
|
||||
export const zhHK: Record<string, string> = {
|
||||
files: '檔案',
|
||||
guideDescFiles: '瀏覽工作區檔案樹,點開即可預覽或編輯',
|
||||
guideDescGit: 'Git 變更與本輪檔案改動,雙視角合一',
|
||||
guideDescSubagent: '子代理拓撲與背景任務,即時狀態',
|
||||
guideDescSidechat: '繼承目前工作階段上下文的獨立追問執行緒',
|
||||
guideDescTerminal: '真實 shell 終端(xterm + pty),斷線重連',
|
||||
guideDescBrowser: '內嵌網頁瀏覽器,可接管聊天中的外鏈',
|
||||
changesSessionEmpty: '本工作階段還沒有檔案操作',
|
||||
changesRead: '讀取',
|
||||
changesMdReading: '閱讀',
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
/** The zh-HK dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
|
||||
export const zhMO: Record<string, string> = {
|
||||
files: '檔案',
|
||||
guideDescFiles: '瀏覽工作區檔案樹,點開即可預覽或編輯',
|
||||
guideDescGit: 'Git 變更與本輪檔案改動,雙視角合一',
|
||||
guideDescSubagent: '子代理拓撲與背景任務,即時狀態',
|
||||
guideDescSidechat: '繼承目前工作階段上下文的獨立追問執行緒',
|
||||
guideDescTerminal: '真實 shell 終端(xterm + pty),斷線重連',
|
||||
guideDescBrowser: '內嵌網頁瀏覽器,可接管聊天中的外鏈',
|
||||
changesSessionEmpty: '本工作階段還沒有檔案操作',
|
||||
changesRead: '讀取',
|
||||
changesMdReading: '閱讀',
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
/** The zh-HK dictionary (key-set-equal to zh, enforced by the type annotation in locales.ts). */
|
||||
export const zhTW: Record<string, string> = {
|
||||
files: '檔案',
|
||||
guideDescFiles: '瀏覽工作區檔案樹,點開即可預覽或編輯',
|
||||
guideDescGit: 'Git 變更與本輪檔案改動,雙視角合一',
|
||||
guideDescSubagent: '子代理拓撲與背景任務,即時狀態',
|
||||
guideDescSidechat: '繼承目前工作階段上下文的獨立追問執行緒',
|
||||
guideDescTerminal: '真實 shell 終端(xterm + pty),斷線重連',
|
||||
guideDescBrowser: '內嵌網頁瀏覽器,可接管聊天中的外鏈',
|
||||
changesSessionEmpty: '本作業階段還沒有檔案操作',
|
||||
changesRead: '讀取',
|
||||
changesMdReading: '閱讀',
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
/** The zh dictionary (also registered into the DSH locale registry under {@link LOCALE_NS}). */
|
||||
export const zh = {
|
||||
files: '文件',
|
||||
guideDescFiles: '浏览工作区文件树,点开即预览或编辑',
|
||||
guideDescGit: 'Git 变更与本轮文件改动,双视角合一',
|
||||
guideDescSubagent: '子代理拓扑与后台任务,实时状态',
|
||||
guideDescSidechat: '继承当前会话上下文的独立追问线程',
|
||||
guideDescTerminal: '真实 shell 终端(xterm + pty),断线重连',
|
||||
guideDescBrowser: '内嵌网页浏览器,可接管聊天里的外链',
|
||||
changesSessionEmpty: '本会话还没有文件操作',
|
||||
changesRead: '读取',
|
||||
changesMdReading: '阅读',
|
||||
@@ -458,6 +464,12 @@ export const zh = {
|
||||
/** The en dictionary (key-set-equal to zh, enforced by the type annotation). */
|
||||
export const en: Record<keyof typeof zh, string> = {
|
||||
files: 'Files',
|
||||
guideDescFiles: 'Browse the workspace tree; click a file to preview or edit',
|
||||
guideDescGit: 'Git changes and this session\'s file edits, in one tab',
|
||||
guideDescSubagent: 'Subagent topology and background jobs, live',
|
||||
guideDescSidechat: 'An independent follow-up thread inheriting this session\'s context',
|
||||
guideDescTerminal: 'A real shell (xterm + pty) with reconnect',
|
||||
guideDescBrowser: 'An embedded browser that can take over chat links',
|
||||
changesSessionEmpty: 'No file operations in this session yet',
|
||||
changesRead: 'Read',
|
||||
changesMdReading: 'Reading',
|
||||
|
||||
@@ -43,7 +43,7 @@ interface NativeTabRegistry {
|
||||
priority?: 'extension' | 'builtin' | 'fallback'
|
||||
canOpen?: (address: string) => boolean
|
||||
title: (address: string) => string
|
||||
guide?: readonly { order: number; title: () => string; icon?: unknown }[]
|
||||
guide?: readonly { order: number; title: () => string; description?: () => string; icon?: unknown }[]
|
||||
}): () => void
|
||||
}
|
||||
|
||||
@@ -63,6 +63,21 @@ function titleOf(descriptor: TabDescriptor): string {
|
||||
return typeof descriptor.title === 'function' ? descriptor.title() : descriptor.title
|
||||
}
|
||||
|
||||
/**
|
||||
* The guide fields carrying the descriptor's own description line, evaluated
|
||||
* fresh for the current locale. DSH 0.1.5-rc.1 renders `description` only
|
||||
* while the guide lists at most 4 entries, and a descriptor that declares
|
||||
* none must reach the host with NO `description` field at all — the host has
|
||||
* no fallback of its own, so an empty string would render as a blank second
|
||||
* line rather than a clean title-only capsule.
|
||||
* @param descriptor - the tab descriptor owning the guide entry.
|
||||
* @returns the `description` field, or an empty object.
|
||||
*/
|
||||
function guideDescriptionOf(descriptor: TabDescriptor | undefined): { description?: () => string } {
|
||||
const description = descriptor?.description
|
||||
return description === undefined ? {} : { description: () => (typeof description === 'function' ? description() : description) }
|
||||
}
|
||||
|
||||
/**
|
||||
* The guide row's glyph for a descriptor icon (nothing when it has none).
|
||||
* The native guide renders `entry.icon`, so a takeover registered without one
|
||||
@@ -181,6 +196,7 @@ export function registerNativeSurface(deps: NativeSurfaceDeps): () => void {
|
||||
guide: [{
|
||||
order: descriptor.order ?? 100,
|
||||
title: () => titleOf(descriptor),
|
||||
...guideDescriptionOf(descriptor),
|
||||
...guideIconOf(icon),
|
||||
}],
|
||||
}),
|
||||
@@ -208,8 +224,9 @@ export function registerNativeSurface(deps: NativeSurfaceDeps): () => void {
|
||||
order: 10,
|
||||
title: () => t('files'),
|
||||
// The takeover IS the editor descriptor's page, so it carries the
|
||||
// editor's glyph: without it the "Files" row is the only guide
|
||||
// entry with an empty icon slot.
|
||||
// editor's glyph AND guide line: without them the "Files" row is
|
||||
// the only guide entry with a blank icon slot and no description.
|
||||
...guideDescriptionOf(editor),
|
||||
...guideIconOf(editor?.icon),
|
||||
}],
|
||||
})
|
||||
|
||||
+12
-1
@@ -162,6 +162,17 @@ export interface TabDescriptor {
|
||||
/** Unique id; also the `SidebarTab.type` value (`'explorer'`, `'my-plugin:db'`). */
|
||||
id: string
|
||||
title: string | (() => string)
|
||||
/**
|
||||
* One-line description of what this tab shows, rendered under the title in
|
||||
* the host's new-tab list (DSH's native right Sidebar guide page). DSH
|
||||
* 0.1.5-rc.1 renders descriptions only while the guide lists at most 4
|
||||
* entries — a longer list drops every description and shows titles alone —
|
||||
* and a descriptor that declares none renders the title by itself (the
|
||||
* host no longer substitutes a generic fallback, so declare the real
|
||||
* purpose of the page). Evaluated at render time, so a function follows
|
||||
* the active locale.
|
||||
*/
|
||||
description?: string | (() => string)
|
||||
icon?: ReactNode | ((size: number) => ReactNode)
|
||||
/** + menu sort order (ascending); default 100. */
|
||||
order?: number
|
||||
@@ -518,7 +529,7 @@ export function matchUrlTarget(tabs: readonly TabDescriptor[], url: URL): TabDes
|
||||
* The plugin version this service instance reports. Keep in lockstep with
|
||||
* `package.json`'s version — `tests/service.spec.ts` asserts the pair.
|
||||
*/
|
||||
export const SIDEBAR_SERVICE_VERSION = '0.19.0-alpha.1'
|
||||
export const SIDEBAR_SERVICE_VERSION = '0.19.0'
|
||||
|
||||
/**
|
||||
* Monotonic capability list consumers use to gate new API usage (features
|
||||
|
||||
Reference in New Issue
Block a user