deepcode-ai 1.2.22 → 1.2.24

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.24".length > 0 ? "1.2.24" : "0.0.0-dev";
11513
11513
  async function updateCommand() {
11514
11514
  writeStdoutLine(`Current version: ${VERSION}`);
11515
11515
  const update = await checkForUpdate(VERSION, { force: true });
@@ -28726,7 +28726,8 @@ var AppHeader = ({
28726
28726
  cwd,
28727
28727
  providerLabel,
28728
28728
  mode,
28729
- iterationInfo
28729
+ iterationInfo,
28730
+ updateAvailable
28730
28731
  }) => {
28731
28732
  const {
28732
28733
  streamingState,
@@ -28799,6 +28800,14 @@ var AppHeader = ({
28799
28800
  " \u2193",
28800
28801
  fmt(totalOutputTokenCount)
28801
28802
  ] })
28803
+ ] }),
28804
+ updateAvailable && /* @__PURE__ */ jsxs45(Box41, { flexDirection: "row", gap: 1, children: [
28805
+ /* @__PURE__ */ jsx51(Text49, { color: theme.status.warning, children: "\u2B06" }),
28806
+ /* @__PURE__ */ jsxs45(Text49, { color: theme.text.secondary, dimColor: true, children: [
28807
+ "nova vers\xE3o dispon\xEDvel: ",
28808
+ updateAvailable,
28809
+ " \u2014 execute /update"
28810
+ ] })
28802
28811
  ] })
28803
28812
  ]
28804
28813
  }
@@ -29851,11 +29860,15 @@ var renameCommand = {
29851
29860
  content: t("Usage: /rename <session name>")
29852
29861
  };
29853
29862
  }
29854
- session.setName(name);
29863
+ if (context.ui.renameSession) {
29864
+ context.ui.renameSession(name);
29865
+ } else {
29866
+ session.setName(name);
29867
+ }
29855
29868
  return {
29856
29869
  type: "message",
29857
29870
  messageType: "info",
29858
- content: `Session renamed to "${name}".`
29871
+ content: `Sess\xE3o renomeada para "${name}".`
29859
29872
  };
29860
29873
  }
29861
29874
  };
@@ -30021,7 +30034,7 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
30021
30034
  isFocused: true
30022
30035
  }
30023
30036
  ),
30024
- /* @__PURE__ */ jsx54(Text52, { color: theme.text.secondary, children: "\u2191\u2193 navigate \xB7 Enter apply \xB7 Esc cancel" })
30037
+ /* @__PURE__ */ jsx54(Text52, { color: theme.text.secondary, children: "\u2191\u2193 navegar \xB7 Enter aplicar \xB7 Esc cancelar" })
30025
30038
  ]
30026
30039
  }
30027
30040
  );
