opencode-tbot 0.1.19 → 0.1.20
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 +47 -42
- package/README.md +48 -31
- package/README.zh-CN.md +47 -30
- package/dist/plugin.js +246 -5
- package/dist/plugin.js.map +1 -1
- package/package.json +1 -1
package/dist/plugin.js
CHANGED
|
@@ -2136,8 +2136,13 @@ function toResolvedApproval(approval, reply) {
|
|
|
2136
2136
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
2137
2137
|
};
|
|
2138
2138
|
}
|
|
2139
|
-
var SUPPORTED_BOT_LANGUAGES = [
|
|
2139
|
+
var SUPPORTED_BOT_LANGUAGES = [
|
|
2140
|
+
"en",
|
|
2141
|
+
"zh-CN",
|
|
2142
|
+
"ja"
|
|
2143
|
+
];
|
|
2140
2144
|
var EN_BOT_COPY = {
|
|
2145
|
+
locale: "en",
|
|
2141
2146
|
commands: {
|
|
2142
2147
|
start: "Welcome and quick start",
|
|
2143
2148
|
status: "Show system status",
|
|
@@ -2338,11 +2343,13 @@ var EN_BOT_COPY = {
|
|
|
2338
2343
|
expired: "The language option is no longer available. Run /language again.",
|
|
2339
2344
|
labels: {
|
|
2340
2345
|
en: "English",
|
|
2341
|
-
"zh-CN": "Simplified Chinese"
|
|
2346
|
+
"zh-CN": "Simplified Chinese",
|
|
2347
|
+
ja: "Japanese"
|
|
2342
2348
|
}
|
|
2343
2349
|
}
|
|
2344
2350
|
};
|
|
2345
2351
|
var ZH_CN_BOT_COPY = {
|
|
2352
|
+
locale: "zh-CN",
|
|
2346
2353
|
commands: {
|
|
2347
2354
|
start: "查看欢迎与快速开始",
|
|
2348
2355
|
status: "查看系统状态",
|
|
@@ -2543,7 +2550,215 @@ var ZH_CN_BOT_COPY = {
|
|
|
2543
2550
|
expired: "该语言选项已不可用。请重新运行 /language。",
|
|
2544
2551
|
labels: {
|
|
2545
2552
|
en: "English",
|
|
2546
|
-
"zh-CN": "简体中文"
|
|
2553
|
+
"zh-CN": "简体中文",
|
|
2554
|
+
ja: "日语"
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
};
|
|
2558
|
+
var JA_BOT_COPY = {
|
|
2559
|
+
locale: "ja",
|
|
2560
|
+
commands: {
|
|
2561
|
+
start: "ようこそ / クイックスタート",
|
|
2562
|
+
status: "システム状態を表示",
|
|
2563
|
+
new: "新しいセッションを作成",
|
|
2564
|
+
agents: "agent を表示して切り替え",
|
|
2565
|
+
sessions: "セッションを表示して切り替え",
|
|
2566
|
+
cancel: "名前変更を取り消すか実行中のリクエストを中止",
|
|
2567
|
+
model: "モデルを表示して切り替え",
|
|
2568
|
+
language: "言語を表示して切り替え"
|
|
2569
|
+
},
|
|
2570
|
+
start: { lines: [
|
|
2571
|
+
"# opencode-tbot へようこそ",
|
|
2572
|
+
"",
|
|
2573
|
+
"Telegram から OpenCode サーバーとやり取りできます。",
|
|
2574
|
+
"",
|
|
2575
|
+
"## クイックスタート",
|
|
2576
|
+
"1. `/status` を実行してサーバーの準備完了を確認します。",
|
|
2577
|
+
"2. `/new [title]` を実行して新しいセッションを作成します。",
|
|
2578
|
+
"",
|
|
2579
|
+
"そのままテキストまたは画像メッセージを送信できます。"
|
|
2580
|
+
] },
|
|
2581
|
+
systemStatus: { title: "システム状態" },
|
|
2582
|
+
common: {
|
|
2583
|
+
notSelected: "未選択",
|
|
2584
|
+
openCodeDefault: "未選択(OpenCode のデフォルトを使用)",
|
|
2585
|
+
previousPage: "前へ",
|
|
2586
|
+
nextPage: "次へ",
|
|
2587
|
+
page(currentPage, totalPages) {
|
|
2588
|
+
return `ページ ${currentPage}/${totalPages}`;
|
|
2589
|
+
}
|
|
2590
|
+
},
|
|
2591
|
+
status: {
|
|
2592
|
+
processing: "処理中...",
|
|
2593
|
+
alreadyProcessing: "別のリクエストがまだ実行中です。完了するまで新しいプロンプトを送信しないでください。"
|
|
2594
|
+
},
|
|
2595
|
+
prompt: { emptyResponse: "OpenCode から空の応答が返されました。" },
|
|
2596
|
+
replyMetrics: {
|
|
2597
|
+
durationLabel: "所要時間",
|
|
2598
|
+
tokensLabel: "トークン",
|
|
2599
|
+
totalLabel: "合計",
|
|
2600
|
+
inputLabel: "入力",
|
|
2601
|
+
outputLabel: "出力",
|
|
2602
|
+
reasoningLabel: "推論",
|
|
2603
|
+
cacheReadLabel: "キャッシュ読込",
|
|
2604
|
+
cacheWriteLabel: "キャッシュ書込",
|
|
2605
|
+
notAvailable: "該当なし"
|
|
2606
|
+
},
|
|
2607
|
+
abort: {
|
|
2608
|
+
noSession: "このチャットにはまだアクティブなセッションが紐付いていません。",
|
|
2609
|
+
notRunning: "現在のセッションで実行中のリクエストはありません。",
|
|
2610
|
+
aborted: "現在のセッションに中止シグナルを送信しました。"
|
|
2611
|
+
},
|
|
2612
|
+
errors: {
|
|
2613
|
+
unexpected: "予期しないエラーが発生しました。",
|
|
2614
|
+
providerAuth: "Provider の認証に失敗しました。",
|
|
2615
|
+
requestAborted: "リクエストは中止されました。",
|
|
2616
|
+
promptTimeout: "OpenCode リクエストがタイムアウトしました。",
|
|
2617
|
+
structuredOutput: "構造化出力の検証に失敗しました。",
|
|
2618
|
+
voiceUnsupported: "音声メッセージには対応していません。代わりにテキストまたは画像を送信してください。",
|
|
2619
|
+
imageDownload: "Telegram の画像ファイルをダウンロードできませんでした。",
|
|
2620
|
+
imageUnsupported: "画像ファイルが大きすぎるか、サポートされていません。",
|
|
2621
|
+
outputLength: "返信がモデルの出力上限に達しました。",
|
|
2622
|
+
contextOverflow: "会話がモデルのコンテキスト上限を超えました。",
|
|
2623
|
+
providerRequest: "Provider へのリクエストに失敗しました。",
|
|
2624
|
+
notFound: "要求されたリソースが見つかりませんでした。",
|
|
2625
|
+
badRequest: "リクエストは OpenCode に拒否されました。",
|
|
2626
|
+
causeLabel: "原因",
|
|
2627
|
+
retryableLabel: "再試行可能",
|
|
2628
|
+
statusCodeLabel: "ステータス"
|
|
2629
|
+
},
|
|
2630
|
+
health: {
|
|
2631
|
+
title: "サーバー状態",
|
|
2632
|
+
status(healthy) {
|
|
2633
|
+
return `状態: ${healthy ? "正常" : "異常"}`;
|
|
2634
|
+
},
|
|
2635
|
+
version(version) {
|
|
2636
|
+
return `バージョン: ${version}`;
|
|
2637
|
+
}
|
|
2638
|
+
},
|
|
2639
|
+
path: {
|
|
2640
|
+
title: "現在のパス",
|
|
2641
|
+
home(path) {
|
|
2642
|
+
return `ホーム: ${path}`;
|
|
2643
|
+
},
|
|
2644
|
+
state(path) {
|
|
2645
|
+
return `状態: ${path}`;
|
|
2646
|
+
},
|
|
2647
|
+
config(path) {
|
|
2648
|
+
return `設定: ${path}`;
|
|
2649
|
+
},
|
|
2650
|
+
worktree(path) {
|
|
2651
|
+
return `ワークツリー: ${path}`;
|
|
2652
|
+
},
|
|
2653
|
+
directory(path) {
|
|
2654
|
+
return `現在の作業ディレクトリ: ${path}`;
|
|
2655
|
+
}
|
|
2656
|
+
},
|
|
2657
|
+
sessions: {
|
|
2658
|
+
none: "現在のプロジェクトで利用できるセッションはありません。",
|
|
2659
|
+
title: "セッション一覧",
|
|
2660
|
+
actionTitle: "セッション操作",
|
|
2661
|
+
chooseAction: "このセッションに対する操作を選択してください。",
|
|
2662
|
+
currentProject(worktree) {
|
|
2663
|
+
return `現在のプロジェクト: ${worktree}`;
|
|
2664
|
+
},
|
|
2665
|
+
currentSession(session) {
|
|
2666
|
+
return `現在のセッション: ${session}`;
|
|
2667
|
+
},
|
|
2668
|
+
selectedSession(session) {
|
|
2669
|
+
return `選択中のセッション: ${session}`;
|
|
2670
|
+
},
|
|
2671
|
+
switched: "セッションを切り替えました。",
|
|
2672
|
+
created: "セッションを作成しました。",
|
|
2673
|
+
renamed: "セッション名を変更しました。",
|
|
2674
|
+
renameCancelled: "セッション名の変更を取り消しました。",
|
|
2675
|
+
renameEmpty: "セッション名は空にできません。新しい名前を送信するか /cancel を実行してください。",
|
|
2676
|
+
renameExpired: "このセッションはもう利用できません。/sessions を再実行してください。",
|
|
2677
|
+
renamePendingInput: "新しいセッション名の入力待ちです。プレーンテキストを送るか /cancel を実行してください。",
|
|
2678
|
+
renamePrompt(session) {
|
|
2679
|
+
return [
|
|
2680
|
+
`セッション名を変更: ${session}`,
|
|
2681
|
+
"次のテキストメッセージで新しいセッション名を送信してください。",
|
|
2682
|
+
"/cancel で取り消します。"
|
|
2683
|
+
].join("\n");
|
|
2684
|
+
},
|
|
2685
|
+
switchAction: "切り替え",
|
|
2686
|
+
renameAction: "名前変更",
|
|
2687
|
+
backToList: "戻る",
|
|
2688
|
+
expired: "このセッションはもう利用できません。/sessions を再実行してください。"
|
|
2689
|
+
},
|
|
2690
|
+
lsp: {
|
|
2691
|
+
none: "現在のプロジェクトで LSP サーバーは検出されませんでした。",
|
|
2692
|
+
title: "LSP サーバー",
|
|
2693
|
+
currentProject(worktree) {
|
|
2694
|
+
return `現在のプロジェクト: ${worktree}`;
|
|
2695
|
+
},
|
|
2696
|
+
connected: "接続済み",
|
|
2697
|
+
error: "エラー"
|
|
2698
|
+
},
|
|
2699
|
+
mcp: {
|
|
2700
|
+
none: "現在のプロジェクトで MCP サーバーは設定されていません。",
|
|
2701
|
+
title: "MCP サーバー",
|
|
2702
|
+
currentProject(worktree) {
|
|
2703
|
+
return `現在のプロジェクト: ${worktree}`;
|
|
2704
|
+
},
|
|
2705
|
+
connected: "接続済み",
|
|
2706
|
+
disabled: "無効",
|
|
2707
|
+
needsAuth: "認証が必要",
|
|
2708
|
+
failed(error) {
|
|
2709
|
+
return `失敗: ${error}`;
|
|
2710
|
+
},
|
|
2711
|
+
needsClientRegistration(error) {
|
|
2712
|
+
return `クライアント登録が必要: ${error}`;
|
|
2713
|
+
}
|
|
2714
|
+
},
|
|
2715
|
+
agents: {
|
|
2716
|
+
none: "利用可能な agent はありません。",
|
|
2717
|
+
title: "agent 一覧",
|
|
2718
|
+
current(agent) {
|
|
2719
|
+
return `現在の agent: ${agent}`;
|
|
2720
|
+
},
|
|
2721
|
+
switched: "agent を切り替えました。",
|
|
2722
|
+
expired: "この agent はもう利用できません。/agents を再実行してください。"
|
|
2723
|
+
},
|
|
2724
|
+
models: {
|
|
2725
|
+
none: "利用可能なモデルはありません。",
|
|
2726
|
+
title: "モデル一覧",
|
|
2727
|
+
configuredOnly: "OpenCode と接続済み provider で現在利用可能なモデルのみ表示します。",
|
|
2728
|
+
current(model) {
|
|
2729
|
+
return `現在のモデル: ${model}`;
|
|
2730
|
+
},
|
|
2731
|
+
switched: "モデルを切り替えました。",
|
|
2732
|
+
currentReasoningLevel(variant) {
|
|
2733
|
+
return `現在の推論レベル: ${variant}`;
|
|
2734
|
+
},
|
|
2735
|
+
reasoningLevel(variant) {
|
|
2736
|
+
return `推論レベル: ${variant}`;
|
|
2737
|
+
},
|
|
2738
|
+
noReasoningLevels: "このモデルには選択可能な推論レベルがありません。",
|
|
2739
|
+
reasoningLevelsTitle: "推論レベル",
|
|
2740
|
+
model(model) {
|
|
2741
|
+
return `モデル: ${model}`;
|
|
2742
|
+
},
|
|
2743
|
+
modelNumber(modelIndex) {
|
|
2744
|
+
return `モデル番号: ${modelIndex}`;
|
|
2745
|
+
},
|
|
2746
|
+
expired: "このモデルはもう利用できません。/model を再実行してください。",
|
|
2747
|
+
reasoningLevelExpired: "この推論レベルはもう利用できません。/model を再実行してください。",
|
|
2748
|
+
defaultReasoningLevel: "デフォルト"
|
|
2749
|
+
},
|
|
2750
|
+
language: {
|
|
2751
|
+
title: "言語",
|
|
2752
|
+
choose: "bot のメニューと返信に使う表示言語を選択してください。",
|
|
2753
|
+
current(label) {
|
|
2754
|
+
return `現在の言語: ${label}`;
|
|
2755
|
+
},
|
|
2756
|
+
switched: "言語を切り替えました。",
|
|
2757
|
+
expired: "この言語オプションはもう利用できません。/language を再実行してください。",
|
|
2758
|
+
labels: {
|
|
2759
|
+
en: "English",
|
|
2760
|
+
"zh-CN": "简体中文",
|
|
2761
|
+
ja: "日本語"
|
|
2547
2762
|
}
|
|
2548
2763
|
}
|
|
2549
2764
|
};
|
|
@@ -2555,10 +2770,14 @@ function normalizeBotLanguage(value) {
|
|
|
2555
2770
|
if (!value) return "en";
|
|
2556
2771
|
const normalized = value.trim().toLowerCase();
|
|
2557
2772
|
if (normalized === "zh-cn" || normalized === "zh-hans" || normalized === "zh") return "zh-CN";
|
|
2773
|
+
if (normalized === "ja" || normalized === "ja-jp" || normalized === "ja_jp") return "ja";
|
|
2558
2774
|
return "en";
|
|
2559
2775
|
}
|
|
2560
2776
|
function getBotCopy(language = "en") {
|
|
2561
|
-
|
|
2777
|
+
const normalized = normalizeBotLanguage(language);
|
|
2778
|
+
if (normalized === "zh-CN") return ZH_CN_BOT_COPY;
|
|
2779
|
+
if (normalized === "ja") return JA_BOT_COPY;
|
|
2780
|
+
return EN_BOT_COPY;
|
|
2562
2781
|
}
|
|
2563
2782
|
function getLanguageLabel(language, copy = BOT_COPY) {
|
|
2564
2783
|
return copy.language.labels[language];
|
|
@@ -3040,7 +3259,7 @@ function normalizeStatusInlineValue(value) {
|
|
|
3040
3259
|
return formatStatusValue(value);
|
|
3041
3260
|
}
|
|
3042
3261
|
function getStatusLayoutCopy(copy) {
|
|
3043
|
-
if (copy.
|
|
3262
|
+
if (copy.locale === "en") return {
|
|
3044
3263
|
connectivityLabel: "Connectivity",
|
|
3045
3264
|
currentProjectLabel: "Current Project",
|
|
3046
3265
|
currentSessionLabel: "Current Session",
|
|
@@ -3062,6 +3281,28 @@ function getStatusLayoutCopy(copy) {
|
|
|
3062
3281
|
tbotVersionLabel: "opencode-tbot Version",
|
|
3063
3282
|
workspaceTitle: "📁 Workspace"
|
|
3064
3283
|
};
|
|
3284
|
+
if (copy.locale === "ja") return {
|
|
3285
|
+
connectivityLabel: "接続性",
|
|
3286
|
+
currentProjectLabel: "現在のプロジェクト",
|
|
3287
|
+
currentSessionLabel: "現在のセッション",
|
|
3288
|
+
defaultSessionValue: "OpenCode のデフォルト",
|
|
3289
|
+
detailsLabel: "詳細",
|
|
3290
|
+
errorStatus: "🔴",
|
|
3291
|
+
lspTitle: "🧠 LSP",
|
|
3292
|
+
mcpFailedStatus: "🔴",
|
|
3293
|
+
mcpNotesLabel: "補足",
|
|
3294
|
+
mcpRegistrationRequiredStatus: "🟡",
|
|
3295
|
+
mcpTitle: "🔌 MCP",
|
|
3296
|
+
noPluginsMessage: "現在の OpenCode 設定にはプラグインが設定されていません。",
|
|
3297
|
+
noneStatus: "⚪",
|
|
3298
|
+
openCodeVersionLabel: "OpenCode バージョン",
|
|
3299
|
+
overviewTitle: "🖥️ 概要",
|
|
3300
|
+
pluginsTitle: "🧩 プラグイン",
|
|
3301
|
+
rootLabel: "ルート",
|
|
3302
|
+
statusLabel: "状態",
|
|
3303
|
+
tbotVersionLabel: "opencode-tbot バージョン",
|
|
3304
|
+
workspaceTitle: "📁 ワークスペース"
|
|
3305
|
+
};
|
|
3065
3306
|
return {
|
|
3066
3307
|
connectivityLabel: "连通性",
|
|
3067
3308
|
currentProjectLabel: "当前项目",
|