deepcode-ai 1.2.22 → 1.2.23

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/dist/index.js CHANGED
@@ -11509,7 +11509,7 @@ function parseVersion(version) {
11509
11509
  if (!match) return null;
11510
11510
  return [Number(match[1]), Number(match[2]), Number(match[3])];
11511
11511
  }
11512
- var VERSION = "1.2.22".length > 0 ? "1.2.22" : "0.0.0-dev";
11512
+ var VERSION = "1.2.23".length > 0 ? "1.2.23" : "0.0.0-dev";
11513
11513
  async function updateCommand() {
11514
11514
  writeStdoutLine(`Current version: ${VERSION}`);
11515
11515
  const update = await checkForUpdate(VERSION, { force: true });
@@ -29851,11 +29851,15 @@ var renameCommand = {
29851
29851
  content: t("Usage: /rename <session name>")
29852
29852
  };
29853
29853
  }
29854
- session.setName(name);
29854
+ if (context.ui.renameSession) {
29855
+ context.ui.renameSession(name);
29856
+ } else {
29857
+ session.setName(name);
29858
+ }
29855
29859
  return {
29856
29860
  type: "message",
29857
29861
  messageType: "info",
29858
- content: `Session renamed to "${name}".`
29862
+ content: `Sess\xE3o renomeada para "${name}".`
29859
29863
  };
29860
29864
  }
29861
29865
  };
@@ -30021,7 +30025,7 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
30021
30025
  isFocused: true
30022
30026
  }
30023
30027
  ),
30024
- /* @__PURE__ */ jsx54(Text52, { color: theme.text.secondary, children: "\u2191\u2193 navigate \xB7 Enter apply \xB7 Esc cancel" })
30028
+ /* @__PURE__ */ jsx54(Text52, { color: theme.text.secondary, children: "\u2191\u2193 navegar \xB7 Enter aplicar \xB7 Esc cancelar" })
30025
30029
  ]
30026
30030
  }
30027
30031
  );
