viveworker 0.1.8 → 0.1.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viveworker",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Local iPhone companion for Codex Desktop approvals, plan checks, questions, and notifications on your LAN.",
5
5
  "author": "Yuta Hoshino <hoshino.lireneo@gmail.com>",
6
6
  "license": "MIT",
@@ -6820,16 +6820,16 @@ function formatNativeApprovalMessage(kind, params, locale = config?.defaultLocal
6820
6820
  function formatCommandApprovalMessage(params, locale = config?.defaultLocale || DEFAULT_LOCALE) {
6821
6821
  const parts = [];
6822
6822
  const reason = truncate(cleanText(params.reason ?? params.justification ?? ""), 220);
6823
- const command = truncate(cleanText(params.command ?? params.cmd ?? ""), 220);
6823
+ const command = truncate(cleanText(params.command ?? params.cmd ?? ""), 1200);
6824
6824
  if (reason) {
6825
6825
  parts.push(reason);
6826
6826
  } else {
6827
6827
  parts.push(t(locale, "server.message.commandApprovalNeeded"));
6828
6828
  }
6829
6829
  if (command) {
6830
- parts.push(t(locale, "server.message.commandPrefix", { command }));
6830
+ parts.push(`${t(locale, "server.message.commandLabel")}\n\`\`\`sh\n${command}\n\`\`\``);
6831
6831
  }
6832
- return truncate(parts.join("\n") || t(locale, "server.message.commandApprovalNeeded"), 1024);
6832
+ return parts.join("\n\n") || t(locale, "server.message.commandApprovalNeeded");
6833
6833
  }
6834
6834
 
6835
6835
  function formatFileApprovalMessage(params, locale = config?.defaultLocale || DEFAULT_LOCALE) {
@@ -8830,6 +8830,7 @@ function buildPendingApprovalDetail(runtime, approval, locale) {
8830
8830
  const previousContext = buildPreviousApprovalContext(runtime, approval);
8831
8831
  return {
8832
8832
  kind: "approval",
8833
+ approvalKind: cleanText(approval.kind || ""),
8833
8834
  token: approval.token,
8834
8835
  title: formatLocalizedTitle(locale, "server.title.approval", approval.threadLabel),
8835
8836
  threadLabel: approval.threadLabel || "",
package/web/app.css CHANGED
@@ -1927,6 +1927,7 @@ code {
1927
1927
  padding: 0 0.2rem;
1928
1928
  color: var(--muted);
1929
1929
  line-height: 1.55;
1930
+ overflow-wrap: anywhere;
1930
1931
  }
1931
1932
 
1932
1933
  .detail-page-copy--approval {
package/web/app.js CHANGED
@@ -3133,6 +3133,9 @@ function renderDetailPlainIntro(detail, options = {}) {
3133
3133
  if (!["approval", "diff_thread", "file_event"].includes(detail?.kind || "")) {
3134
3134
  return "";
3135
3135
  }
3136
+ if (detail?.kind === "approval" && normalizeClientText(detail?.approvalKind || "") !== "file") {
3137
+ return "";
3138
+ }
3136
3139
  if (!detail?.messageHtml) {
3137
3140
  return "";
3138
3141
  }
package/web/i18n.js CHANGED
@@ -383,6 +383,7 @@ const translations = {
383
383
  "server.action.reject": "Reject",
384
384
  "server.action.implement": "Implement",
385
385
  "server.message.commandApprovalNeeded": "Command approval needed.",
386
+ "server.message.commandLabel": "Command",
386
387
  "server.message.fileApprovalNeeded": "File changes need approval.",
387
388
  "server.message.commandPrefix": ({ command }) => `Command: ${command}`,
388
389
  "server.message.pathPrefix": ({ path }) => `Path: ${path}`,
@@ -897,6 +898,7 @@ const translations = {
897
898
  "server.action.reject": "拒否",
898
899
  "server.action.implement": "実装する",
899
900
  "server.message.commandApprovalNeeded": "コマンド実行の承認が必要です。",
901
+ "server.message.commandLabel": "コマンド",
900
902
  "server.message.fileApprovalNeeded": "ファイル変更の承認が必要です。",
901
903
  "server.message.commandPrefix": ({ command }) => `Command: ${command}`,
902
904
  "server.message.pathPrefix": ({ path }) => `Path: ${path}`,