@celljs/ta-agents 4.14.0 → 4.15.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.
Files changed (2) hide show
  1. package/extension/index.mjs +50 -21
  2. package/package.json +7 -3
@@ -978,49 +978,78 @@ class JsonRpcConnection {
978
978
  // src/texts.ts
979
979
  var TEXTS = {
980
980
  remote: {
981
- en: (agent) => `${agent} works in directories of this computer; it cannot work in a remote directory yet.`,
982
- zh: (agent) => `${agent} 只能在这台电脑上的目录里工作,暂不支持远程目录。`
981
+ "en-US": (agent) => `${agent} works in directories of this computer; it cannot work in a remote directory yet.`,
982
+ "zh-CN": (agent) => `${agent} 只能在这台电脑上的目录里工作,暂不支持远程目录。`,
983
+ "zh-TW": (agent) => `${agent} 只能在這台電腦上的目錄裡工作,暫不支援遠端目錄。`,
984
+ "ja-JP": (agent) => `${agent} はこのコンピュータのディレクトリでのみ動作します。リモートディレクトリはまだサポートしていません。`
983
985
  },
984
986
  signIn: {
985
- en: (agent, command) => `${agent} is not signed in. Run \`${command}\` in a terminal to sign in, then try again.`,
986
- zh: (agent, command) => `${agent} 还没有登录。请在终端里运行 \`${command}\` 登录后再试。`
987
+ "en-US": (agent, command) => `${agent} is not signed in. Run \`${command}\` in a terminal to sign in, then try again.`,
988
+ "zh-CN": (agent, command) => `${agent} 还没有登录。请在终端里运行 \`${command}\` 登录后再试。`,
989
+ "zh-TW": (agent, command) => `${agent} 還沒有登入。請在終端機裡執行 \`${command}\` 登入後再試。`,
990
+ "ja-JP": (agent, command) => `${agent} はサインインしていません。ターミナルで \`${command}\` を実行してサインインしてから、もう一度試してください。`
987
991
  },
988
992
  notFound: {
989
- en: (agent, command) => `${agent}: \`${command}\` was not found. Install it, or set its command in \`agents\` of settings.json.`,
990
- zh: (agent, command) => `${agent}:找不到命令 \`${command}\`。请先安装,或在 settings.json 的 \`agents\` 里指定它的命令。`
993
+ "en-US": (agent, command) => `${agent}: \`${command}\` was not found. Install it, or set its command in \`agents\` of settings.json.`,
994
+ "zh-CN": (agent, command) => `${agent}:找不到命令 \`${command}\`。请先安装,或在 settings.json 的 \`agents\` 里指定它的命令。`,
995
+ "zh-TW": (agent, command) => `${agent}:找不到指令 \`${command}\`。請先安裝,或在 settings.json 的 \`agents\` 裡指定它的指令。`,
996
+ "ja-JP": (agent, command) => `${agent}:コマンド \`${command}\` が見つかりません。インストールするか、settings.json の \`agents\` でそのコマンドを設定してください。`
991
997
  },
992
998
  exited: {
993
- en: (agent, code, last) => `${agent} exited (${code})${last ? `: ${last}` : ""}`,
994
- zh: (agent, code, last) => `${agent} 已退出(${code})${last ? `:${last}` : ""}`
999
+ "en-US": (agent, code, last) => `${agent} exited (${code})${last ? `: ${last}` : ""}`,
1000
+ "zh-CN": (agent, code, last) => `${agent} 已退出(${code})${last ? `:${last}` : ""}`,
1001
+ "zh-TW": (agent, code, last) => `${agent} 已結束(${code})${last ? `:${last}` : ""}`,
1002
+ "ja-JP": (agent, code, last) => `${agent} は終了しました(${code})${last ? `:${last}` : ""}`
995
1003
  },
996
1004
  commandDone: {
997
- en: (agent, command) => `${agent} ran \`${command}\` and said nothing back; it may only show in ${agent}'s own interface.`,
998
- zh: (agent, command) => `${agent} 已执行 \`${command}\`,没有返回内容(这个命令可能只在 ${agent} 自己的界面里有显示)。`
1005
+ "en-US": (agent, command) => `${agent} ran \`${command}\` and said nothing back; it may only show in ${agent}'s own interface.`,
1006
+ "zh-CN": (agent, command) => `${agent} 已执行 \`${command}\`,没有返回内容(这个命令可能只在 ${agent} 自己的界面里有显示)。`,
1007
+ "zh-TW": (agent, command) => `${agent} 已執行 \`${command}\`,沒有傳回內容(這個指令可能只在 ${agent} 自己的介面裡有顯示)。`,
1008
+ "ja-JP": (agent, command) => `${agent} は \`${command}\` を実行しましたが、何も返しません。${agent} 自体のインターフェースにのみ表示される可能性があります。`
999
1009
  },
1000
1010
  starting: {
1001
- en: (agent) => `Starting ${agent}…`,
1002
- zh: (agent) => `正在启动 ${agent}…`
1011
+ "en-US": (agent) => `Starting ${agent}…`,
1012
+ "zh-CN": (agent) => `正在启动 ${agent}…`,
1013
+ "zh-TW": (agent) => `正在啟動 ${agent}…`,
1014
+ "ja-JP": (agent) => `${agent} を起動中…`
1003
1015
  },
1004
1016
  refused: {
1005
- en: (agent) => `${agent} declined to go on with this turn.`,
1006
- zh: (agent) => `${agent} 拒绝继续这一轮。`
1017
+ "en-US": (agent) => `${agent} declined to go on with this turn.`,
1018
+ "zh-CN": (agent) => `${agent} 拒绝继续这一轮。`,
1019
+ "zh-TW": (agent) => `${agent} 拒絕繼續這一輪。`,
1020
+ "ja-JP": (agent) => `${agent} はこのターンを続行することを拒否しました。`
1007
1021
  },
1008
1022
  retrying: {
1009
- en: (agent, network, attempt) => `${agent}: ${network ? "the connection to its model dropped" : "a request to its model failed"}, retrying${attempt ? ` (attempt ${attempt})` : ""}…`,
1010
- zh: (agent, network, attempt) => `${agent}:${network ? "连接模型的网络中断" : "模型请求失败"},正在重试${attempt ? `(第 ${attempt} 次)` : ""}…`
1023
+ "en-US": (agent, network, attempt) => `${agent}: ${network ? "the connection to its model dropped" : "a request to its model failed"}, retrying${attempt ? ` (attempt ${attempt})` : ""}…`,
1024
+ "zh-CN": (agent, network, attempt) => `${agent}:${network ? "连接模型的网络中断" : "模型请求失败"},正在重试${attempt ? `(第 ${attempt} 次)` : ""}…`,
1025
+ "zh-TW": (agent, network, attempt) => `${agent}:${network ? "連線模型的網路中斷" : "模型請求失敗"},正在重試${attempt ? `(第 ${attempt} 次)` : ""}…`,
1026
+ "ja-JP": (agent, network, attempt) => `${agent}:${network ? "モデルへの接続が切断されました" : "モデルへのリクエストが失敗しました"}、再試行中${attempt ? `(試行 ${attempt})` : ""}…`
1011
1027
  },
1012
1028
  dropped: {
1013
- en: (agent) => `${agent} went on without finishing this call.`,
1014
- zh: (agent) => `${agent} 没有完成这次调用就接着往下做了。`
1029
+ "en-US": (agent) => `${agent} went on without finishing this call.`,
1030
+ "zh-CN": (agent) => `${agent} 没有完成这次调用就接着往下做了。`,
1031
+ "zh-TW": (agent) => `${agent} 沒有完成這次呼叫就接著往下做了。`,
1032
+ "ja-JP": (agent) => `${agent} はこの呼び出しを完了せずに進みました。`
1015
1033
  },
1016
1034
  unfinished: {
1017
- en: (agent) => `${agent} ended its turn before this call finished.`,
1018
- zh: (agent) => `${agent} 在这次调用完成前结束了这一轮。`
1035
+ "en-US": (agent) => `${agent} ended its turn before this call finished.`,
1036
+ "zh-CN": (agent) => `${agent} 在这次调用完成前结束了这一轮。`,
1037
+ "zh-TW": (agent) => `${agent} 在這次呼叫完成前結束了這一輪。`,
1038
+ "ja-JP": (agent) => `${agent} はこの呼び出しが完了する前にターンを終了しました。`
1019
1039
  }
1020
1040
  };
1041
+ function ofLanguage(tag) {
1042
+ if (/^zh/i.test(tag)) {
1043
+ return /(?:tw|hk|mo|hant)/i.test(tag) ? "zh-TW" : "zh-CN";
1044
+ }
1045
+ if (/^ja/i.test(tag)) {
1046
+ return "ja-JP";
1047
+ }
1048
+ return "en-US";
1049
+ }
1021
1050
  function language(env = process.env) {
1022
1051
  const locale = env.TA_LANGUAGE || env.LC_ALL || env.LC_MESSAGES || env.LANG || Intl.DateTimeFormat().resolvedOptions().locale;
1023
- return /^zh/i.test(locale) ? "zh" : "en";
1052
+ return ofLanguage(locale);
1024
1053
  }
1025
1054
  function text(key, ...args) {
1026
1055
  return TEXTS[key][language()](...args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-agents",
3
- "version": "4.14.0",
3
+ "version": "4.15.0",
4
4
  "description": "A pi package for Ta: other coding agents (CodeBuddy Code, Claude Code, Codex and any agent that speaks ACP) as models to pick, each running a conversation on its own harness",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -35,11 +35,15 @@
35
35
  "pi": {
36
36
  "title": {
37
37
  "en": "Other coding agents",
38
- "zh-CN": "其他编程 Agent"
38
+ "zh-CN": "其他编程 Agent",
39
+ "zh-TW": "其他程式設計 Agent",
40
+ "ja-JP": "ほかのコーディングエージェント"
39
41
  },
40
42
  "summary": {
41
43
  "en": "Pick Claude Code, Codex, CodeBuddy Code or another ACP agent as the model of a conversation.",
42
- "zh-CN": "把 Claude Code、Codex、CodeBuddy Code 等 Agent 当作模型,在对话里选用。"
44
+ "zh-CN": "把 Claude Code、Codex、CodeBuddy Code 等 Agent 当作模型,在对话里选用。",
45
+ "zh-TW": "把 Claude Code、Codex、CodeBuddy Code 等 Agent 當作模型,在對話裡選用。",
46
+ "ja-JP": "Claude Code、Codex、CodeBuddy Code などのエージェントをモデルとして会話で選べます。"
43
47
  },
44
48
  "icon": "SquareTerminal",
45
49
  "extensions": [