@raingor/pi-web-switch 0.7.0 → 0.7.1

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/README.ja.md CHANGED
@@ -167,6 +167,18 @@ pi-web-switch/
167
167
  └── src/ # React フロントエンド
168
168
  ```
169
169
 
170
+ ## 💬 コミュニティ
171
+
172
+ ご質問・ご提案・バグ報告は **Telegram グループ** へどうぞ:
173
+
174
+ 👉 **[pi-web-switch Telegram グループに参加](https://t.me/+ODpy7_7NlOE4NzA1)**
175
+
176
+ 問題を報告する際は以下を添えてください:
177
+
178
+ 1. OS(macOS / Windows / Linux)
179
+ 2. バージョン —— `npm view @raingor/pi-web-switch version`
180
+ 3. 具体的な問題の説明とエラーのスクリーンショットまたはログ
181
+
170
182
  ## 🔗 リンク
171
183
 
172
184
  - **ホームページ:** [raingor.github.io/my-blog](https://raingor.github.io/my-blog/)
package/README.md CHANGED
@@ -330,6 +330,18 @@ pi-web-switch/
330
330
  └── src/ # React frontend
331
331
  ```
332
332
 
333
+ ## 💬 Community
334
+
335
+ Join the **Telegram group** for questions, suggestions, and bug reports:
336
+
337
+ 👉 **[Join the pi-web-switch Telegram group](https://t.me/+ODpy7_7NlOE4NzA1)**
338
+
339
+ When reporting an issue, please include:
340
+
341
+ 1. Your OS (macOS / Windows / Linux)
342
+ 2. Your version — `npm view @raingor/pi-web-switch version`
343
+ 3. A clear description plus any error screenshots or logs
344
+
333
345
  ## 🔗 Links
334
346
 
335
347
  - **Homepage:** [raingor.github.io/my-blog](https://raingor.github.io/my-blog/)
package/README.zh-CN.md CHANGED
@@ -205,6 +205,18 @@ pi-web-switch/
205
205
  └── src/ # React 前端
206
206
  ```
207
207
 
208
+ ## 💬 交流群
209
+
210
+ 有任何疑问、建议或 bug 反馈,欢迎加入 **Telegram 交流群**:
211
+
212
+ 👉 **[加入 pi-web-switch Telegram 交流群](https://t.me/+ODpy7_7NlOE4NzA1)**
213
+
214
+ 提问时请附上:
215
+
216
+ 1. 你的系统(macOS / Windows / Linux)
217
+ 2. 版本号 —— `npm view @raingor/pi-web-switch version`
218
+ 3. 清晰的问题描述,以及报错截图或日志
219
+
208
220
  ## 🔗 相关链接
209
221
 
210
222
  - **个人主页:** [raingor.github.io/my-blog](https://raingor.github.io/my-blog/)
package/dist/index.html CHANGED
@@ -9,8 +9,8 @@
9
9
  <link rel="manifest" href="./manifest.webmanifest" />
10
10
  <meta name="theme-color" content="#05090d" />
11
11
  <meta name="description" content="Web UI for pi coding agent — configuration management, session browser, and usage dashboard" />
12
- <script type="module" crossorigin src="./assets/main-E7tKVWGH.js"></script>
13
- <link rel="stylesheet" crossorigin href="./assets/main-DHTj6wfH.css">
12
+ <script type="module" crossorigin src="./assets/main-Bs37wZvZ.js"></script>
13
+ <link rel="stylesheet" crossorigin href="./assets/main-DTnbncES.css">
14
14
  </head>
15
15
  <body>
16
16
  <div id="root"></div>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@raingor/pi-web-switch",
3
3
  "private": false,
4
- "version": "0.7.0",
4
+ "version": "0.7.1",
5
5
  "type": "module",
6
6
  "main": "dist/index.html",
7
7
  "description": "Web UI for pi coding agent — live configuration management, session browser, and memory viewer",
@@ -0,0 +1,53 @@
1
+ import { useState } from "react";
2
+ import { Sparkles } from "lucide-react";
3
+ import { Modal } from "@/components/ui/Modal";
4
+ import { useTranslation } from "@/lib/i18n";
5
+ import { CHANGELOG } from "@/data/changelog";
6
+
7
+ /**
8
+ * "What's new" changelog dialog. Trigger lives in the sidebar footer (version
9
+ * strip). Entries come from src/data/changelog.ts with i18n item keys.
10
+ */
11
+ export function ChangelogButton() {
12
+ const { t } = useTranslation();
13
+ const [open, setOpen] = useState(false);
14
+
15
+ return (
16
+ <>
17
+ <button
18
+ onClick={() => setOpen(true)}
19
+ className="changelog-trigger"
20
+ title={t("changelog.title")}
21
+ >
22
+ <Sparkles className="h-3.5 w-3.5" />
23
+ <span>{t("changelog.button")}</span>
24
+ </button>
25
+
26
+ <Modal open={open} onClose={() => setOpen(false)} title={t("changelog.title")} size="lg">
27
+ <div className="space-y-5">
28
+ {CHANGELOG.map((entry) => (
29
+ <div key={entry.version}>
30
+ <div className="flex items-baseline gap-2">
31
+ <span
32
+ className="rounded-md px-2 py-0.5 text-xs font-semibold"
33
+ style={{ backgroundColor: "color-mix(in srgb, var(--signal-cyan) 16%, transparent)", color: "var(--signal-cyan, #38bdf8)" }}
34
+ >
35
+ v{entry.version}
36
+ </span>
37
+ <span className="text-xs" style={{ color: "var(--subtle-text)" }}>{entry.date}</span>
38
+ </div>
39
+ <ul className="mt-2 space-y-1.5">
40
+ {entry.itemKeys.map((k) => (
41
+ <li key={k} className="flex gap-2 text-sm leading-relaxed" style={{ color: "var(--muted-text)" }}>
42
+ <span style={{ color: "var(--signal-cyan, #38bdf8)" }}>›</span>
43
+ <span>{t(k)}</span>
44
+ </li>
45
+ ))}
46
+ </ul>
47
+ </div>
48
+ ))}
49
+ </div>
50
+ </Modal>
51
+ </>
52
+ );
53
+ }
@@ -16,6 +16,7 @@ import {
16
16
  import { cn } from "@/lib/utils";
17
17
  import { useTranslation, LANGUAGES } from "@/lib/i18n";
18
18
  import { useState } from "react";
19
+ import { ChangelogButton } from "@/components/help/ChangelogButton";
19
20
 
20
21
  // Telegram group invite link (same as the help dialog).
21
22
  const TELEGRAM_GROUP_URL = "https://t.me/+ODpy7_7NlOE4NzA1";
@@ -122,7 +123,7 @@ export function Sidebar({ mobileOpen = false, onClose }: SidebarProps) {
122
123
 
123
124
  <div className="version-strip">
124
125
  <span>{t("app.version")}</span>
125
- <span>BUILD // STABLE</span>
126
+ <ChangelogButton />
126
127
  </div>
127
128
  </div>
128
129
  </aside>
@@ -372,7 +372,7 @@ function MemoryFileSection({
372
372
 
373
373
  export function MemoryPage() {
374
374
  const { t } = useTranslation();
375
- const { initialized, allModels } = useConfigStore();
375
+ const { initialized, allModels, allProviders } = useConfigStore();
376
376
  const [files, setFiles] = useState<MemoryFile[]>([]);
377
377
  const [loading, setLoading] = useState(true);
378
378
  const [refreshing, setRefreshing] = useState(false);
@@ -396,6 +396,16 @@ export function MemoryPage() {
396
396
 
397
397
  // Capacity status (per-target chars vs limit) for progress bars
398
398
  const [status, setStatus] = useState<{ filename: string; target: string; chars: number; limit: number }[]>([]);
399
+
400
+ // Models eligible as the memory-write model: custom providers, plus built-in
401
+ // providers that have an API key actually saved (hasAuth). Built-ins without
402
+ // a key can't run, so they're excluded from the dropdown.
403
+ const eligibleModels = useMemo(() => {
404
+ const usableProviderIds = new Set(
405
+ allProviders.filter((p) => p.type === "custom" || p.hasAuth).map((p) => p.id)
406
+ );
407
+ return allModels.filter((m) => usableProviderIds.has(m.providerId));
408
+ }, [allModels, allProviders]);
399
409
  const loadStatus = useCallback(() => {
400
410
  fetch("/api/pi/memory/status")
401
411
  .then((r) => r.json())
@@ -493,7 +503,11 @@ export function MemoryPage() {
493
503
  });
494
504
  const { success } = (await res.json()) as { success: boolean };
495
505
  setCfgMsg({ ok: !!success, text: success ? t("memory.config_saved") : t("memory.config_save_failed") });
496
- if (success) loadStatus();
506
+ if (success) {
507
+ loadStatus();
508
+ // Close the modal shortly after showing the success message.
509
+ setTimeout(() => setShowConfig(false), 600);
510
+ }
497
511
  } catch {
498
512
  setCfgMsg({ ok: false, text: t("memory.config_save_failed") });
499
513
  } finally {
@@ -724,20 +738,25 @@ export function MemoryPage() {
724
738
  <p className="text-xs" style={{ color: "var(--muted-text)" }}>{t("memory.config_desc")}</p>
725
739
  <div>
726
740
  <label className="mb-1 block text-xs" style={{ color: "var(--muted-text)" }}>{t("memory.config_model")}</label>
727
- <input
728
- type="text"
729
- list="memory-model-options"
741
+ <select
730
742
  value={cfg.llmModelOverride}
731
743
  onChange={(e) => setCfg({ ...cfg, llmModelOverride: e.target.value })}
732
- placeholder={t("memory.config_model_default")}
733
744
  className="w-full rounded-lg border px-3 py-1.5 text-sm outline-none focus:ring-1 focus:ring-blue-500"
734
745
  style={{ backgroundColor: "var(--card-bg)", borderColor: "var(--card-border)", color: "var(--page-text)" }}
735
- />
736
- <datalist id="memory-model-options">
737
- {allModels.map((m) => (
738
- <option key={`${m.providerId}/${m.id}`} value={`${m.providerId}/${m.id}`}>{m.providerName} · {m.name ?? m.id}</option>
746
+ >
747
+ <option value="">{t("memory.config_model_default")}</option>
748
+ {/* If the saved model isn't in the current model list (e.g. a
749
+ provider was removed), still show it so it isn't silently lost. */}
750
+ {cfg.llmModelOverride &&
751
+ !eligibleModels.some((m) => `${m.providerId}/${m.id}` === cfg.llmModelOverride) && (
752
+ <option value={cfg.llmModelOverride}>{cfg.llmModelOverride}</option>
753
+ )}
754
+ {eligibleModels.map((m) => (
755
+ <option key={`${m.providerId}/${m.id}`} value={`${m.providerId}/${m.id}`}>
756
+ {m.providerName} · {m.name ?? m.id}
757
+ </option>
739
758
  ))}
740
- </datalist>
759
+ </select>
741
760
  </div>
742
761
  <div className="flex gap-3">
743
762
  <div className="flex-1">
@@ -0,0 +1,50 @@
1
+ // Version changelog shown in the "What's new" dialog. Newest first.
2
+ // `items` are i18n keys so the entries localize with the active language.
3
+ // When cutting a release, prepend a new entry here.
4
+
5
+ export interface ChangelogEntry {
6
+ version: string;
7
+ date: string; // ISO date
8
+ itemKeys: string[];
9
+ }
10
+
11
+ export const CHANGELOG: ChangelogEntry[] = [
12
+ {
13
+ version: "0.7.0",
14
+ date: "2026-08-27",
15
+ itemKeys: [
16
+ "changelog.0_7_0_1",
17
+ "changelog.0_7_0_2",
18
+ "changelog.0_7_0_3",
19
+ ],
20
+ },
21
+ {
22
+ version: "0.6.2",
23
+ date: "2026-08-26",
24
+ itemKeys: ["changelog.0_6_2_1"],
25
+ },
26
+ {
27
+ version: "0.6.1",
28
+ date: "2026-08-26",
29
+ itemKeys: ["changelog.0_6_1_1"],
30
+ },
31
+ {
32
+ version: "0.6.0",
33
+ date: "2026-08-26",
34
+ itemKeys: [
35
+ "changelog.0_6_0_1",
36
+ "changelog.0_6_0_2",
37
+ "changelog.0_6_0_3",
38
+ "changelog.0_6_0_4",
39
+ ],
40
+ },
41
+ {
42
+ version: "0.5.0",
43
+ date: "2026-08-26",
44
+ itemKeys: [
45
+ "changelog.0_5_0_1",
46
+ "changelog.0_5_0_2",
47
+ "changelog.0_5_0_3",
48
+ ],
49
+ },
50
+ ];
package/src/index.css CHANGED
@@ -710,3 +710,25 @@ table { border-collapse: collapse; }
710
710
  transform: translateY(-1px);
711
711
  box-shadow: 0 8px 22px color-mix(in srgb, #229ED9 22%, transparent);
712
712
  }
713
+
714
+ /* ─── Changelog trigger (version strip) ─────────────────── */
715
+ .changelog-trigger {
716
+ display: inline-flex;
717
+ align-items: center;
718
+ gap: 5px;
719
+ padding: 2px 6px;
720
+ border-radius: 6px;
721
+ border: 1px solid transparent;
722
+ color: var(--muted-text);
723
+ font-family: var(--font-mono);
724
+ font-size: 9px;
725
+ letter-spacing: .06em;
726
+ text-transform: uppercase;
727
+ cursor: pointer;
728
+ transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
729
+ }
730
+ .changelog-trigger:hover {
731
+ color: var(--signal-cyan);
732
+ border-color: color-mix(in srgb, var(--signal-cyan) 30%, var(--card-border));
733
+ background: color-mix(in srgb, var(--signal-cyan) 8%, transparent);
734
+ }
@@ -126,7 +126,21 @@ const en: Record<string, string> = {
126
126
  "official_usage.no_result": "No quota result yet",
127
127
  "official_usage.no_result_desc": "Enter an official usage endpoint and API key, then save to test the query and display quota usage.",
128
128
  "app.subtitle": "Configuration Manager",
129
- "app.version": "pi-switch v0.1.0",
129
+ "app.version": "pi-switch v0.7.0",
130
+ "changelog.button": "Changelog",
131
+ "changelog.title": "What's New",
132
+ "changelog.0_7_0_1": "Added a floating \"User Guide\" button (bottom-right) with a project overview and per-module how-to.",
133
+ "changelog.0_7_0_2": "Added \"Join Telegram group\" entry points (sidebar + user guide dialog).",
134
+ "changelog.0_7_0_3": "Added this \"What’s New\" changelog dialog.",
135
+ "changelog.0_6_2_1": "Subagents: edit a custom agent’s model and thinking level directly from the panel.",
136
+ "changelog.0_6_1_1": "Fix: one-click optimize now runs in an async process, no longer freezing the dev server or auto-reloading the page.",
137
+ "changelog.0_6_0_1": "Memory: added \"Optimize Memory\" to consolidate all three memory files at once.",
138
+ "changelog.0_6_0_2": "Memory: added auto-write model config plus capacity limits and overflow strategy.",
139
+ "changelog.0_6_0_3": "Memory: added per-file capacity progress bars and live optimize progress.",
140
+ "changelog.0_6_0_4": "Settings: removed the GitHub Copilot config section.",
141
+ "changelog.0_5_0_1": "Added the \"Model Speed Test\" module, replacing \"Official Usage\".",
142
+ "changelog.0_5_0_2": "Speed test: one-click fetch models (stored separately) and a slow mode to avoid rate limits.",
143
+ "changelog.0_5_0_3": "Providers page hides built-in providers for a cleaner UI.",
130
144
 
131
145
  // Subagents
132
146
  "subagents.summary": "{0} agents · {1} chains",
@@ -124,7 +124,21 @@ const ja: Record<string, string> = {
124
124
  "official_usage.no_result": "利用枠データはまだありません",
125
125
  "official_usage.no_result_desc": "公式使用量 URL と API Key を入力して保存すると、照会テストを行い利用枠を表示します。",
126
126
  "app.subtitle": "設定マネージャー",
127
- "app.version": "pi-switch v0.1.0",
127
+ "app.version": "pi-switch v0.7.0",
128
+ "changelog.button": "変更履歴",
129
+ "changelog.title": "更新情報",
130
+ "changelog.0_7_0_1": "右下にフローティング「使い方」ボタンを追加。プロジェクト概要と各モジュールの使い方を表示。",
131
+ "changelog.0_7_0_2": "「Telegram グループに参加」の入口を追加(サイドバー + 使い方ダイアログ)。",
132
+ "changelog.0_7_0_3": "この「更新情報」ダイアログを追加。",
133
+ "changelog.0_6_2_1": "サブエージェント:カスタムエージェントのモデルと思考レベルをパネルから直接編集可能に。",
134
+ "changelog.0_6_1_1": "修正:メモリ最適化を非同期プロセス化し、開発サーバーの停止やページ自動リロードを解消。",
135
+ "changelog.0_6_0_1": "メモリ:3 つのメモリファイルを一括統合する「メモリを最適化」を追加。",
136
+ "changelog.0_6_0_2": "メモリ:自動書き込みモデル設定、容量上限、上限超過戦略を追加。",
137
+ "changelog.0_6_0_3": "メモリ:ファイル別の容量プログレスバーと最適化のリアルタイム進捗を追加。",
138
+ "changelog.0_6_0_4": "設定:GitHub Copilot 設定セクションを削除。",
139
+ "changelog.0_5_0_1": "「モデル速度計測」モジュールを追加し、「公式使用量」を置き換え。",
140
+ "changelog.0_5_0_2": "計測:モデルのワンクリック取得(別途保存)とレート制限回避の低速モード。",
141
+ "changelog.0_5_0_3": "プロバイダーページで組み込みプロバイダーを非表示にしUIを簡素化。",
128
142
 
129
143
  // Subagents
130
144
  "subagents.summary": "{0} エージェント · {1} チェーン",
@@ -124,7 +124,21 @@ const zhCN: Record<string, string> = {
124
124
  "official_usage.no_result": "暂未获取额度数据",
125
125
  "official_usage.no_result_desc": "填写官方用量接口和 API Key,保存后会立即测试查询并显示额度。",
126
126
  "app.subtitle": "配置管理器",
127
- "app.version": "pi-switch v0.1.0",
127
+ "app.version": "pi-switch v0.7.0",
128
+ "changelog.button": "更新日志",
129
+ "changelog.title": "版本更新说明",
130
+ "changelog.0_7_0_1": "新增右下角浮动「使用说明」按钮,弹窗含项目总览与各板块使用指引。",
131
+ "changelog.0_7_0_2": "新增「加入 Telegram 交流群」入口(侧边栏 + 使用说明弹窗)。",
132
+ "changelog.0_7_0_3": "新增本「版本更新说明」弹窗。",
133
+ "changelog.0_6_2_1": "子代理:支持在面板里直接编辑自定义代理的模型和思考级别。",
134
+ "changelog.0_6_1_1": "修复:一键优化改用异步进程,不再导致开发服务器卡顿和页面自动刷新。",
135
+ "changelog.0_6_0_1": "记忆:新增「一键优化记忆」,一次整合三个记忆文件。",
136
+ "changelog.0_6_0_2": "记忆:新增自动写入记忆所用模型的配置,及容量上限与超限策略设置。",
137
+ "changelog.0_6_0_3": "记忆:新增各记忆文件的容量进度条与优化实时进度。",
138
+ "changelog.0_6_0_4": "设置:移除 GitHub Copilot 配置板块。",
139
+ "changelog.0_5_0_1": "新增「模型测速」模块,替代原「官方用量查询」。",
140
+ "changelog.0_5_0_2": "测速支持一键获取模型(独立本地存储)与慢速模式防限流。",
141
+ "changelog.0_5_0_3": "提供商页隐藏内置供应商,精简界面。",
128
142
 
129
143
  // Subagents
130
144
  "subagents.summary": "{0} 个代理 · {1} 个流水线",
@@ -123,7 +123,21 @@ const zhTW: Record<string, string> = {
123
123
  "official_usage.no_result": "尚未取得額度資料",
124
124
  "official_usage.no_result_desc": "填寫官方用量介面與 API Key,儲存後會立即測試查詢並顯示額度。",
125
125
  "app.subtitle": "設定管理器",
126
- "app.version": "pi-switch v0.1.0",
126
+ "app.version": "pi-switch v0.7.0",
127
+ "changelog.button": "更新日誌",
128
+ "changelog.title": "版本更新說明",
129
+ "changelog.0_7_0_1": "新增右下角浮動「使用說明」按鈕,彈窗含專案總覽與各板塊使用指引。",
130
+ "changelog.0_7_0_2": "新增「加入 Telegram 交流群」入口(側邊欄 + 使用說明彈窗)。",
131
+ "changelog.0_7_0_3": "新增本「版本更新說明」彈窗。",
132
+ "changelog.0_6_2_1": "子代理:支援在面板裡直接編輯自訂代理的模型和思考級別。",
133
+ "changelog.0_6_1_1": "修復:一鍵優化改用非同步進程,不再導致開發伺服器卡頓和頁面自動刷新。",
134
+ "changelog.0_6_0_1": "記憶:新增「一鍵優化記憶」,一次整合三個記憶檔。",
135
+ "changelog.0_6_0_2": "記憶:新增自動寫入記憶所用模型的設定,及容量上限與超限策略設置。",
136
+ "changelog.0_6_0_3": "記憶:新增各記憶檔的容量進度條與優化即時進度。",
137
+ "changelog.0_6_0_4": "設定:移除 GitHub Copilot 設定板塊。",
138
+ "changelog.0_5_0_1": "新增「模型測速」模組,替代原「官方用量查詢」。",
139
+ "changelog.0_5_0_2": "測速支援一鍵獲取模型(獨立本地儲存)與慢速模式防限流。",
140
+ "changelog.0_5_0_3": "提供商頁隱藏內建供應商,精簡介面。",
127
141
 
128
142
  // Subagents
129
143
  "subagents.summary": "{0} 個代理 · {1} 個流水線",