@@ -30435,7 +30448,7 @@ var PermissionsDialog = ({
30435
30448
  marginLeft: 2,
30436
30449
  marginRight: 2,
30437
30450
  children: [
30438
- /* @__PURE__ */ jsx56(Text54, { bold: true, color: theme.text.accent, children: "Permission policy" }),
30451
+ /* @__PURE__ */ jsx56(Text54, { bold: true, color: theme.text.accent, children: "Permiss\xF5es" }),
30439
30452
  PERMISSION_KEYS.map((key, i) => {
30440
30453
  const focused = focusIndex === i;
30441
30454
  const mode = modes[key];
@@ -30447,13 +30460,13 @@ var PermissionsDialog = ({
30447
30460
  }),
30448
30461
  /* @__PURE__ */ jsx56(Box46, { marginTop: 1, flexDirection: "column", children: ACTIONS3.map((action, i) => {
30449
30462
  const focused = focusIndex === PERMISSION_KEYS.length + i;
30450
- const label = action === "save" ? dirty ? "Save changes" : "Save changes (no edits)" : "Cancel";
30463
+ const label = action === "save" ? dirty ? "Salvar" : "Salvar (sem edi\xE7\xF5es)" : "Cancelar";
30451
30464
  return /* @__PURE__ */ jsxs50(Box46, { flexDirection: "row", gap: 1, children: [
30452
30465
  /* @__PURE__ */ jsx56(Text54, { color: focused ? theme.text.accent : theme.text.secondary, children: focused ? "\u203A" : " " }),
30453
30466
  /* @__PURE__ */ jsx56(Text54, { color: focused ? theme.text.primary : theme.text.secondary, bold: focused, children: label })
30454
30467
  ] }, action);
30455
30468
  }) }),
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" })
30469
+ /* @__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
30470
  ]
30458
30471
  }
30459
30472
  );
@@ -30631,7 +30644,7 @@ function buildRows(models, currentId, search) {
30631
30644
  if (!search && currentId) {
30632
30645
  const recent = filtered.find((m) => m.id === currentId);
30633
30646
  if (recent) {
30634
- rows.push({ kind: "header", label: "Recent" });
30647
+ rows.push({ kind: "header", label: "Recente" });
30635
30648
  rows.push({ kind: "item", model: recent, selIndex: selIndex++ });
30636
30649
  }
30637
30650
  }
@@ -30750,8 +30763,8 @@ var ModelDialog = ({
30750
30763
  children: [
30751
30764
  /* @__PURE__ */ jsxs52(Box48, { justifyContent: "space-between", marginBottom: 1, children: [
30752
30765
  /* @__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" }),
30766
+ /* @__PURE__ */ jsx58(Text56, { bold: true, color: theme.text.primary, children: "Selecionar modelo" }),
30767
+ /* @__PURE__ */ jsx58(Text56, { color: theme.text.secondary, children: "para" }),
30755
30768
  /* @__PURE__ */ jsx58(Text56, { color: theme.text.accent, children: currentProvider })
30756
30769
  ] }),
30757
30770
  /* @__PURE__ */ jsx58(Text56, { color: theme.ui.comment, dimColor: true, children: "esc" })
@@ -30775,13 +30788,13 @@ var ModelDialog = ({
30775
30788
  ]
30776
30789
  }
30777
30790
  ),
30778
- loadState === "loading" && /* @__PURE__ */ jsx58(Box48, { marginY: 1, children: /* @__PURE__ */ jsx58(Text56, { color: theme.text.secondary, children: "Loading models\u2026" }) }),
30791
+ loadState === "loading" && /* @__PURE__ */ jsx58(Box48, { marginY: 1, children: /* @__PURE__ */ jsx58(Text56, { color: theme.text.secondary, children: "Carregando modelos\u2026" }) }),
30779
30792
  loadState === "error" && /* @__PURE__ */ jsxs52(Box48, { flexDirection: "column", marginY: 1, children: [
30780
- /* @__PURE__ */ jsx58(Text56, { color: theme.status.error, children: "\u2717 Could not load models" }),
30793
+ /* @__PURE__ */ jsx58(Text56, { color: theme.status.error, children: "\u2717 N\xE3o foi poss\xEDvel carregar modelos" }),
30781
30794
  /* @__PURE__ */ jsx58(Text56, { color: theme.ui.comment, dimColor: true, children: errorMsg })
30782
30795
  ] }),
30783
30796
  loadState === "ready" && selectableCount === 0 && /* @__PURE__ */ jsx58(Box48, { marginY: 1, children: /* @__PURE__ */ jsxs52(Text56, { color: theme.ui.comment, dimColor: true, children: [
30784
- 'No models match "',
30797
+ 'Nenhum modelo para "',
30785
30798
  search,
30786
30799
  '"'
30787
30800
  ] }) }),
@@ -30850,7 +30863,7 @@ var ModelDialog = ({
30850
30863
  borderLeft: false,
30851
30864
  borderRight: false,
30852
30865
  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" })
30866
+ children: /* @__PURE__ */ jsx58(Text56, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navegar digitar para buscar Enter usar Esc fechar" })
30854
30867
  }
30855
30868
  )
30856
30869
  ]
@@ -31028,7 +31041,7 @@ var SessionsDialog = ({ cwd, onSelect, onClose }) => {
31028
31041
  minWidth: 60,
31029
31042
  children: [
31030
31043
  /* @__PURE__ */ jsxs54(Box50, { justifyContent: "space-between", marginBottom: 1, children: [
31031
- /* @__PURE__ */ jsx60(Text58, { bold: true, color: theme.text.primary, children: "Resume session" }),
31044
+ /* @__PURE__ */ jsx60(Text58, { bold: true, color: theme.text.primary, children: "Retomar sess\xE3o" }),
31032
31045
  /* @__PURE__ */ jsx60(Text58, { color: theme.ui.comment, dimColor: true, children: "esc" })
31033
31046
  ] }),
31034
31047
  /* @__PURE__ */ jsxs54(
@@ -31050,9 +31063,9 @@ var SessionsDialog = ({ cwd, onSelect, onClose }) => {
31050
31063
  ]
31051
31064
  }
31052
31065
  ),
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/" }) }),
31066
+ loadState === "loading" && /* @__PURE__ */ jsx60(Box50, { marginY: 1, children: /* @__PURE__ */ jsx60(Text58, { color: theme.text.secondary, children: "Carregando sess\xF5es\u2026" }) }),
31067
+ 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" }) }),
31068
+ 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
31069
  loadState === "ready" && sessions.length > 0 && /* @__PURE__ */ jsxs54(Box50, { flexDirection: "column", children: [
31057
31070
  canScrollUp && /* @__PURE__ */ jsx60(Text58, { color: theme.ui.comment, dimColor: true, children: " \u2191" }),
31058
31071
  visibleSessions.map((session, visIdx) => {
@@ -31112,7 +31125,7 @@ var SessionsDialog = ({ cwd, onSelect, onClose }) => {
31112
31125
  borderLeft: false,
31113
31126
  borderRight: false,
31114
31127
  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" })
31128
+ children: /* @__PURE__ */ jsx60(Text58, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navegar digitar para buscar Enter retomar Esc fechar" })
31116
31129
  }
31117
31130
  )
31118
31131
  ]
@@ -31442,6 +31455,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
31442
31455
  dangerous: "ask"
31443
31456
  });
31444
31457
  const [sessionDisplayName, setSessionDisplayName] = useState33("");
31458
+ const [updateAvailable, setUpdateAvailable] = useState33(null);
31445
31459
  const [providerConfigVersion, setProviderConfigVersion] = useState33(0);
31446
31460
  const [, setThemeVersion] = useState33(0);
31447
31461
  const [mcpConnected, setMcpConnected] = useState33(0);
@@ -31751,13 +31765,17 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
31751
31765
  sessionStartedAt: sessionStartedAtRef.current
31752
31766
  }),
31753
31767
  setPermissions: (modes) => setPermissionModes((prev) => ({ ...prev, ...modes })),
31754
- newSession: handleNewSession
31768
+ newSession: handleNewSession,
31769
+ renameSession: (name) => {
31770
+ setSessionName(name);
31771
+ setSessionDisplayName(name.trim());
31772
+ }
31755
31773
  },
31756
31774
  session: {
31757
31775
  sessionShellAllowlist: sessionShellAllowlistRef.current
31758
31776
  }
31759
31777
  }),
31760
- [agentMode, configAdapter, cwd, handleCompact, handleNewSession, handleUndo, historyManager, lastOutputTokenCount, lastPromptTokenCount, mcpConnected, mcpTotal, pendingItem, sessionCommandServices, setPermissionModes]
31778
+ [agentMode, configAdapter, cwd, handleCompact, handleNewSession, handleUndo, historyManager, lastOutputTokenCount, lastPromptTokenCount, mcpConnected, mcpTotal, pendingItem, sessionCommandServices, setPermissionModes, setSessionDisplayName, setSessionName]
31761
31779
  );
31762
31780
  useEffect31(() => {
31763
31781
  messageQueueRef.current = messageQueue;
@@ -32024,19 +32042,13 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
32024
32042
  if (!mounted || !update) return;
32025
32043
  const available = [];
32026
32044
  if (isNewer(VERSION, update.latest)) {
32027
- available.push(`latest v${update.latest}`);
32045
+ available.push(`v${update.latest}`);
32028
32046
  }
32029
32047
  if (update.stable && isNewer(VERSION, update.stable)) {
32030
- available.push(`stable v${update.stable}`);
32048
+ available.push(`v${update.stable} (stable)`);
32031
32049
  }
32032
32050
  if (available.length === 0) return;
32033
- addHistoryItem(
32034
- {
32035
- type: "info",
32036
- text: `Atualiza\xE7\xE3o dispon\xEDvel: ${available.join(", ")}. Execute /update para instru\xE7\xF5es.`
32037
- },
32038
- Date.now()
32039
- );
32051
+ setUpdateAvailable(available[0] ?? null);
32040
32052
  }).catch(() => {
32041
32053
  });
32042
32054
  } catch (error) {
@@ -32997,7 +33009,8 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
32997
33009
  cwd,
32998
33010
  providerLabel,
32999
33011
  mode: agentMode,
33000
- iterationInfo
33012
+ iterationInfo,
33013
+ updateAvailable
33001
33014
  }
