@dungsil/dsh-plugin-ui-sidebar-inbox 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dungsil
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/client.js CHANGED
@@ -560,20 +560,62 @@ function installSortOption(options) {
560
560
  }
561
561
  };
562
562
  }
563
+ // locale/ja.json
564
+ var ui$5 = {
565
+ "heading.working": "作業中",
566
+ "heading.archived": "アーカイブ済み",
567
+ "sort.agentActivity": "エージェントの活動"
568
+ };
569
+ // locale/es.json
570
+ var ui$4 = {
571
+ "heading.working": "En curso",
572
+ "heading.archived": "Archivadas",
573
+ "sort.agentActivity": "Actividad del agente"
574
+ };
575
+ // locale/fr.json
576
+ var ui$3 = {
577
+ "heading.working": "En cours",
578
+ "heading.archived": "Archivées",
579
+ "sort.agentActivity": "Activité de l’agent"
580
+ };
581
+ // locale/de.json
582
+ var ui$2 = {
583
+ "heading.working": "In Arbeit",
584
+ "heading.archived": "Archiviert",
585
+ "sort.agentActivity": "Agentenaktivität"
586
+ };
587
+ // locale/ru.json
588
+ var ui$1 = {
589
+ "heading.working": "В работе",
590
+ "heading.archived": "Архивные",
591
+ "sort.agentActivity": "Активность агента"
592
+ };
593
+ // locale/pt.json
594
+ var ui = {
595
+ "heading.working": "Em andamento",
596
+ "heading.archived": "Arquivadas",
597
+ "sort.agentActivity": "Atividade do agente"
598
+ };
563
599
  // src/locale.ts
564
600
  /** Dictionary namespace owned by this plugin, registered into the DSH locale service. */
565
601
  const NS = "dungsil-sidebar-inbox";