@@ -30435,7 +30439,7 @@ var PermissionsDialog = ({
30435
30439
  marginLeft: 2,
30436
30440
  marginRight: 2,
30437
30441
  children: [
30438
- /* @__PURE__ */ jsx56(Text54, { bold: true, color: theme.text.accent, children: "Permission policy" }),
30442
+ /* @__PURE__ */ jsx56(Text54, { bold: true, color: theme.text.accent, children: "Permiss\xF5es" }),
30439
30443
  PERMISSION_KEYS.map((key, i) => {
30440
30444
  const focused = focusIndex === i;
30441
30445
  const mode = modes[key];
@@ -30447,13 +30451,13 @@ var PermissionsDialog = ({
30447
30451
  }),
30448
30452
  /* @__PURE__ */ jsx56(Box46, { marginTop: 1, flexDirection: "column", children: ACTIONS3.map((action, i) => {
30449
30453
  const focused = focusIndex === PERMISSION_KEYS.length + i;
30450
- const label = action === "save" ? dirty ? "Save changes" : "Save changes (no edits)" : "Cancel";
30454
+ const label = action === "save" ? dirty ? "Salvar" : "Salvar (sem edi\xE7\xF5es)" : "Cancelar";
30451
30455
  return /* @__PURE__ */ jsxs50(Box46, { flexDirection: "row", gap: 1, children: [
30452
30456
  /* @__PURE__ */ jsx56(Text54, { color: focused ? theme.text.accent : theme.text.secondary, children: focused ? "\u203A" : " " }),
30453
30457
  /* @__PURE__ */ jsx56(Text54, { color: focused ? theme.text.primary : theme.text.secondary, bold: focused, children: label })
30454
30458
  ] }, action);
30455
30459
  }) }),
30456
- /* @__PURE__ */ jsx56(Text54, { color: theme.text.secondary, dimColor: true, children: "\u2191\u2193 navigate \xB7 Enter cycles allow/ask/deny or selects action \xB7 Esc cancel" })
30460
+ /* @__PURE__ */ jsx56(Text54, { color: theme.text.secondary, dimColor: true, children: "\u2191\u2193 navegar \xB7 Enter cicla allow/ask/deny ou confirma \xB7 Esc cancelar" })
30457
30461
  ]
30458
30462
  }
30459
30463
  );
@@ -30631,7 +30635,7 @@ function buildRows(models, currentId, search) {
30631
30635
  if (!search && currentId) {
30632
30636
  const recent = filtered.find((m) => m.id === currentId);
30633
30637
  if (recent) {
30634
- rows.push({ kind: "header", label: "Recent" });
30638
+ rows.push({ kind: "header", label: "Recente" });
30635
30639
  rows.push({ kind: "item", model: recent, selIndex: selIndex++ });
30636
30640
  }
30637
30641
  }
@@ -30750,8 +30754,8 @@ var ModelDialog = ({
30750
30754
  children: [
30751
30755
  /* @__PURE__ */ jsxs52(Box48, { justifyContent: "space-between", marginBottom: 1, children: [
30752
30756
  /* @__PURE__ */ jsxs52(Box48, { gap: 1, children: [
30753
- /* @__PURE__ */ jsx58(Text56, { bold: true, color: theme.text.primary, children: "Select model" }),
30754
- /* @__PURE__ */ jsx58(Text56, { color: theme.text.secondary, children: "for" }),
30757
+ /* @__PURE__ */ jsx58(Text56, { bold: true, color: theme.text.primary, children: "Selecionar modelo" }),
30758
+ /* @__PURE__ */ jsx58(Text56, { color: theme.text.secondary, children: "para" }),
30755
30759
  /* @__PURE__ */ jsx58(Text56, { color: theme.text.accent, children: currentProvider })
30756
30760
  ] }),
30757
30761
  /* @__PURE__ */ jsx58(Text56, { color: theme.ui.comment, dimColor: true, children: "esc" })
@@ -30775,13 +30779,13 @@ var ModelDialog = ({
30775
30779
  ]
30776
30780
  }
30777
30781
  ),
30778
- loadState === "loading" && /* @__PURE__ */ jsx58(Box48, { marginY: 1, children: /* @__PURE__ */ jsx58(Text56, { color: theme.text.secondary, children: "Loading models\u2026" }) }),
30782
+ loadState === "loading" && /* @__PURE__ */ jsx58(Box48, { marginY: 1, children: /* @__PURE__ */ jsx58(Text56, { color: theme.text.secondary, children: "Carregando modelos\u2026" }) }),
30779
30783
  loadState === "error" && /* @__PURE__ */ jsxs52(Box48, { flexDirection: "column", marginY: 1, children: [
30780
- /* @__PURE__ */ jsx58(Text56, { color: theme.status.error, children: "\u2717 Could not load models" }),
30784
+ /* @__PURE__ */ jsx58(Text56, { color: theme.status.error, children: "\u2717 N\xE3o foi poss\xEDvel carregar modelos" }),
30781
30785
  /* @__PURE__ */ jsx58(Text56, { color: theme.ui.comment, dimColor: true, children: errorMsg })
30782
30786
  ] }),
30783
30787
  loadState === "ready" && selectableCount === 0 && /* @__PURE__ */ jsx58(Box48, { marginY: 1, children: /* @__PURE__ */ jsxs52(Text56, { color: theme.ui.comment, dimColor: true, children: [
30784
- 'No models match "',
30788
+ 'Nenhum modelo para "',
30785
30789
  search,
30786
30790
  '"'
30787
30791
  ] }) }),
@@ -30850,7 +30854,7 @@ var ModelDialog = ({
30850
30854
  borderLeft: false,
30851
30855
  borderRight: false,
30852
30856
  borderColor: theme.ui.comment,
30853
- children: /* @__PURE__ */ jsx58(Text56, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navigate type to search Enter use for session Esc close" })
30857
+ children: /* @__PURE__ */ jsx58(Text56, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navegar digitar para buscar Enter usar Esc fechar" })
30854
30858
  }
30855
30859
  )
30856
30860
  ]
@@ -31028,7 +31032,7 @@ var SessionsDialog = ({ cwd, onSelect, onClose }) => {
31028
31032
  minWidth: 60,
31029
31033
  children: [
31030
31034
  /* @__PURE__ */ jsxs54(Box50, { justifyContent: "space-between", marginBottom: 1, children: [
31031
- /* @__PURE__ */ jsx60(Text58, { bold: true, color: theme.text.primary, children: "Resume session" }),
31035
+ /* @__PURE__ */ jsx60(Text58, { bold: true, color: theme.text.primary, children: "Retomar sess\xE3o" }),
31032
31036
  /* @__PURE__ */ jsx60(Text58, { color: theme.ui.comment, dimColor: true, children: "esc" })
31033
31037
  ] }),
31034
31038
  /* @__PURE__ */ jsxs54(
@@ -31050,9 +31054,9 @@ var SessionsDialog = ({ cwd, onSelect, onClose }) => {
31050
31054
  ]
31051
31055
  }
31052
31056
  ),
31053
- loadState === "loading" && /* @__PURE__ */ jsx60(Box50, { marginY: 1, children: /* @__PURE__ */ jsx60(Text58, { color: theme.text.secondary, children: "Loading sessions\u2026" }) }),
31054
- loadState === "error" && /* @__PURE__ */ jsx60(Box50, { marginY: 1, children: /* @__PURE__ */ jsx60(Text58, { color: theme.status.error, children: "\u2717 Could not load sessions" }) }),
31055
- loadState === "ready" && sessions.length === 0 && /* @__PURE__ */ jsx60(Box50, { marginY: 1, children: /* @__PURE__ */ jsx60(Text58, { color: theme.ui.comment, dimColor: true, children: search ? `No sessions match "${search}"` : "No sessions found in .deepcode/sessions/" }) }),
31057
+ loadState === "loading" && /* @__PURE__ */ jsx60(Box50, { marginY: 1, children: /* @__PURE__ */ jsx60(Text58, { color: theme.text.secondary, children: "Carregando sess\xF5es\u2026" }) }),
31058
+ loadState === "error" && /* @__PURE__ */ jsx60(Box50, { marginY: 1, children: /* @__PURE__ */ jsx60(Text58, { color: theme.status.error, children: "\u2717 N\xE3o foi poss\xEDvel carregar sess\xF5es" }) }),
31059
+ loadState === "ready" && sessions.length === 0 && /* @__PURE__ */ jsx60(Box50, { marginY: 1, children: /* @__PURE__ */ jsx60(Text58, { color: theme.ui.comment, dimColor: true, children: search ? `Nenhuma sess\xE3o para "${search}"` : "Nenhuma sess\xE3o em .deepcode/sessions/" }) }),
31056
31060
  loadState === "ready" && sessions.length > 0 && /* @__PURE__ */ jsxs54(Box50, { flexDirection: "column", children: [
31057
31061
  canScrollUp && /* @__PURE__ */ jsx60(Text58, { color: theme.ui.comment, dimColor: true, children: " \u2191" }),
31058
31062
  visibleSessions.map((session, visIdx) => {
@@ -31112,7 +31116,7 @@ var SessionsDialog = ({ cwd, onSelect, onClose }) => {
31112
31116
  borderLeft: false,
31113
31117
  borderRight: false,
31114
31118
  borderColor: theme.ui.comment,
31115
- children: /* @__PURE__ */ jsx60(Text58, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navigate type to search Enter resume Esc close" })
31119
+ children: /* @__PURE__ */ jsx60(Text58, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navegar digitar para buscar Enter retomar Esc fechar" })
31116
31120
  }
31117
31121
  )
31118
31122
  ]
@@ -31751,13 +31755,17 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
31751
31755
  sessionStartedAt: sessionStartedAtRef.current
31752
31756
  }),
31753
31757
  setPermissions: (modes) => setPermissionModes((prev) => ({ ...prev, ...modes })),
31754
- newSession: handleNewSession
31758
+ newSession: handleNewSession,
31759
+ renameSession: (name) => {
31760
+ setSessionName(name);
31761
+ setSessionDisplayName(name.trim());
31762
+ }
31755
31763
  },
31756
31764
  session: {
31757
31765
  sessionShellAllowlist: sessionShellAllowlistRef.current
31758
31766
  }
31759
31767
  }),
31760
- [agentMode, configAdapter, cwd, handleCompact, handleNewSession, handleUndo, historyManager, lastOutputTokenCount, lastPromptTokenCount, mcpConnected, mcpTotal, pendingItem, sessionCommandServices, setPermissionModes]
31768
+ [agentMode, configAdapter, cwd, handleCompact, handleNewSession, handleUndo, historyManager, lastOutputTokenCount, lastPromptTokenCount, mcpConnected, mcpTotal, pendingItem, sessionCommandServices, setPermissionModes, setSessionDisplayName, setSessionName]
31761
31769
  );
31762
31770
  useEffect31(() => {
31763
31771
  messageQueueRef.current = messageQueue;
@@ -33018,7 +33026,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
33018
33026
  ),
33019
33027
  /* @__PURE__ */ jsx62(ShowMoreLines, { constrainHeight })
33020
33028
  ] }),
33021
- approvalQueue.length > 0 && /* @__PURE__ */ jsx62(Box52, { marginLeft: 2, marginRight: 2, marginTop: 1, children: /* @__PURE__ */ jsx62(ApprovalPrompt, { request: approvalQueue[0] }) }),
33029
+ approvalQueue.length > 0 && /* @__PURE__ */ jsx62(Box52, { marginLeft: 2, marginRight: 2, marginTop: 1, children: /* @__PURE__ */ jsx62(ApprovalPrompt, { request: approvalQueue[0], queueLength: approvalQueue.length }) }),
33022
33030
  dialogModel && /* @__PURE__ */ jsx62(CommandDialog, { title: dialogModel.title, lines: dialogModel.lines }),
33023
33031
  activeDialog === "provider" && /* @__PURE__ */ jsx62(
33024
33032
  ProviderDialog,
@@ -33256,7 +33264,7 @@ function formatAuthSummary(config) {
33256
33264
  return `github token=${tokenState}, ${oauthState}, ${enterprise}`;
33257
33265
  }
33258
33266
  var APPROVAL_PREVIEW_MAX_LINES = 4;
33259
- var ApprovalPrompt = ({ request }) => {
33267
+ var ApprovalPrompt = ({ request, queueLength = 1 }) => {
33260
33268
  if (!request) return null;
33261
33269
  const operationLabel = formatApprovalOperationLabel(request);
33262
33270
  const hasDiff = !!(request.diff?.before && request.diff?.after);
@@ -33286,7 +33294,8 @@ var ApprovalPrompt = ({ request }) => {
33286
33294
  children: [
33287
33295
  /* @__PURE__ */ jsxs56(Text60, { bold: true, color: theme.status.warning, children: [
33288
33296
  "\u26A0 ",
33289
- operationLabel
33297
+ operationLabel,
33298
+ queueLength > 1 && /* @__PURE__ */ jsx62(Text60, { color: theme.text.secondary, children: ` (1 de ${queueLength})` })
33290
33299
  ] }),
33291
33300
  request.path && /* @__PURE__ */ jsx62(Text60, { color: theme.text.secondary, children: request.path }),
33292
33301
  request.preview?.command && /* @__PURE__ */ jsxs56(Text60, { color: theme.text.primary, children: [
@@ -33318,16 +33327,16 @@ var ApprovalPrompt = ({ request }) => {
33318
33327
  };
33319
33328
  function formatApprovalOperationLabel(request) {
33320
33329
  const labels = {
33321
- write_file: "write file",
33322
- edit_file: "edit file",
33323
- read_file: "read file",
33324
- bash: "run shell command",
33325
- shell: "run shell command",
33326
- git: "run git command",
33327
- fetch_web: "fetch URL",
33328
- search_text: "search files",
33329
- list_dir: "list directory",
33330
- analyze_code: "analyze code"
33330
+ write_file: "escrever arquivo",
33331
+ edit_file: "editar arquivo",
33332
+ read_file: "ler arquivo",
33333
+ bash: "executar comando shell",
33334
+ shell: "executar comando shell",
33335
+ git: "executar comando git",
33336
+ fetch_web: "acessar URL",
33337
+ search_text: "buscar em arquivos",
33338
+ list_dir: "listar diret\xF3rio",
33339
+ analyze_code: "analisar c\xF3digo"
33331
33340
  };
33332
33341
  return labels[request.operation] ?? request.operation.replace(/_/g, " ");
33333
33342
  }