deepcode-ai 1.2.24 → 1.2.27
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 +149 -127
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7863,7 +7863,7 @@ import os4 from "os";
|
|
|
7863
7863
|
import path62 from "path";
|
|
7864
7864
|
import fs12 from "fs";
|
|
7865
7865
|
import path19 from "path";
|
|
7866
|
-
import { isValidElement, useCallback as useCallback28, useEffect as useEffect31, useMemo as useMemo19, useRef as useRef21, useState as useState33 } from "react";
|
|
7866
|
+
import React41, { isValidElement, useCallback as useCallback28, useEffect as useEffect31, useMemo as useMemo19, useRef as useRef21, useState as useState33 } from "react";
|
|
7867
7867
|
import { Box as Box52, Text as Text60, useInput as useInput6, useStdin as useStdin3 } from "ink";
|
|
7868
7868
|
import os22 from "os";
|
|
7869
7869
|
import path92 from "path";
|
|
@@ -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.
|
|
11512
|
+
var VERSION = "1.2.27".length > 0 ? "1.2.27" : "0.0.0-dev";
|
|
11513
11513
|
async function updateCommand() {
|
|
11514
11514
|
writeStdoutLine(`Current version: ${VERSION}`);
|
|
11515
11515
|
const update = await checkForUpdate(VERSION, { force: true });
|
|
@@ -28727,7 +28727,8 @@ var AppHeader = ({
|
|
|
28727
28727
|
providerLabel,
|
|
28728
28728
|
mode,
|
|
28729
28729
|
iterationInfo,
|
|
28730
|
-
updateAvailable
|
|
28730
|
+
updateAvailable,
|
|
28731
|
+
sessionName
|
|
28731
28732
|
}) => {
|
|
28732
28733
|
const {
|
|
28733
28734
|
streamingState,
|
|
@@ -28787,6 +28788,10 @@ var AppHeader = ({
|
|
|
28787
28788
|
] }),
|
|
28788
28789
|
/* @__PURE__ */ jsxs45(Box41, { flexDirection: "row", children: [
|
|
28789
28790
|
/* @__PURE__ */ jsx51(Text49, { color: theme.text.secondary, dimColor: true, children: displayDir }),
|
|
28791
|
+
sessionName && /* @__PURE__ */ jsxs45(Text49, { color: theme.text.accent, dimColor: true, children: [
|
|
28792
|
+
" ",
|
|
28793
|
+
sessionName
|
|
28794
|
+
] }),
|
|
28790
28795
|
branchName && /* @__PURE__ */ jsxs45(Text49, { color: theme.text.accent, dimColor: true, children: [
|
|
28791
28796
|
" ",
|
|
28792
28797
|
"(",
|
|
@@ -30958,7 +30963,7 @@ function sessionLabel2(session) {
|
|
|
30958
30963
|
const preview = typeof firstUser?.content === "string" ? firstUser.content.trim().slice(0, 60) : "";
|
|
30959
30964
|
return name ?? (preview || "(sem mensagens)");
|
|
30960
30965
|
}
|
|
30961
|
-
var SessionsDialog = ({ cwd, onSelect, onClose }) => {
|
|
30966
|
+
var SessionsDialog = ({ cwd, currentSessionId, onSelect, onClose }) => {
|
|
30962
30967
|
const [loadState, setLoadState] = useState32("loading");
|
|
30963
30968
|
const [allSessions, setAllSessions] = useState32([]);
|
|
30964
30969
|
const [search, setSearch] = useState32("");
|
|
@@ -31076,9 +31081,10 @@ var SessionsDialog = ({ cwd, onSelect, onClose }) => {
|
|
|
31076
31081
|
const target = session.model ? `${session.provider}/${session.model}` : session.provider;
|
|
31077
31082
|
const msgCount = session.messages.length;
|
|
31078
31083
|
const preview = sessionLabel2(session);
|
|
31084
|
+
const isCurrent = session.id === currentSessionId;
|
|
31079
31085
|
return /* @__PURE__ */ jsxs54(Box50, { flexDirection: "column", children: [
|
|
31080
31086
|
/* @__PURE__ */ jsxs54(Box50, { gap: 1, children: [
|
|
31081
|
-
/* @__PURE__ */ jsx60(Text58, { color: isActive ? theme.text.accent : theme.ui.comment, children: isActive ? "\u203A" : " " }),
|
|
31087
|
+
/* @__PURE__ */ jsx60(Text58, { color: isActive ? theme.text.accent : isCurrent ? theme.status.success : theme.ui.comment, children: isCurrent ? "\u25CF" : isActive ? "\u203A" : " " }),
|
|
31082
31088
|
/* @__PURE__ */ jsx60(
|
|
31083
31089
|
Text58,
|
|
31084
31090
|
{
|
|
@@ -31412,6 +31418,13 @@ function formatModelCatalogSummary2(result) {
|
|
|
31412
31418
|
return "model catalog unavailable";
|
|
31413
31419
|
}
|
|
31414
31420
|
var APPROVAL_ENTER_ARM_DELAY_MS = 350;
|
|
31421
|
+
var VimToggleRegistrar = ({ onRegister }) => {
|
|
31422
|
+
const { toggleVimEnabled } = useVimMode();
|
|
31423
|
+
React41.useEffect(() => {
|
|
31424
|
+
onRegister(toggleVimEnabled);
|
|
31425
|
+
}, [onRegister, toggleVimEnabled]);
|
|
31426
|
+
return null;
|
|
31427
|
+
};
|
|
31415
31428
|
var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarnings = [] }) => {
|
|
31416
31429
|
const historyManager = useHistory();
|
|
31417
31430
|
const addHistoryItem = historyManager.addItem;
|
|
@@ -31456,6 +31469,10 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
31456
31469
|
});
|
|
31457
31470
|
const [sessionDisplayName, setSessionDisplayName] = useState33("");
|
|
31458
31471
|
const [updateAvailable, setUpdateAvailable] = useState33(null);
|
|
31472
|
+
const vimToggleRef = useRef21(null);
|
|
31473
|
+
const registerVimToggle = React41.useCallback((fn) => {
|
|
31474
|
+
vimToggleRef.current = fn;
|
|
31475
|
+
}, []);
|
|
31459
31476
|
const [providerConfigVersion, setProviderConfigVersion] = useState33(0);
|
|
31460
31477
|
const [, setThemeVersion] = useState33(0);
|
|
31461
31478
|
const [mcpConnected, setMcpConnected] = useState33(0);
|
|
@@ -31739,7 +31756,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
31739
31756
|
pendingItem,
|
|
31740
31757
|
setPendingItem,
|
|
31741
31758
|
loadHistory: historyManager.loadHistory,
|
|
31742
|
-
toggleVimEnabled:
|
|
31759
|
+
toggleVimEnabled: () => vimToggleRef.current?.() ?? Promise.resolve(false),
|
|
31743
31760
|
reloadCommands: () => {
|
|
31744
31761
|
},
|
|
31745
31762
|
undo: handleUndo,
|
|
@@ -33001,131 +33018,136 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33001
33018
|
userMessages
|
|
33002
33019
|
]
|
|
33003
33020
|
);
|
|
33004
|
-
return /* @__PURE__ */ jsx62(AppContext.Provider, { value: appContextValue, children: /* @__PURE__ */ jsx62(CompactModeProvider, { value: { compactMode }, children: /* @__PURE__ */ jsx62(ConfigContext.Provider, { value: configAdapter, children: /* @__PURE__ */ jsx62(SettingsContext.Provider, { value: loadedSettings, children: /* @__PURE__ */ jsx62(StreamingContext.Provider, { value: streamingState, children: /* @__PURE__ */
|
|
33005
|
-
/* @__PURE__ */ jsx62(
|
|
33006
|
-
|
|
33007
|
-
{
|
|
33008
|
-
version: VERSION,
|
|
33009
|
-
cwd,
|
|
33010
|
-
providerLabel,
|
|
33011
|
-
mode: agentMode,
|
|
33012
|
-
iterationInfo,
|
|
33013
|
-
updateAvailable
|
|
33014
|
-
}
|
|
33015
|
-
),
|
|
33016
|
-
initError ? /* @__PURE__ */ jsx62(Box52, { marginLeft: 2, marginRight: 2, children: /* @__PURE__ */ jsxs56(Text60, { color: theme.status.error, children: [
|
|
33017
|
-
"Failed to initialize runtime: ",
|
|
33018
|
-
initError
|
|
33019
|
-
] }) }) : /* @__PURE__ */ jsxs56(Box52, { flexDirection: "column", flexGrow: 1, children: [
|
|
33021
|
+
return /* @__PURE__ */ jsx62(AppContext.Provider, { value: appContextValue, children: /* @__PURE__ */ jsx62(CompactModeProvider, { value: { compactMode }, children: /* @__PURE__ */ jsx62(ConfigContext.Provider, { value: configAdapter, children: /* @__PURE__ */ jsx62(SettingsContext.Provider, { value: loadedSettings, children: /* @__PURE__ */ jsx62(StreamingContext.Provider, { value: streamingState, children: /* @__PURE__ */ jsxs56(VimModeProvider, { initialVimEnabled: loadedSettings.merged.general?.vimMode ?? false, children: [
|
|
33022
|
+
/* @__PURE__ */ jsx62(VimToggleRegistrar, { onRegister: registerVimToggle }),
|
|
33023
|
+
/* @__PURE__ */ jsx62(KeypressProvider, { kittyProtocolEnabled: false, config: configAdapter, children: /* @__PURE__ */ jsx62(ShellFocusContext.Provider, { value: true, children: /* @__PURE__ */ jsx62(AgentViewProvider, { children: /* @__PURE__ */ jsx62(BackgroundTaskViewProvider, { children: /* @__PURE__ */ jsx62(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ jsx62(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ jsxs56(Box52, { flexDirection: "column", flexGrow: 1, children: [
|
|
33020
33024
|
/* @__PURE__ */ jsx62(
|
|
33021
|
-
|
|
33025
|
+
AppHeader,
|
|
33022
33026
|
{
|
|
33023
|
-
|
|
33024
|
-
|
|
33025
|
-
|
|
33026
|
-
|
|
33027
|
-
|
|
33028
|
-
|
|
33029
|
-
|
|
33027
|
+
version: VERSION,
|
|
33028
|
+
cwd,
|
|
33029
|
+
providerLabel,
|
|
33030
|
+
mode: agentMode,
|
|
33031
|
+
iterationInfo,
|
|
33032
|
+
updateAvailable,
|
|
33033
|
+
sessionName: sessionDisplayName || void 0
|
|
33030
33034
|
}
|
|
33031
33035
|
),
|
|
33032
|
-
/* @__PURE__ */ jsx62(
|
|
33033
|
-
|
|
33034
|
-
|
|
33035
|
-
|
|
33036
|
-
|
|
33037
|
-
|
|
33038
|
-
|
|
33039
|
-
|
|
33040
|
-
|
|
33041
|
-
|
|
33042
|
-
|
|
33043
|
-
|
|
33044
|
-
|
|
33045
|
-
|
|
33046
|
-
|
|
33047
|
-
|
|
33048
|
-
|
|
33049
|
-
}
|
|
33050
|
-
|
|
33051
|
-
|
|
33052
|
-
|
|
33053
|
-
|
|
33054
|
-
|
|
33055
|
-
|
|
33056
|
-
|
|
33057
|
-
|
|
33058
|
-
|
|
33059
|
-
|
|
33060
|
-
|
|
33061
|
-
|
|
33062
|
-
|
|
33063
|
-
|
|
33064
|
-
|
|
33065
|
-
|
|
33066
|
-
|
|
33067
|
-
|
|
33068
|
-
|
|
33069
|
-
|
|
33070
|
-
|
|
33071
|
-
|
|
33072
|
-
|
|
33073
|
-
|
|
33074
|
-
|
|
33075
|
-
|
|
33076
|
-
|
|
33077
|
-
|
|
33078
|
-
|
|
33079
|
-
|
|
33080
|
-
|
|
33081
|
-
|
|
33082
|
-
|
|
33083
|
-
|
|
33084
|
-
|
|
33085
|
-
|
|
33086
|
-
|
|
33087
|
-
|
|
33088
|
-
|
|
33089
|
-
|
|
33090
|
-
|
|
33091
|
-
|
|
33092
|
-
|
|
33093
|
-
|
|
33094
|
-
|
|
33095
|
-
|
|
33096
|
-
|
|
33097
|
-
|
|
33098
|
-
|
|
33099
|
-
|
|
33100
|
-
|
|
33101
|
-
|
|
33102
|
-
|
|
33103
|
-
|
|
33104
|
-
|
|
33105
|
-
|
|
33106
|
-
|
|
33107
|
-
|
|
33108
|
-
|
|
33109
|
-
|
|
33110
|
-
|
|
33111
|
-
|
|
33112
|
-
|
|
33113
|
-
|
|
33114
|
-
|
|
33115
|
-
|
|
33116
|
-
|
|
33117
|
-
|
|
33118
|
-
|
|
33119
|
-
|
|
33120
|
-
|
|
33121
|
-
|
|
33122
|
-
|
|
33123
|
-
|
|
33124
|
-
|
|
33125
|
-
|
|
33126
|
-
|
|
33127
|
-
|
|
33128
|
-
|
|
33036
|
+
initError ? /* @__PURE__ */ jsx62(Box52, { marginLeft: 2, marginRight: 2, children: /* @__PURE__ */ jsxs56(Text60, { color: theme.status.error, children: [
|
|
33037
|
+
"Failed to initialize runtime: ",
|
|
33038
|
+
initError
|
|
33039
|
+
] }) }) : /* @__PURE__ */ jsxs56(Box52, { flexDirection: "column", flexGrow: 1, children: [
|
|
33040
|
+
/* @__PURE__ */ jsx62(
|
|
33041
|
+
MainContent,
|
|
33042
|
+
{
|
|
33043
|
+
history: historyManager.history,
|
|
33044
|
+
historyRemountKey,
|
|
33045
|
+
pendingAssistantText,
|
|
33046
|
+
liveToolCalls,
|
|
33047
|
+
terminalWidth,
|
|
33048
|
+
mainAreaWidth,
|
|
33049
|
+
isFocused: approvalQueue.length === 0
|
|
33050
|
+
}
|
|
33051
|
+
),
|
|
33052
|
+
/* @__PURE__ */ jsx62(ShowMoreLines, { constrainHeight })
|
|
33053
|
+
] }),
|
|
33054
|
+
approvalQueue.length > 0 && /* @__PURE__ */ jsx62(Box52, { marginLeft: 2, marginRight: 2, marginTop: 1, children: /* @__PURE__ */ jsx62(ApprovalPrompt, { request: approvalQueue[0], queueLength: approvalQueue.length }) }),
|
|
33055
|
+
dialogModel && /* @__PURE__ */ jsx62(CommandDialog, { title: dialogModel.title, lines: dialogModel.lines }),
|
|
33056
|
+
activeDialog === "provider" && /* @__PURE__ */ jsx62(
|
|
33057
|
+
ProviderDialog,
|
|
33058
|
+
{
|
|
33059
|
+
providers: listAvailableProviders(),
|
|
33060
|
+
currentProvider: getSessionCommandState().provider,
|
|
33061
|
+
currentModel: getSessionCommandState().model,
|
|
33062
|
+
hasApiKey: providerHasApiKey,
|
|
33063
|
+
getProviderKeyHint,
|
|
33064
|
+
onSelectProvider: setSessionProvider,
|
|
33065
|
+
onSetDefaultProvider: handleSetDefaultProvider,
|
|
33066
|
+
onSaveApiKey: handleSaveProviderApiKey,
|
|
33067
|
+
onTestProvider: handleTestProvider,
|
|
33068
|
+
onClose: closeDialog
|
|
33069
|
+
}
|
|
33070
|
+
),
|
|
33071
|
+
activeDialog === "model" && /* @__PURE__ */ jsx62(
|
|
33072
|
+
ModelDialog,
|
|
33073
|
+
{
|
|
33074
|
+
currentProvider: getSessionCommandState().provider,
|
|
33075
|
+
currentModel: getSessionCommandState().model,
|
|
33076
|
+
onFetchModels: handleFetchModels,
|
|
33077
|
+
onSelectModel: handleSelectModel,
|
|
33078
|
+
onClose: closeDialog
|
|
33079
|
+
}
|
|
33080
|
+
),
|
|
33081
|
+
activeDialog === "theme" && /* @__PURE__ */ jsx62(
|
|
33082
|
+
ThemeDialog,
|
|
33083
|
+
{
|
|
33084
|
+
onSelect: handleSelectTheme,
|
|
33085
|
+
onClose: closeDialog,
|
|
33086
|
+
onPreview: previewTheme
|
|
33087
|
+
}
|
|
33088
|
+
),
|
|
33089
|
+
activeDialog === "permissions" && /* @__PURE__ */ jsx62(
|
|
33090
|
+
PermissionsDialog,
|
|
33091
|
+
{
|
|
33092
|
+
current: permissionModes,
|
|
33093
|
+
onSave: handleSavePermissions,
|
|
33094
|
+
onClose: closeDialog
|
|
33095
|
+
}
|
|
33096
|
+
),
|
|
33097
|
+
activeDialog === "auth" && runtimeRef.current && /* @__PURE__ */ jsx62(
|
|
33098
|
+
AuthDialog,
|
|
33099
|
+
{
|
|
33100
|
+
clientId: runtimeRef.current.config.github.oauthClientId,
|
|
33101
|
+
scopes: runtimeRef.current.config.github.oauthScopes,
|
|
33102
|
+
enterpriseUrl: runtimeRef.current.config.github.enterpriseUrl,
|
|
33103
|
+
worktree: cwd,
|
|
33104
|
+
statusSummary: authSummary,
|
|
33105
|
+
hasToken: Boolean(runtimeRef.current.config.github.token),
|
|
33106
|
+
onPersistToken: handlePersistToken,
|
|
33107
|
+
onClose: closeDialog
|
|
33108
|
+
}
|
|
33109
|
+
),
|
|
33110
|
+
activeDialog === "feedback" && /* @__PURE__ */ jsx62(FeedbackDialog, { cwd, onClose: closeDialog }),
|
|
33111
|
+
activeDialog === "sessions" && /* @__PURE__ */ jsx62(
|
|
33112
|
+
SessionsDialog,
|
|
33113
|
+
{
|
|
33114
|
+
cwd,
|
|
33115
|
+
currentSessionId: sessionRef.current?.id,
|
|
33116
|
+
onSelect: handleSelectSession,
|
|
33117
|
+
onClose: closeDialog
|
|
33118
|
+
}
|
|
33119
|
+
),
|
|
33120
|
+
pendingCommandConfirmation && /* @__PURE__ */ jsx62(
|
|
33121
|
+
CommandDialog,
|
|
33122
|
+
{
|
|
33123
|
+
title: "Confirm action",
|
|
33124
|
+
lines: [
|
|
33125
|
+
...pendingCommandConfirmation.promptLines,
|
|
33126
|
+
"",
|
|
33127
|
+
`Command: ${pendingCommandConfirmation.rawInvocation}`
|
|
33128
|
+
],
|
|
33129
|
+
footerText: "Press y or Enter to confirm. Press n or Esc to cancel."
|
|
33130
|
+
}
|
|
33131
|
+
),
|
|
33132
|
+
/* @__PURE__ */ jsx62(
|
|
33133
|
+
SubagentsPanel,
|
|
33134
|
+
{
|
|
33135
|
+
subagents: Array.from(subagentMap.values()),
|
|
33136
|
+
mainAreaWidth
|
|
33137
|
+
}
|
|
33138
|
+
),
|
|
33139
|
+
stickyTodos && /* @__PURE__ */ jsx62(
|
|
33140
|
+
StickyTodoList,
|
|
33141
|
+
{
|
|
33142
|
+
todos: stickyTodos,
|
|
33143
|
+
width: mainAreaWidth,
|
|
33144
|
+
maxVisibleItems: stickyTodoMaxItems
|
|
33145
|
+
}
|
|
33146
|
+
),
|
|
33147
|
+
/* @__PURE__ */ jsx62(Notifications, {}),
|
|
33148
|
+
/* @__PURE__ */ jsx62(Composer, {})
|
|
33149
|
+
] }) }) }) }) }) }) })
|
|
33150
|
+
] }) }) }) }) }) });
|
|
33129
33151
|
};
|
|
33130
33152
|
function formatProviderLabel(provider, model) {
|
|
33131
33153
|
return model ? `${provider} \u203A ${model}` : `${provider} \u203A (model unset)`;
|