566
- /** English copy; also the fallback every other language resolves against. */
567
- const en = {
568
- "heading.working": "Working",
569
- "heading.archived": "Archived",
570
- "sort.agentActivity": "Agent activity"
571
- };
572
- /** Korean copy, shipped with the plugin so the Korean UI language pack is optional. */
573
- const ko = {
574
- "heading.working": "작업 중",
575
- "heading.archived": "보관됨",
576
- "sort.agentActivity": "에이전트 활동"
602
+ const dictionaries = {
603
+ en: {
604
+ "heading.working": "Working",
605
+ "heading.archived": "Archived",
606
+ "sort.agentActivity": "Agent activity"
607
+ },
608
+ ko: {
609
+ "heading.working": "작업 중",
610
+ "heading.archived": "보관됨",
611
+ "sort.agentActivity": "에이전트 활동"
612
+ },
613
+ ja: ui$5,
614
+ es: ui$4,
615
+ fr: ui$3,
616
+ de: ui$2,
617
+ ru: ui$1,
618
+ pt: ui
577
619
  };
578
620
  // src/client.ts
579
621
  const name = "dungsil-sidebar-inbox";
@@ -592,8 +634,10 @@ const FLAT_ORDER = "__flat_session_order__";
592
634
  * order is what the sidebar renders while this mode is selected.
593
635
  */
594
636
  const AGENT_ACTIVITY = "agent-activity";
595
- /** Remembers the native sort; its presence also marks first-use setup complete. */
637
+ /** Native fallback used while the plugin is unavailable. */
596
638
  const PREVIOUS_SORT_KEY = "dungsil.sidebar-inbox.sort.v1";
639
+ /** Separate from the fallback: teardown must not overwrite the user's choice. */
640
+ const SELECTED_SORT_KEY = "dungsil.sidebar-inbox.selected-sort.v1";
597
641
  function isAgentActivity(orderBy) {
598
642
  return String(orderBy) === AGENT_ACTIVITY;
599
643
  }
@@ -612,9 +656,12 @@ function writePreviousSort(mode) {
612
656
  }
613
657
  /** Keep native React rows, search, menus, selection and keyboard order intact. */
614
658
  function apply(ctx) {
615
- ctx.effect(() => ctx.locale.register(NS, "en", en), "sidebar-inbox: English copy");
616
- ctx.effect(() => ctx.locale.register(NS, "ko", ko), "sidebar-inbox: Korean copy");
617
- const translate = ctx.locale.bind(NS);
659
+ for (const [language, dictionary] of Object.entries(dictionaries)) ctx.effect(() => ctx.locale.register(NS, language, dictionary), `sidebar-inbox: ${language} copy`);
660
+ const bound = ctx.locale.bind(NS);
661
+ const translate = (key) => {
662
+ const base = ctx.locale.getSnapshot().active.toLowerCase().split(/[-_]/)[0];
663
+ return Object.hasOwn(dictionaries, base) ? dictionaries[base][key] : bound(key);
664
+ };
618
665
  let placements = /* @__PURE__ */ new Map();
619
666
  let view;
620
667
  let refreshHeadings = () => {};
@@ -664,19 +711,31 @@ function apply(ctx) {
664
711
  const entry = ctx.slots.entries("sidebar.workspaces").find((candidate) => candidate.registrant === "@deepseek-ai/dsh-client-ui-workspace") ?? ctx.slots.entries("sidebar.workspaces").find((candidate) => (candidate.options.priority ?? 0) === 0);
665
712
  if (!entry?.store || typeof entry.store === "function") throw new Error("Sidebar Inbox requires the DSH 0.2.1 workspace view store");
666
713
  view = entry.store.create();
714
+ const current = view.getSnapshot();
715
+ let selectedSort = null;
716
+ let hasPreviousSort = false;
667
717
  try {
668
- if (localStorage.getItem(PREVIOUS_SORT_KEY) === null && !isActive()) {
669
- const current = view.getSnapshot();
670
- if (current.orderBy === "manual" || current.orderBy === "updated") {
671
- localStorage.setItem(PREVIOUS_SORT_KEY, current.orderBy);
672
- view.store.set({
673
- ...current,
674
- groupBy: "flat",
675
- orderBy: AGENT_ACTIVITY
676
- });
677
- }
678
- }
718
+ selectedSort = localStorage.getItem(SELECTED_SORT_KEY);
719
+ hasPreviousSort = localStorage.getItem(PREVIOUS_SORT_KEY) !== null;
679
720
  } catch {}
721
+ const initialSort = selectedSort === AGENT_ACTIVITY || selectedSort === "manual" || selectedSort === "updated" ? selectedSort : isAgentActivity(current.orderBy) || !hasPreviousSort ? AGENT_ACTIVITY : current.orderBy;
722
+ if (initialSort === AGENT_ACTIVITY && !isAgentActivity(current.orderBy)) {
723
+ if (current.orderBy === "manual" || current.orderBy === "updated") writePreviousSort(current.orderBy);
724
+ }
725
+ const rememberSelection = () => {
726
+ const mode = String(view.getSnapshot().orderBy);
727
+ if (mode === selectedSort) return;
728
+ try {
729
+ localStorage.setItem(SELECTED_SORT_KEY, mode);
730
+ selectedSort = mode;
731
+ } catch {}
732
+ };
733
+ view.store.set({
734
+ ...current,
735
+ ...initialSort === AGENT_ACTIVITY ? { groupBy: "flat" } : {},
736
+ orderBy: initialSort
737
+ });
738
+ rememberSelection();
680
739
  const headings = installHeadings(() => placements, () => ({
681
740
  working: translate("heading.working"),
682
741
  archived: translate("heading.archived")
@@ -694,6 +753,7 @@ function apply(ctx) {
694
753
  ...view.getSnapshot(),
695
754
  orderBy: readPreviousSort()
696
755
  });
756
+ rememberSelection();
697
757
  reconcile();
698
758
  };
699
759
  const disposers = [
package/locale/de.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "meta": {
3
+ "title": "Seitenleisten-Posteingang",
4
+ "description": "Ergänzt die nativen Ansichtsoptionen um die Sortierung nach Agentenaktivität. In der Einzelliste werden Sitzungen damit nach Posteingang, in Arbeit und archiviert geordnet; in DSH archivierte Sitzungen werden unten in der Ansicht aller Gespräche eingeklappt."
5
+ },
6
+ "ui": {
7
+ "heading.working": "In Arbeit",
8
+ "heading.archived": "Archiviert",
9
+ "sort.agentActivity": "Agentenaktivität"
10
+ }
11
+ }
package/locale/es.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "meta": {
3
+ "title": "Bandeja de entrada lateral",
4
+ "description": "Añade el orden por actividad del agente a las opciones de vista nativas. Al seleccionarlo en la lista única, las sesiones se ordenan por bandeja de entrada, en curso y archivadas; las sesiones archivadas en DSH se pliegan al final de la vista de todas las conversaciones."
5
+ },
6
+ "ui": {
7
+ "heading.working": "En curso",
8
+ "heading.archived": "Archivadas",
9
+ "sort.agentActivity": "Actividad del agente"
10
+ }
11
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "meta": {
3
+ "title": "Boîte de réception latérale",
4
+ "description": "Ajoute le tri par activité de l’agent aux options d’affichage natives. Lorsqu’il est sélectionné dans la liste unique, les sessions sont classées en réception, en cours et archivées ; les sessions archivées dans DSH sont repliées en bas de la vue de toutes les conversations."
5
+ },
6
+ "ui": {
7
+ "heading.working": "En cours",
8
+ "heading.archived": "Archivées",
9
+ "sort.agentActivity": "Activité de l’agent"
10
+ }
11
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "meta": {
3
+ "title": "サイドバー受信箱",
4
+ "description": "標準の表示オプションに「エージェントの活動」順を追加します。単一リストで選択すると、セッションは受信箱、作業中、アーカイブ済みの順に並びます。DSH でアーカイブしたセッションは、すべての会話の一覧の下部に折りたたまれます。"
5
+ },
6
+ "ui": {
7
+ "heading.working": "作業中",
8
+ "heading.archived": "アーカイブ済み",
9
+ "sort.agentActivity": "エージェントの活動"
10
+ }
11
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "meta": {
3
+ "title": "Caixa de entrada lateral",
4
+ "description": "Adiciona a ordenação por atividade do agente às opções de visualização nativas. Quando selecionada na lista única, as sessões são ordenadas por caixa de entrada, em andamento e arquivadas; as sessões arquivadas no DSH são recolhidas no fim da visualização de todas as conversas."
5
+ },
6
+ "ui": {
7
+ "heading.working": "Em andamento",
8
+ "heading.archived": "Arquivadas",
9
+ "sort.agentActivity": "Atividade do agente"
10
+ }
11
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "meta": {
3
+ "title": "Входящие на боковой панели",
4
+ "description": "Добавляет сортировку по активности агента в стандартные параметры вида. При её выборе в едином списке сеансы упорядочиваются по группам «Входящие», «В работе» и «Архивные»; сеансы, архивированные в DSH, сворачиваются внизу списка всех бесед."
5
+ },
6
+ "ui": {
7
+ "heading.working": "В работе",
8
+ "heading.archived": "Архивные",
9
+ "sort.agentActivity": "Активность агента"
10
+ }
11
+ }
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@dungsil/dsh-plugin-ui-sidebar-inbox",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "description": "State-based Inbox, Working and Archived sidebar ordering for DeepSeek Harness, selected from a native Agent activity sort option.",
5
+ "license": "MIT",
5
6
  "repository": {
6
7
  "type": "git",
7
8
  "url": "git+https://github.com/dungsil/dsh-plugins.git",
@@ -25,16 +26,16 @@
25
26
  },
26
27
  "devDependencies": {
27
28
  "@deepseek-ai/cordis": "4.1.0",
28
- "@deepseek-ai/dsh-api-session-controller": "0.2.2-rc.1",
29
- "@deepseek-ai/dsh-api-workspace-controller": "0.2.2-rc.1",
30
- "@deepseek-ai/dsh-client-locale": "0.2.2-rc.1",
31
- "@deepseek-ai/dsh-client-store": "0.2.2-rc.1",
32
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.1",
33
- "@deepseek-ai/dsh-client-ui-session": "0.2.2-rc.1",
34
- "@deepseek-ai/dsh-client-ui-sidebar": "0.2.2-rc.1",
35
- "@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.1",
36
- "@deepseek-ai/dsh-client-ui-workspace": "0.2.2-rc.1",
37
- "@deepseek-ai/dsh-session": "0.2.2-rc.1",
29
+ "@deepseek-ai/dsh-api-session-controller": "0.2.2-rc.3",
30
+ "@deepseek-ai/dsh-api-workspace-controller": "0.2.2-rc.3",
31
+ "@deepseek-ai/dsh-client-locale": "0.2.2-rc.3",
32
+ "@deepseek-ai/dsh-client-store": "0.2.2-rc.3",
33
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.3",
34
+ "@deepseek-ai/dsh-client-ui-session": "0.2.2-rc.3",
35
+ "@deepseek-ai/dsh-client-ui-sidebar": "0.2.2-rc.3",
36
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.3",
37
+ "@deepseek-ai/dsh-client-ui-workspace": "0.2.2-rc.3",
38
+ "@deepseek-ai/dsh-session": "0.2.2-rc.3",
38
39
  "@dungsil/dsh-tsconfig": "0.0.0",
39
40
  "@dungsil/dsh-tsdown": "0.0.0",
40
41
  "@dungsil/dsh-ui": "0.0.0",
@@ -67,12 +68,24 @@
67
68
  "title": {
68
69
  "en": "Sidebar Inbox",
69
70
  "ko": "사이드바 수신함",
70
- "zh": "侧边栏收件箱"
71
+ "zh": "侧边栏收件箱",
72
+ "ja": "サイドバー受信箱",
73
+ "es": "Bandeja de entrada lateral",
74
+ "fr": "Boîte de réception latérale",
75
+ "de": "Seitenleisten-Posteingang",
76
+ "ru": "Входящие на боковой панели",
77
+ "pt": "Caixa de entrada lateral"
71
78
  },
72
79
  "description": {
73
80
  "en": "Groups sidebar sessions into Inbox, Working, and Archived lists without changing the existing sidebar.",
74
81
  "ko": "기존 사이드바 모양을 유지하면서 세션 목록을 수신함·작업 중·보관됨으로 나눠 배치합니다.",
75
- "zh": "将侧边栏会话分为收件箱、进行中和已归档列表,不改变现有侧边栏外观。"
82
+ "zh": "将侧边栏会话分为收件箱、进行中和已归档列表,不改变现有侧边栏外观。",
83
+ "ja": "標準の表示オプションに「エージェントの活動」順を追加します。単一リストで選択すると、セッションは受信箱、作業中、アーカイブ済みの順に並びます。DSH でアーカイブしたセッションは、すべての会話の一覧の下部に折りたたまれます。",
84
+ "es": "Añade el orden por actividad del agente a las opciones de vista nativas. Al seleccionarlo en la lista única, las sesiones se ordenan por bandeja de entrada, en curso y archivadas; las sesiones archivadas en DSH se pliegan al final de la vista de todas las conversaciones.",
85
+ "fr": "Ajoute le tri par activité de l’agent aux options d’affichage natives. Lorsqu’il est sélectionné dans la liste unique, les sessions sont classées en réception, en cours et archivées ; les sessions archivées dans DSH sont repliées en bas de la vue de toutes les conversations.",
86
+ "de": "Ergänzt die nativen Ansichtsoptionen um die Sortierung nach Agentenaktivität. In der Einzelliste werden Sitzungen damit nach Posteingang, in Arbeit und archiviert geordnet; in DSH archivierte Sitzungen werden unten in der Ansicht aller Gespräche eingeklappt.",
87
+ "ru": "Добавляет сортировку по активности агента в стандартные параметры вида. При её выборе в едином списке сеансы упорядочиваются по группам «Входящие», «В работе» и «Архивные»; сеансы, архивированные в DSH, сворачиваются внизу списка всех бесед.",
88
+ "pt": "Adiciona a ordenação por atividade do agente às opções de visualização nativas. Quando selecionada na lista única, as sessões são ordenadas por caixa de entrada, em andamento e arquivadas; as sessões arquivadas no DSH são recolhidas no fim da visualização de todas as conversas."
76
89
  },
77
90
  "category": "ui",
78
91
  "labels": [],
@@ -85,6 +98,7 @@
85
98
  },
86
99
  "scripts": {
87
100
  "build": "tsdown",
88
- "typecheck": "tsc --noEmit"
101
+ "typecheck": "tsc --noEmit",
102
+ "test": "node --test"
89
103
  }
90
104
  }