33002
33015
  ),
33003
33016
  initError ? /* @__PURE__ */ jsx62(Box52, { marginLeft: 2, marginRight: 2, children: /* @__PURE__ */ jsxs56(Text60, { color: theme.status.error, children: [
@@ -33018,7 +33031,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
33018
33031
  ),
33019
33032
  /* @__PURE__ */ jsx62(ShowMoreLines, { constrainHeight })
33020
33033
  ] }),
33021
- approvalQueue.length > 0 && /* @__PURE__ */ jsx62(Box52, { marginLeft: 2, marginRight: 2, marginTop: 1, children: /* @__PURE__ */ jsx62(ApprovalPrompt, { request: approvalQueue[0] }) }),
33034
+ approvalQueue.length > 0 && /* @__PURE__ */ jsx62(Box52, { marginLeft: 2, marginRight: 2, marginTop: 1, children: /* @__PURE__ */ jsx62(ApprovalPrompt, { request: approvalQueue[0], queueLength: approvalQueue.length }) }),
33022
33035
  dialogModel && /* @__PURE__ */ jsx62(CommandDialog, { title: dialogModel.title, lines: dialogModel.lines }),
33023
33036
  activeDialog === "provider" && /* @__PURE__ */ jsx62(
33024
33037
  ProviderDialog,
@@ -33256,7 +33269,7 @@ function formatAuthSummary(config) {
33256
33269
  return `github token=${tokenState}, ${oauthState}, ${enterprise}`;
33257
33270
  }
33258
33271
  var APPROVAL_PREVIEW_MAX_LINES = 4;
33259
- var ApprovalPrompt = ({ request }) => {
33272
+ var ApprovalPrompt = ({ request, queueLength = 1 }) => {
33260
33273
  if (!request) return null;
33261
33274
  const operationLabel = formatApprovalOperationLabel(request);
33262
33275
  const hasDiff = !!(request.diff?.before && request.diff?.after);
@@ -33286,7 +33299,8 @@ var ApprovalPrompt = ({ request }) => {
33286
33299
  children: [
33287
33300
  /* @__PURE__ */ jsxs56(Text60, { bold: true, color: theme.status.warning, children: [
33288
33301
  "\u26A0 ",
33289
- operationLabel
33302
+ operationLabel,
33303
+ queueLength > 1 && /* @__PURE__ */ jsx62(Text60, { color: theme.text.secondary, children: ` (1 de ${queueLength})` })
33290
33304
  ] }),
33291
33305
  request.path && /* @__PURE__ */ jsx62(Text60, { color: theme.text.secondary, children: request.path }),
33292
33306
  request.preview?.command && /* @__PURE__ */ jsxs56(Text60, { color: theme.text.primary, children: [
@@ -33318,16 +33332,16 @@ var ApprovalPrompt = ({ request }) => {
33318
33332
  };
33319
33333
  function formatApprovalOperationLabel(request) {
33320
33334
  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"
33335
+ write_file: "escrever arquivo",
33336
+ edit_file: "editar arquivo",
33337
+ read_file: "ler arquivo",
33338
+ bash: "executar comando shell",
33339
+ shell: "executar comando shell",
33340
+ git: "executar comando git",
33341
+ fetch_web: "acessar URL",
33342
+ search_text: "buscar em arquivos",
33343
+ list_dir: "listar diret\xF3rio",
33344
+ analyze_code: "analisar c\xF3digo"
33331
33345
  };
33332
33346
  return labels[request.operation] ?? request.operation.replace(/_/g, " ");
33333
33347
  }