deepcode-ai 1.2.27 → 1.2.28
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 +312 -293
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7864,7 +7864,7 @@ import path62 from "path";
|
|
|
7864
7864
|
import fs12 from "fs";
|
|
7865
7865
|
import path19 from "path";
|
|
7866
7866
|
import React41, { isValidElement, useCallback as useCallback28, useEffect as useEffect31, useMemo as useMemo19, useRef as useRef21, useState as useState33 } from "react";
|
|
7867
|
-
import { Box as
|
|
7867
|
+
import { Box as Box53, Text as Text61, useInput as useInput6, useStdin as useStdin3 } from "ink";
|
|
7868
7868
|
import os22 from "os";
|
|
7869
7869
|
import path92 from "path";
|
|
7870
7870
|
import fs22 from "fs";
|
|
@@ -9873,9 +9873,11 @@ import fs7 from "fs";
|
|
|
9873
9873
|
import fsPromises from "fs/promises";
|
|
9874
9874
|
import path142 from "path";
|
|
9875
9875
|
import { Fragment as Fragment10, jsx as jsx51, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
9876
|
-
import { memo, useMemo as useMemo12 } from "react";
|
|
9877
9876
|
import { Box as Box42, Text as Text50 } from "ink";
|
|
9878
9877
|
import { jsx as jsx52, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
9878
|
+
import { memo, useMemo as useMemo12 } from "react";
|
|
9879
|
+
import { Box as Box43, Text as Text51 } from "ink";
|
|
9880
|
+
import { jsx as jsx53, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
9879
9881
|
import { useState as useState27, useEffect as useEffect27, useRef as useRef17 } from "react";
|
|
9880
9882
|
import { useState as useState25, useEffect as useEffect25, useRef as useRef15 } from "react";
|
|
9881
9883
|
import { useState as useState26, useEffect as useEffect26, useRef as useRef16 } from "react";
|
|
@@ -9888,35 +9890,35 @@ import process4 from "process";
|
|
|
9888
9890
|
import fs10 from "fs";
|
|
9889
9891
|
import os7 from "os";
|
|
9890
9892
|
import path17 from "path";
|
|
9891
|
-
import { Box as Box43, Text as Text51 } from "ink";
|
|
9892
|
-
import { jsx as jsx53, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
9893
|
-
import { useCallback as useCallback21, useMemo as useMemo13, useRef as useRef18 } from "react";
|
|
9894
9893
|
import { Box as Box44, Text as Text52 } from "ink";
|
|
9895
9894
|
import { jsx as jsx54, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
9895
|
+
import { useCallback as useCallback21, useMemo as useMemo13, useRef as useRef18 } from "react";
|
|
9896
|
+
import { Box as Box45, Text as Text53 } from "ink";
|
|
9897
|
+
import { jsx as jsx55, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
9896
9898
|
import { useCallback as useCallback22, useMemo as useMemo14, useState as useState28 } from "react";
|
|
9897
|
-
import { Box as
|
|
9898
|
-
import { Fragment as Fragment11, jsx as
|
|
9899
|
+
import { Box as Box46, Text as Text54, useInput as useInput3 } from "ink";
|
|
9900
|
+
import { Fragment as Fragment11, jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
9899
9901
|
import { useCallback as useCallback23, useState as useState29 } from "react";
|
|
9900
|
-
import { Box as Box46, Text as Text54 } from "ink";
|
|
9901
|
-
import { jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
9902
|
-
import { useCallback as useCallback24, useEffect as useEffect28, useMemo as useMemo15, useRef as useRef19, useState as useState30 } from "react";
|
|
9903
9902
|
import { Box as Box47, Text as Text55 } from "ink";
|
|
9904
9903
|
import { jsx as jsx57, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
9905
|
-
import { useCallback as
|
|
9906
|
-
import { Box as Box48, Text as Text56
|
|
9904
|
+
import { useCallback as useCallback24, useEffect as useEffect28, useMemo as useMemo15, useRef as useRef19, useState as useState30 } from "react";
|
|
9905
|
+
import { Box as Box48, Text as Text56 } from "ink";
|
|
9907
9906
|
import { jsx as jsx58, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
9907
|
+
import { useCallback as useCallback25, useEffect as useEffect29, useMemo as useMemo16, useRef as useRef20, useState as useState31 } from "react";
|
|
9908
|
+
import { Box as Box49, Text as Text57, useInput as useInput4 } from "ink";
|
|
9909
|
+
import { jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
9908
9910
|
import fs11 from "fs";
|
|
9909
9911
|
import path18 from "path";
|
|
9910
9912
|
import { useCallback as useCallback26, useMemo as useMemo17 } from "react";
|
|
9911
|
-
import { Box as
|
|
9912
|
-
import { jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
9913
|
-
import { useCallback as useCallback27, useEffect as useEffect30, useMemo as useMemo18, useState as useState32 } from "react";
|
|
9914
|
-
import { Box as Box50, Text as Text58, useInput as useInput5 } from "ink";
|
|
9913
|
+
import { Box as Box50, Text as Text58 } from "ink";
|
|
9915
9914
|
import { jsx as jsx60, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
9916
|
-
import {
|
|
9915
|
+
import { useCallback as useCallback27, useEffect as useEffect30, useMemo as useMemo18, useState as useState32 } from "react";
|
|
9916
|
+
import { Box as Box51, Text as Text59, useInput as useInput5 } from "ink";
|
|
9917
9917
|
import { jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
9918
|
+
import { Box as Box52, Text as Text60 } from "ink";
|
|
9918
9919
|
import { jsx as jsx62, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
9919
|
-
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
9920
|
+
import { jsx as jsx63, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
9921
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
9920
9922
|
async function createRuntime(options) {
|
|
9921
9923
|
const worktree = path10.resolve(options.cwd);
|
|
9922
9924
|
const config = await new ConfigLoader().load({ cwd: worktree, configPath: options.configPath });
|
|
@@ -11509,7 +11511,7 @@ function parseVersion(version) {
|
|
|
11509
11511
|
if (!match) return null;
|
|
11510
11512
|
return [Number(match[1]), Number(match[2]), Number(match[3])];
|
|
11511
11513
|
}
|
|
11512
|
-
var VERSION = "1.2.
|
|
11514
|
+
var VERSION = "1.2.28".length > 0 ? "1.2.28" : "0.0.0-dev";
|
|
11513
11515
|
async function updateCommand() {
|
|
11514
11516
|
writeStdoutLine(`Current version: ${VERSION}`);
|
|
11515
11517
|
const update = await checkForUpdate(VERSION, { force: true });
|
|
@@ -28818,6 +28820,83 @@ var AppHeader = ({
|
|
|
28818
28820
|
}
|
|
28819
28821
|
);
|
|
28820
28822
|
};
|
|
28823
|
+
var APPROVAL_PREVIEW_MAX_LINES = 4;
|
|
28824
|
+
function formatApprovalOperationLabel(request) {
|
|
28825
|
+
const labels = {
|
|
28826
|
+
write_file: "escrever arquivo",
|
|
28827
|
+
edit_file: "editar arquivo",
|
|
28828
|
+
read_file: "ler arquivo",
|
|
28829
|
+
bash: "executar comando shell",
|
|
28830
|
+
shell: "executar comando shell",
|
|
28831
|
+
git: "executar comando git",
|
|
28832
|
+
fetch_web: "acessar URL",
|
|
28833
|
+
search_text: "buscar em arquivos",
|
|
28834
|
+
list_dir: "listar diret\xF3rio",
|
|
28835
|
+
analyze_code: "analisar c\xF3digo"
|
|
28836
|
+
};
|
|
28837
|
+
return labels[request.operation] ?? request.operation.replace(/_/g, " ");
|
|
28838
|
+
}
|
|
28839
|
+
var ApprovalPrompt = ({ request, queueLength = 1 }) => {
|
|
28840
|
+
if (!request) return null;
|
|
28841
|
+
const operationLabel = formatApprovalOperationLabel(request);
|
|
28842
|
+
const hasDiff = !!(request.diff?.before && request.diff?.after);
|
|
28843
|
+
let beforeLines = [];
|
|
28844
|
+
let afterLines = [];
|
|
28845
|
+
let singleLines = [];
|
|
28846
|
+
let truncated = false;
|
|
28847
|
+
if (hasDiff) {
|
|
28848
|
+
beforeLines = request.diff.before.split("\n").slice(0, APPROVAL_PREVIEW_MAX_LINES);
|
|
28849
|
+
afterLines = request.diff.after.split("\n").slice(0, APPROVAL_PREVIEW_MAX_LINES);
|
|
28850
|
+
truncated = request.diff.before.split("\n").length > APPROVAL_PREVIEW_MAX_LINES || request.diff.after.split("\n").length > APPROVAL_PREVIEW_MAX_LINES;
|
|
28851
|
+
} else {
|
|
28852
|
+
const raw = request.diff?.after ?? request.preview?.content ?? "";
|
|
28853
|
+
singleLines = raw.split("\n").slice(0, APPROVAL_PREVIEW_MAX_LINES);
|
|
28854
|
+
truncated = raw.split("\n").length > APPROVAL_PREVIEW_MAX_LINES;
|
|
28855
|
+
}
|
|
28856
|
+
return /* @__PURE__ */ jsxs46(
|
|
28857
|
+
Box42,
|
|
28858
|
+
{
|
|
28859
|
+
flexDirection: "column",
|
|
28860
|
+
borderStyle: "round",
|
|
28861
|
+
borderColor: theme.status.warning,
|
|
28862
|
+
paddingX: 1,
|
|
28863
|
+
marginLeft: 2,
|
|
28864
|
+
marginRight: 2,
|
|
28865
|
+
marginTop: 1,
|
|
28866
|
+
children: [
|
|
28867
|
+
/* @__PURE__ */ jsxs46(Text50, { bold: true, color: theme.status.warning, children: [
|
|
28868
|
+
"\u26A0 ",
|
|
28869
|
+
operationLabel,
|
|
28870
|
+
queueLength > 1 && /* @__PURE__ */ jsx52(Text50, { color: theme.text.secondary, children: ` (1 de ${queueLength})` })
|
|
28871
|
+
] }),
|
|
28872
|
+
request.path && /* @__PURE__ */ jsx52(Text50, { color: theme.text.secondary, children: request.path }),
|
|
28873
|
+
request.preview?.command && /* @__PURE__ */ jsxs46(Text50, { color: theme.text.primary, children: [
|
|
28874
|
+
"$ ",
|
|
28875
|
+
request.preview.command,
|
|
28876
|
+
request.preview.args?.length ? ` ${request.preview.args.join(" ")}` : ""
|
|
28877
|
+
] }),
|
|
28878
|
+
hasDiff && /* @__PURE__ */ jsxs46(Box42, { flexDirection: "column", marginTop: 1, children: [
|
|
28879
|
+
/* @__PURE__ */ jsx52(Text50, { color: theme.status.error, dimColor: true, children: "\u2500\u2500 antes" }),
|
|
28880
|
+
beforeLines.map((line, i) => /* @__PURE__ */ jsxs46(Text50, { color: theme.status.error, dimColor: true, wrap: "truncate", children: [
|
|
28881
|
+
"\u2212 ",
|
|
28882
|
+
line
|
|
28883
|
+
] }, `b${i}`)),
|
|
28884
|
+
/* @__PURE__ */ jsx52(Text50, { color: theme.status.success, dimColor: true, children: "\u2500\u2500 depois" }),
|
|
28885
|
+
afterLines.map((line, i) => /* @__PURE__ */ jsxs46(Text50, { color: theme.status.success, dimColor: true, wrap: "truncate", children: [
|
|
28886
|
+
"+ ",
|
|
28887
|
+
line
|
|
28888
|
+
] }, `a${i}`)),
|
|
28889
|
+
truncated && /* @__PURE__ */ jsx52(Text50, { color: theme.ui.comment, dimColor: true, children: "\u2026" })
|
|
28890
|
+
] }),
|
|
28891
|
+
!hasDiff && singleLines.length > 0 && /* @__PURE__ */ jsxs46(Box42, { flexDirection: "column", marginTop: 1, children: [
|
|
28892
|
+
singleLines.map((line, i) => /* @__PURE__ */ jsx52(Text50, { color: theme.ui.comment, dimColor: true, wrap: "truncate", children: line }, i)),
|
|
28893
|
+
truncated && /* @__PURE__ */ jsx52(Text50, { color: theme.ui.comment, dimColor: true, children: "\u2026" })
|
|
28894
|
+
] }),
|
|
28895
|
+
/* @__PURE__ */ jsx52(Box42, { marginTop: 1, children: /* @__PURE__ */ jsx52(Text50, { color: theme.text.secondary, dimColor: true, children: "[\u21B5/y] uma vez [s] sess\xE3o [a] sempre [n/Esc] negar" }) })
|
|
28896
|
+
]
|
|
28897
|
+
}
|
|
28898
|
+
);
|
|
28899
|
+
};
|
|
28821
28900
|
var STICKY_TODO_MAX_VISIBLE_ITEMS = 5;
|
|
28822
28901
|
var MIN_HISTORY_ITEMS_AFTER_TODO_BEFORE_STICKY = 2;
|
|
28823
28902
|
var STICKY_TODO_ROWS_PER_VISIBLE_ITEM = 5;
|
|
@@ -28913,8 +28992,8 @@ var StickyTodoListComponent = ({
|
|
|
28913
28992
|
const hidden = ordered.length - visible.length;
|
|
28914
28993
|
const numColWidth = Math.max(...visible.map((t2, i) => (numberById.get(t2.id) ?? `${i + 1}.`).length)) + 1;
|
|
28915
28994
|
const contentColWidth = Math.max(1, width - numColWidth - 6);
|
|
28916
|
-
return /* @__PURE__ */
|
|
28917
|
-
|
|
28995
|
+
return /* @__PURE__ */ jsxs47(
|
|
28996
|
+
Box43,
|
|
28918
28997
|
{
|
|
28919
28998
|
marginX: 2,
|
|
28920
28999
|
width,
|
|
@@ -28923,15 +29002,15 @@ var StickyTodoListComponent = ({
|
|
|
28923
29002
|
borderColor: theme.border.default,
|
|
28924
29003
|
paddingX: 1,
|
|
28925
29004
|
children: [
|
|
28926
|
-
/* @__PURE__ */
|
|
29005
|
+
/* @__PURE__ */ jsx53(Text51, { color: theme.text.secondary, bold: true, children: "Tarefas em andamento" }),
|
|
28927
29006
|
visible.map((todo, i) => {
|
|
28928
29007
|
const num = numberById.get(todo.id) ?? `${i + 1}.`;
|
|
28929
29008
|
const color = todo.status === "in_progress" ? theme.status.success : theme.text.primary;
|
|
28930
|
-
return /* @__PURE__ */
|
|
28931
|
-
/* @__PURE__ */
|
|
28932
|
-
/* @__PURE__ */
|
|
28933
|
-
/* @__PURE__ */
|
|
28934
|
-
|
|
29009
|
+
return /* @__PURE__ */ jsxs47(Box43, { flexDirection: "row", height: 1, children: [
|
|
29010
|
+
/* @__PURE__ */ jsx53(Box43, { width: numColWidth, children: /* @__PURE__ */ jsx53(Text51, { color: theme.text.secondary, children: num }) }),
|
|
29011
|
+
/* @__PURE__ */ jsx53(Box43, { width: 2, children: /* @__PURE__ */ jsx53(Text51, { color, children: STATUS_ICONS3[todo.status] }) }),
|
|
29012
|
+
/* @__PURE__ */ jsx53(Box43, { width: contentColWidth, children: /* @__PURE__ */ jsx53(
|
|
29013
|
+
Text51,
|
|
28935
29014
|
{
|
|
28936
29015
|
color,
|
|
28937
29016
|
strikethrough: todo.status === "completed",
|
|
@@ -28941,10 +29020,10 @@ var StickyTodoListComponent = ({
|
|
|
28941
29020
|
) })
|
|
28942
29021
|
] }, todo.id);
|
|
28943
29022
|
}),
|
|
28944
|
-
hidden > 0 && /* @__PURE__ */
|
|
28945
|
-
/* @__PURE__ */
|
|
28946
|
-
/* @__PURE__ */
|
|
28947
|
-
/* @__PURE__ */
|
|
29023
|
+
hidden > 0 && /* @__PURE__ */ jsxs47(Box43, { flexDirection: "row", height: 1, children: [
|
|
29024
|
+
/* @__PURE__ */ jsx53(Box43, { width: numColWidth }),
|
|
29025
|
+
/* @__PURE__ */ jsx53(Box43, { width: 2 }),
|
|
29026
|
+
/* @__PURE__ */ jsx53(Box43, { width: contentColWidth, children: /* @__PURE__ */ jsxs47(Text51, { color: theme.text.secondary, wrap: "truncate-end", children: [
|
|
28948
29027
|
"... e mais ",
|
|
28949
29028
|
hidden
|
|
28950
29029
|
] }) })
|
|
@@ -29515,6 +29594,22 @@ var undoCommand = {
|
|
|
29515
29594
|
};
|
|
29516
29595
|
}
|
|
29517
29596
|
};
|
|
29597
|
+
var vimCommand = {
|
|
29598
|
+
name: "vim",
|
|
29599
|
+
get description() {
|
|
29600
|
+
return t("Toggle Vim mode (Normal/Insert)");
|
|
29601
|
+
},
|
|
29602
|
+
kind: "built-in",
|
|
29603
|
+
supportedModes: ["interactive"],
|
|
29604
|
+
action: async (context) => {
|
|
29605
|
+
const enabled = await context.ui.toggleVimEnabled();
|
|
29606
|
+
return {
|
|
29607
|
+
type: "message",
|
|
29608
|
+
messageType: "info",
|
|
29609
|
+
content: enabled ? "Vim mode ativado. Pressione 'i' para INSERT, 'Esc' para NORMAL." : "Vim mode desativado."
|
|
29610
|
+
};
|
|
29611
|
+
}
|
|
29612
|
+
};
|
|
29518
29613
|
var compactCommand = {
|
|
29519
29614
|
name: "compact",
|
|
29520
29615
|
get description() {
|
|
@@ -29978,10 +30073,10 @@ var CommandDialog = ({
|
|
|
29978
30073
|
title,
|
|
29979
30074
|
lines,
|
|
29980
30075
|
footerText = "Press Esc or Enter to close."
|
|
29981
|
-
}) => /* @__PURE__ */
|
|
29982
|
-
/* @__PURE__ */
|
|
29983
|
-
/* @__PURE__ */
|
|
29984
|
-
/* @__PURE__ */
|
|
30076
|
+
}) => /* @__PURE__ */ jsx54(Box44, { marginLeft: 2, marginRight: 2, marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs48(Box44, { borderStyle: "round", borderColor: theme.border.default, padding: 1, flexDirection: "column", children: [
|
|
30077
|
+
/* @__PURE__ */ jsx54(Text52, { bold: true, color: theme.text.accent, children: title }),
|
|
30078
|
+
/* @__PURE__ */ jsx54(Box44, { marginTop: 1, flexDirection: "column", children: lines.map((line, index) => /* @__PURE__ */ jsx54(Text52, { color: theme.text.primary, children: line }, index)) }),
|
|
30079
|
+
/* @__PURE__ */ jsx54(Box44, { marginTop: 1, children: /* @__PURE__ */ jsx54(Text52, { color: theme.text.secondary, children: footerText }) })
|
|
29985
30080
|
] }) });
|
|
29986
30081
|
var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
|
|
29987
30082
|
const originalTheme = useRef18(themeManager.getActiveTheme().name);
|
|
@@ -30018,8 +30113,8 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
|
|
|
30018
30113
|
},
|
|
30019
30114
|
[onPreview]
|
|
30020
30115
|
);
|
|
30021
|
-
return /* @__PURE__ */
|
|
30022
|
-
|
|
30116
|
+
return /* @__PURE__ */ jsxs49(
|
|
30117
|
+
Box45,
|
|
30023
30118
|
{
|
|
30024
30119
|
flexDirection: "column",
|
|
30025
30120
|
borderStyle: "round",
|
|
@@ -30028,8 +30123,8 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
|
|
|
30028
30123
|
marginLeft: 2,
|
|
30029
30124
|
marginRight: 2,
|
|
30030
30125
|
children: [
|
|
30031
|
-
/* @__PURE__ */
|
|
30032
|
-
/* @__PURE__ */
|
|
30126
|
+
/* @__PURE__ */ jsx55(Text53, { bold: true, color: theme.text.accent, children: "Select theme" }),
|
|
30127
|
+
/* @__PURE__ */ jsx55(
|
|
30033
30128
|
RadioButtonSelect,
|
|
30034
30129
|
{
|
|
30035
30130
|
items,
|
|
@@ -30039,7 +30134,7 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
|
|
|
30039
30134
|
isFocused: true
|
|
30040
30135
|
}
|
|
30041
30136
|
),
|
|
30042
|
-
/* @__PURE__ */
|
|
30137
|
+
/* @__PURE__ */ jsx55(Text53, { color: theme.text.secondary, children: "\u2191\u2193 navegar \xB7 Enter aplicar \xB7 Esc cancelar" })
|
|
30043
30138
|
]
|
|
30044
30139
|
}
|
|
30045
30140
|
);
|
|
@@ -30269,8 +30364,8 @@ var ProviderDialog = ({
|
|
|
30269
30364
|
);
|
|
30270
30365
|
const statusColor2 = status ? status.ok ? status.text.startsWith("\u2713") ? theme.status.success : theme.text.secondary : theme.status.error : void 0;
|
|
30271
30366
|
const footer = phase === "apiKey" ? "Enter save Ctrl+U clear Esc cancel" : phase === "providers" ? "\u2191\u2193 navigate Enter select Esc close" : "\u2191\u2193 navigate Enter confirm Esc back";
|
|
30272
|
-
return /* @__PURE__ */
|
|
30273
|
-
|
|
30367
|
+
return /* @__PURE__ */ jsxs50(
|
|
30368
|
+
Box46,
|
|
30274
30369
|
{
|
|
30275
30370
|
flexDirection: "column",
|
|
30276
30371
|
borderStyle: "round",
|
|
@@ -30281,19 +30376,19 @@ var ProviderDialog = ({
|
|
|
30281
30376
|
marginRight: 2,
|
|
30282
30377
|
minWidth: 44,
|
|
30283
30378
|
children: [
|
|
30284
|
-
/* @__PURE__ */
|
|
30285
|
-
/* @__PURE__ */
|
|
30286
|
-
phase !== "providers" && /* @__PURE__ */
|
|
30287
|
-
/* @__PURE__ */
|
|
30288
|
-
/* @__PURE__ */
|
|
30379
|
+
/* @__PURE__ */ jsxs50(Box46, { marginBottom: 1, gap: 1, children: [
|
|
30380
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: theme.text.accent, children: "Providers" }),
|
|
30381
|
+
phase !== "providers" && /* @__PURE__ */ jsxs50(Fragment11, { children: [
|
|
30382
|
+
/* @__PURE__ */ jsx56(Text54, { color: theme.text.secondary, children: "\u203A" }),
|
|
30383
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: theme.text.primary, children: selectedProvider })
|
|
30289
30384
|
] }),
|
|
30290
|
-
phase === "providers" && currentModel && /* @__PURE__ */
|
|
30385
|
+
phase === "providers" && currentModel && /* @__PURE__ */ jsxs50(Text54, { color: theme.text.secondary, children: [
|
|
30291
30386
|
" (",
|
|
30292
30387
|
currentModel,
|
|
30293
30388
|
")"
|
|
30294
30389
|
] })
|
|
30295
30390
|
] }),
|
|
30296
|
-
phase === "providers" && /* @__PURE__ */
|
|
30391
|
+
phase === "providers" && /* @__PURE__ */ jsx56(
|
|
30297
30392
|
BaseSelectionList,
|
|
30298
30393
|
{
|
|
30299
30394
|
items: providerItems,
|
|
@@ -30303,25 +30398,25 @@ var ProviderDialog = ({
|
|
|
30303
30398
|
maxItemsToShow: 8,
|
|
30304
30399
|
renderItem: (item, { titleColor }) => {
|
|
30305
30400
|
const { icon, color, label } = getStatusMark(item.provider, item.keyIsSet);
|
|
30306
|
-
return /* @__PURE__ */
|
|
30307
|
-
/* @__PURE__ */
|
|
30308
|
-
/* @__PURE__ */
|
|
30309
|
-
/* @__PURE__ */
|
|
30310
|
-
item.isCurrent && /* @__PURE__ */
|
|
30401
|
+
return /* @__PURE__ */ jsxs50(Box46, { gap: 1, children: [
|
|
30402
|
+
/* @__PURE__ */ jsx56(Text54, { color, children: icon }),
|
|
30403
|
+
/* @__PURE__ */ jsx56(Text54, { color: titleColor, bold: item.isCurrent, children: item.provider.padEnd(12) }),
|
|
30404
|
+
/* @__PURE__ */ jsx56(Text54, { color, dimColor: !item.keyIsSet && !item.isLocal, children: label }),
|
|
30405
|
+
item.isCurrent && /* @__PURE__ */ jsx56(Text54, { color: theme.text.accent, children: "\u25B6" })
|
|
30311
30406
|
] });
|
|
30312
30407
|
}
|
|
30313
30408
|
}
|
|
30314
30409
|
),
|
|
30315
|
-
phase === "actions" && /* @__PURE__ */
|
|
30316
|
-
/* @__PURE__ */
|
|
30317
|
-
/* @__PURE__ */
|
|
30318
|
-
/* @__PURE__ */
|
|
30410
|
+
phase === "actions" && /* @__PURE__ */ jsxs50(Fragment11, { children: [
|
|
30411
|
+
/* @__PURE__ */ jsxs50(Box46, { marginBottom: 1, gap: 1, children: [
|
|
30412
|
+
/* @__PURE__ */ jsx56(Text54, { color: theme.ui.comment, children: "session" }),
|
|
30413
|
+
/* @__PURE__ */ jsx56(Text54, { color: selectedProvider === currentProvider ? theme.text.accent : theme.text.secondary, children: selectedProvider === currentProvider ? "active" : `still using ${currentProvider}` })
|
|
30319
30414
|
] }),
|
|
30320
|
-
/* @__PURE__ */
|
|
30321
|
-
/* @__PURE__ */
|
|
30322
|
-
isLocal ? /* @__PURE__ */
|
|
30415
|
+
/* @__PURE__ */ jsxs50(Box46, { marginBottom: 1, gap: 1, children: [
|
|
30416
|
+
/* @__PURE__ */ jsx56(Text54, { color: theme.ui.comment, children: "key" }),
|
|
30417
|
+
isLocal ? /* @__PURE__ */ jsx56(Text54, { color: theme.text.accent, children: "no key required" }) : keyHint ? /* @__PURE__ */ jsx56(Text54, { color: theme.text.secondary, children: keyHint }) : /* @__PURE__ */ jsx56(Text54, { color: theme.ui.comment, dimColor: true, children: "not configured" })
|
|
30323
30418
|
] }),
|
|
30324
|
-
/* @__PURE__ */
|
|
30419
|
+
/* @__PURE__ */ jsx56(
|
|
30325
30420
|
BaseSelectionList,
|
|
30326
30421
|
{
|
|
30327
30422
|
items: actionItems,
|
|
@@ -30329,10 +30424,10 @@ var ProviderDialog = ({
|
|
|
30329
30424
|
isFocused: !isBusy,
|
|
30330
30425
|
showNumbers: false,
|
|
30331
30426
|
maxItemsToShow: 6,
|
|
30332
|
-
renderItem: (item, { titleColor }) => /* @__PURE__ */
|
|
30333
|
-
/* @__PURE__ */
|
|
30334
|
-
/* @__PURE__ */
|
|
30335
|
-
item.hint && /* @__PURE__ */
|
|
30427
|
+
renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs50(Box46, { gap: 1, children: [
|
|
30428
|
+
/* @__PURE__ */ jsx56(Text54, { color: titleColor, children: item.icon }),
|
|
30429
|
+
/* @__PURE__ */ jsx56(Text54, { color: titleColor, children: item.label }),
|
|
30430
|
+
item.hint && /* @__PURE__ */ jsxs50(Text54, { color: theme.ui.comment, dimColor: true, children: [
|
|
30336
30431
|
"(",
|
|
30337
30432
|
item.hint,
|
|
30338
30433
|
")"
|
|
@@ -30341,26 +30436,26 @@ var ProviderDialog = ({
|
|
|
30341
30436
|
}
|
|
30342
30437
|
)
|
|
30343
30438
|
] }),
|
|
30344
|
-
phase === "apiKey" && /* @__PURE__ */
|
|
30345
|
-
/* @__PURE__ */
|
|
30346
|
-
/* @__PURE__ */
|
|
30347
|
-
isLocal ? /* @__PURE__ */
|
|
30439
|
+
phase === "apiKey" && /* @__PURE__ */ jsxs50(Box46, { flexDirection: "column", gap: 1, marginBottom: 1, children: [
|
|
30440
|
+
/* @__PURE__ */ jsxs50(Box46, { gap: 1, children: [
|
|
30441
|
+
/* @__PURE__ */ jsx56(Text54, { color: theme.ui.comment, children: "current" }),
|
|
30442
|
+
isLocal ? /* @__PURE__ */ jsx56(Text54, { color: theme.text.accent, children: "no key required" }) : keyHint ? /* @__PURE__ */ jsx56(Text54, { color: theme.text.secondary, children: keyHint }) : /* @__PURE__ */ jsx56(Text54, { color: theme.ui.comment, dimColor: true, children: "not set" })
|
|
30348
30443
|
] }),
|
|
30349
|
-
/* @__PURE__ */
|
|
30350
|
-
/* @__PURE__ */
|
|
30351
|
-
/* @__PURE__ */
|
|
30444
|
+
/* @__PURE__ */ jsxs50(Box46, { gap: 1, children: [
|
|
30445
|
+
/* @__PURE__ */ jsx56(Text54, { color: theme.ui.comment, children: "new key" }),
|
|
30446
|
+
/* @__PURE__ */ jsx56(Box46, { borderStyle: "single", borderColor: theme.border.focused, paddingX: 1, children: /* @__PURE__ */ jsx56(Text54, { color: theme.text.accent, children: apiKeyInput.length > 0 ? maskApiKeyInput(apiKeyInput.length) : /* @__PURE__ */ jsx56(Text54, { color: theme.ui.comment, dimColor: true, children: "paste or type\u2026" }) }) })
|
|
30352
30447
|
] })
|
|
30353
30448
|
] }),
|
|
30354
|
-
status && /* @__PURE__ */
|
|
30355
|
-
phase === "actions" && testLatencyMs !== void 0 && /* @__PURE__ */
|
|
30356
|
-
/* @__PURE__ */
|
|
30449
|
+
status && /* @__PURE__ */ jsx56(Box46, { marginTop: 1, children: /* @__PURE__ */ jsx56(Text54, { color: statusColor2, children: status.text }) }),
|
|
30450
|
+
phase === "actions" && testLatencyMs !== void 0 && /* @__PURE__ */ jsxs50(Box46, { marginTop: 0, gap: 1, children: [
|
|
30451
|
+
/* @__PURE__ */ jsxs50(Text54, { color: getLatencyColor(testLatencyMs), bold: true, children: [
|
|
30357
30452
|
testLatencyMs,
|
|
30358
30453
|
"ms"
|
|
30359
30454
|
] }),
|
|
30360
|
-
/* @__PURE__ */
|
|
30455
|
+
/* @__PURE__ */ jsx56(Text54, { color: theme.text.secondary, children: testLatencyMs < 300 ? "excellent" : testLatencyMs < 800 ? "good" : "slow" })
|
|
30361
30456
|
] }),
|
|
30362
|
-
/* @__PURE__ */
|
|
30363
|
-
|
|
30457
|
+
/* @__PURE__ */ jsx56(
|
|
30458
|
+
Box46,
|
|
30364
30459
|
{
|
|
30365
30460
|
marginTop: 1,
|
|
30366
30461
|
borderStyle: "single",
|
|
@@ -30369,7 +30464,7 @@ var ProviderDialog = ({
|
|
|
30369
30464
|
borderLeft: false,
|
|
30370
30465
|
borderRight: false,
|
|
30371
30466
|
borderColor: theme.ui.comment,
|
|
30372
|
-
children: /* @__PURE__ */
|
|
30467
|
+
children: /* @__PURE__ */ jsxs50(Text54, { color: theme.ui.comment, dimColor: true, children: [
|
|
30373
30468
|
footer,
|
|
30374
30469
|
phase === "actions" && " Test does not change the session."
|
|
30375
30470
|
] })
|
|
@@ -30443,8 +30538,8 @@ var PermissionsDialog = ({
|
|
|
30443
30538
|
[focusIndex, modes, onClose, onSave]
|
|
30444
30539
|
);
|
|
30445
30540
|
useKeypress(handleKey, { isActive: true });
|
|
30446
|
-
return /* @__PURE__ */
|
|
30447
|
-
|
|
30541
|
+
return /* @__PURE__ */ jsxs51(
|
|
30542
|
+
Box47,
|
|
30448
30543
|
{
|
|
30449
30544
|
flexDirection: "column",
|
|
30450
30545
|
borderStyle: "round",
|
|
@@ -30453,25 +30548,25 @@ var PermissionsDialog = ({
|
|
|
30453
30548
|
marginLeft: 2,
|
|
30454
30549
|
marginRight: 2,
|
|
30455
30550
|
children: [
|
|
30456
|
-
/* @__PURE__ */
|
|
30551
|
+
/* @__PURE__ */ jsx57(Text55, { bold: true, color: theme.text.accent, children: "Permiss\xF5es" }),
|
|
30457
30552
|
PERMISSION_KEYS.map((key, i) => {
|
|
30458
30553
|
const focused = focusIndex === i;
|
|
30459
30554
|
const mode = modes[key];
|
|
30460
|
-
return /* @__PURE__ */
|
|
30461
|
-
/* @__PURE__ */
|
|
30462
|
-
/* @__PURE__ */
|
|
30463
|
-
/* @__PURE__ */
|
|
30555
|
+
return /* @__PURE__ */ jsxs51(Box47, { flexDirection: "row", gap: 1, children: [
|
|
30556
|
+
/* @__PURE__ */ jsx57(Text55, { color: focused ? theme.text.accent : theme.text.secondary, children: focused ? "\u203A" : " " }),
|
|
30557
|
+
/* @__PURE__ */ jsx57(Text55, { color: focused ? theme.text.primary : theme.text.secondary, bold: focused, children: KEY_LABEL[key].padEnd(10) }),
|
|
30558
|
+
/* @__PURE__ */ jsx57(Text55, { color: modeColor(mode), bold: focused, children: mode })
|
|
30464
30559
|
] }, key);
|
|
30465
30560
|
}),
|
|
30466
|
-
/* @__PURE__ */
|
|
30561
|
+
/* @__PURE__ */ jsx57(Box47, { marginTop: 1, flexDirection: "column", children: ACTIONS3.map((action, i) => {
|
|
30467
30562
|
const focused = focusIndex === PERMISSION_KEYS.length + i;
|
|
30468
30563
|
const label = action === "save" ? dirty ? "Salvar" : "Salvar (sem edi\xE7\xF5es)" : "Cancelar";
|
|
30469
|
-
return /* @__PURE__ */
|
|
30470
|
-
/* @__PURE__ */
|
|
30471
|
-
/* @__PURE__ */
|
|
30564
|
+
return /* @__PURE__ */ jsxs51(Box47, { flexDirection: "row", gap: 1, children: [
|
|
30565
|
+
/* @__PURE__ */ jsx57(Text55, { color: focused ? theme.text.accent : theme.text.secondary, children: focused ? "\u203A" : " " }),
|
|
30566
|
+
/* @__PURE__ */ jsx57(Text55, { color: focused ? theme.text.primary : theme.text.secondary, bold: focused, children: label })
|
|
30472
30567
|
] }, action);
|
|
30473
30568
|
}) }),
|
|
30474
|
-
/* @__PURE__ */
|
|
30569
|
+
/* @__PURE__ */ jsx57(Text55, { color: theme.text.secondary, dimColor: true, children: "\u2191\u2193 navegar \xB7 Enter cicla allow/ask/deny ou confirma \xB7 Esc cancelar" })
|
|
30475
30570
|
]
|
|
30476
30571
|
}
|
|
30477
30572
|
);
|
|
@@ -30579,8 +30674,8 @@ var AuthDialog = ({
|
|
|
30579
30674
|
[onClose, phase]
|
|
30580
30675
|
);
|
|
30581
30676
|
useKeypress(handleEscape, { isActive: true });
|
|
30582
|
-
return /* @__PURE__ */
|
|
30583
|
-
|
|
30677
|
+
return /* @__PURE__ */ jsxs52(
|
|
30678
|
+
Box48,
|
|
30584
30679
|
{
|
|
30585
30680
|
flexDirection: "column",
|
|
30586
30681
|
borderStyle: "round",
|
|
@@ -30589,32 +30684,32 @@ var AuthDialog = ({
|
|
|
30589
30684
|
marginLeft: 2,
|
|
30590
30685
|
marginRight: 2,
|
|
30591
30686
|
children: [
|
|
30592
|
-
/* @__PURE__ */
|
|
30593
|
-
/* @__PURE__ */
|
|
30594
|
-
phase === "menu" && /* @__PURE__ */
|
|
30595
|
-
deviceCode && phase === "running" && /* @__PURE__ */
|
|
30596
|
-
/* @__PURE__ */
|
|
30687
|
+
/* @__PURE__ */ jsx58(Text56, { bold: true, color: theme.text.accent, children: "GitHub authentication" }),
|
|
30688
|
+
/* @__PURE__ */ jsx58(Text56, { color: theme.text.secondary, children: statusSummary }),
|
|
30689
|
+
phase === "menu" && /* @__PURE__ */ jsx58(RadioButtonSelect, { items, onSelect: handleSelect, isFocused: true, showNumbers: false }),
|
|
30690
|
+
deviceCode && phase === "running" && /* @__PURE__ */ jsxs52(Box48, { flexDirection: "column", marginTop: 1, children: [
|
|
30691
|
+
/* @__PURE__ */ jsxs52(Text56, { children: [
|
|
30597
30692
|
"Open: ",
|
|
30598
|
-
/* @__PURE__ */
|
|
30693
|
+
/* @__PURE__ */ jsx58(Text56, { color: theme.text.accent, children: deviceCode.verificationUri })
|
|
30599
30694
|
] }),
|
|
30600
|
-
/* @__PURE__ */
|
|
30695
|
+
/* @__PURE__ */ jsxs52(Text56, { children: [
|
|
30601
30696
|
"Code: ",
|
|
30602
|
-
/* @__PURE__ */
|
|
30697
|
+
/* @__PURE__ */ jsx58(Text56, { bold: true, color: theme.text.accent, children: deviceCode.userCode })
|
|
30603
30698
|
] }),
|
|
30604
|
-
/* @__PURE__ */
|
|
30699
|
+
/* @__PURE__ */ jsxs52(Text56, { color: theme.text.secondary, children: [
|
|
30605
30700
|
"Expires in ",
|
|
30606
30701
|
Math.round(deviceCode.expiresIn / 60),
|
|
30607
30702
|
" minutes."
|
|
30608
30703
|
] })
|
|
30609
30704
|
] }),
|
|
30610
|
-
message && /* @__PURE__ */
|
|
30611
|
-
|
|
30705
|
+
message && /* @__PURE__ */ jsx58(
|
|
30706
|
+
Text56,
|
|
30612
30707
|
{
|
|
30613
30708
|
color: phase === "error" ? theme.status.error : phase === "done" ? theme.status.success : theme.text.secondary,
|
|
30614
30709
|
children: message
|
|
30615
30710
|
}
|
|
30616
30711
|
),
|
|
30617
|
-
/* @__PURE__ */
|
|
30712
|
+
/* @__PURE__ */ jsx58(Text56, { color: theme.text.secondary, children: phase === "running" ? "Esc cancel login" : phase === "menu" ? "\u2191\u2193 navigate \xB7 Enter select \xB7 Esc close" : "Esc close" })
|
|
30618
30713
|
]
|
|
30619
30714
|
}
|
|
30620
30715
|
);
|
|
@@ -30754,8 +30849,8 @@ var ModelDialog = ({
|
|
|
30754
30849
|
}, { isActive: true });
|
|
30755
30850
|
const canScrollUp = scrollTop > 0;
|
|
30756
30851
|
const canScrollDown = scrollTop + MAX_VISIBLE < rows.length;
|
|
30757
|
-
return /* @__PURE__ */
|
|
30758
|
-
|
|
30852
|
+
return /* @__PURE__ */ jsxs53(
|
|
30853
|
+
Box49,
|
|
30759
30854
|
{
|
|
30760
30855
|
flexDirection: "column",
|
|
30761
30856
|
borderStyle: "round",
|
|
@@ -30766,70 +30861,70 @@ var ModelDialog = ({
|
|
|
30766
30861
|
marginRight: 1,
|
|
30767
30862
|
minWidth: 58,
|
|
30768
30863
|
children: [
|
|
30769
|
-
/* @__PURE__ */
|
|
30770
|
-
/* @__PURE__ */
|
|
30771
|
-
/* @__PURE__ */
|
|
30772
|
-
/* @__PURE__ */
|
|
30773
|
-
/* @__PURE__ */
|
|
30864
|
+
/* @__PURE__ */ jsxs53(Box49, { justifyContent: "space-between", marginBottom: 1, children: [
|
|
30865
|
+
/* @__PURE__ */ jsxs53(Box49, { gap: 1, children: [
|
|
30866
|
+
/* @__PURE__ */ jsx59(Text57, { bold: true, color: theme.text.primary, children: "Selecionar modelo" }),
|
|
30867
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.text.secondary, children: "para" }),
|
|
30868
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.text.accent, children: currentProvider })
|
|
30774
30869
|
] }),
|
|
30775
|
-
/* @__PURE__ */
|
|
30870
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: "esc" })
|
|
30776
30871
|
] }),
|
|
30777
|
-
/* @__PURE__ */
|
|
30778
|
-
|
|
30872
|
+
/* @__PURE__ */ jsxs53(
|
|
30873
|
+
Box49,
|
|
30779
30874
|
{
|
|
30780
30875
|
borderStyle: "single",
|
|
30781
30876
|
borderColor: search ? theme.border.focused : theme.ui.comment,
|
|
30782
30877
|
paddingX: 1,
|
|
30783
30878
|
marginBottom: 1,
|
|
30784
30879
|
children: [
|
|
30785
|
-
/* @__PURE__ */
|
|
30786
|
-
search ? /* @__PURE__ */
|
|
30880
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, children: "\u2315 " }),
|
|
30881
|
+
search ? /* @__PURE__ */ jsxs53(Text57, { color: theme.text.primary, children: [
|
|
30787
30882
|
search,
|
|
30788
|
-
/* @__PURE__ */
|
|
30789
|
-
] }) : /* @__PURE__ */
|
|
30883
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.text.accent, children: "\u258C" })
|
|
30884
|
+
] }) : /* @__PURE__ */ jsxs53(Text57, { color: theme.ui.comment, dimColor: true, children: [
|
|
30790
30885
|
"Search",
|
|
30791
|
-
/* @__PURE__ */
|
|
30886
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.text.accent, children: "\u258C" })
|
|
30792
30887
|
] })
|
|
30793
30888
|
]
|
|
30794
30889
|
}
|
|
30795
30890
|
),
|
|
30796
|
-
loadState === "loading" && /* @__PURE__ */
|
|
30797
|
-
loadState === "error" && /* @__PURE__ */
|
|
30798
|
-
/* @__PURE__ */
|
|
30799
|
-
/* @__PURE__ */
|
|
30891
|
+
loadState === "loading" && /* @__PURE__ */ jsx59(Box49, { marginY: 1, children: /* @__PURE__ */ jsx59(Text57, { color: theme.text.secondary, children: "Carregando modelos\u2026" }) }),
|
|
30892
|
+
loadState === "error" && /* @__PURE__ */ jsxs53(Box49, { flexDirection: "column", marginY: 1, children: [
|
|
30893
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.status.error, children: "\u2717 N\xE3o foi poss\xEDvel carregar modelos" }),
|
|
30894
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: errorMsg })
|
|
30800
30895
|
] }),
|
|
30801
|
-
loadState === "ready" && selectableCount === 0 && /* @__PURE__ */
|
|
30896
|
+
loadState === "ready" && selectableCount === 0 && /* @__PURE__ */ jsx59(Box49, { marginY: 1, children: /* @__PURE__ */ jsxs53(Text57, { color: theme.ui.comment, dimColor: true, children: [
|
|
30802
30897
|
'Nenhum modelo para "',
|
|
30803
30898
|
search,
|
|
30804
30899
|
'"'
|
|
30805
30900
|
] }) }),
|
|
30806
|
-
loadState === "ready" && selectableCount > 0 && /* @__PURE__ */
|
|
30807
|
-
canScrollUp && /* @__PURE__ */
|
|
30901
|
+
loadState === "ready" && selectableCount > 0 && /* @__PURE__ */ jsxs53(Box49, { flexDirection: "column", children: [
|
|
30902
|
+
canScrollUp && /* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: " \u2191" }),
|
|
30808
30903
|
visibleRows.map((row, i) => {
|
|
30809
30904
|
if (row.kind === "header") {
|
|
30810
|
-
return /* @__PURE__ */
|
|
30905
|
+
return /* @__PURE__ */ jsx59(Box49, { marginTop: i === 0 ? 0 : 1, children: /* @__PURE__ */ jsx59(Text57, { color: theme.text.accent, bold: true, children: row.label }) }, `h${i}`);
|
|
30811
30906
|
}
|
|
30812
30907
|
const { model, selIndex } = row;
|
|
30813
30908
|
const isActive = selIndex === clampedIndex;
|
|
30814
30909
|
const isCurrent = model.id === currentModel;
|
|
30815
30910
|
const price = fmtPrice(model);
|
|
30816
30911
|
const group = providerGroup(model);
|
|
30817
|
-
return /* @__PURE__ */
|
|
30818
|
-
/* @__PURE__ */
|
|
30819
|
-
/* @__PURE__ */
|
|
30820
|
-
/* @__PURE__ */
|
|
30821
|
-
/* @__PURE__ */
|
|
30822
|
-
|
|
30912
|
+
return /* @__PURE__ */ jsxs53(Box49, { flexDirection: "column", children: [
|
|
30913
|
+
/* @__PURE__ */ jsxs53(Box49, { gap: 1, children: [
|
|
30914
|
+
/* @__PURE__ */ jsx59(Text57, { color: isActive ? theme.text.accent : theme.ui.comment, children: isCurrent ? "\u25CF" : isActive ? "\u203A" : " " }),
|
|
30915
|
+
/* @__PURE__ */ jsxs53(Box49, { flexGrow: 1, gap: 1, children: [
|
|
30916
|
+
/* @__PURE__ */ jsx59(
|
|
30917
|
+
Text57,
|
|
30823
30918
|
{
|
|
30824
30919
|
color: isActive ? theme.text.primary : theme.text.secondary,
|
|
30825
30920
|
bold: isActive,
|
|
30826
30921
|
children: model.name
|
|
30827
30922
|
}
|
|
30828
30923
|
),
|
|
30829
|
-
/* @__PURE__ */
|
|
30924
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.text.accent, dimColor: true, children: group })
|
|
30830
30925
|
] }),
|
|
30831
|
-
price && /* @__PURE__ */
|
|
30832
|
-
|
|
30926
|
+
price && /* @__PURE__ */ jsx59(
|
|
30927
|
+
Text57,
|
|
30833
30928
|
{
|
|
30834
30929
|
color: price === "Free" ? theme.status.success : theme.ui.comment,
|
|
30835
30930
|
dimColor: !isActive,
|
|
@@ -30837,29 +30932,29 @@ var ModelDialog = ({
|
|
|
30837
30932
|
}
|
|
30838
30933
|
)
|
|
30839
30934
|
] }),
|
|
30840
|
-
isActive && /* @__PURE__ */
|
|
30841
|
-
/* @__PURE__ */
|
|
30842
|
-
model.contextLength > 0 && /* @__PURE__ */
|
|
30935
|
+
isActive && /* @__PURE__ */ jsxs53(Box49, { paddingLeft: 2, gap: 2, children: [
|
|
30936
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: model.id }),
|
|
30937
|
+
model.contextLength > 0 && /* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: fmtCtx(model.contextLength) })
|
|
30843
30938
|
] })
|
|
30844
30939
|
] }, model.id);
|
|
30845
30940
|
}),
|
|
30846
|
-
canScrollDown && /* @__PURE__ */
|
|
30941
|
+
canScrollDown && /* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: " \u2193" })
|
|
30847
30942
|
] }),
|
|
30848
|
-
loadState === "ready" && /* @__PURE__ */
|
|
30849
|
-
/* @__PURE__ */
|
|
30943
|
+
loadState === "ready" && /* @__PURE__ */ jsxs53(Box49, { marginTop: 1, justifyContent: "space-between", children: [
|
|
30944
|
+
/* @__PURE__ */ jsxs53(Text57, { color: theme.ui.comment, dimColor: true, children: [
|
|
30850
30945
|
selectableCount,
|
|
30851
30946
|
" model",
|
|
30852
30947
|
selectableCount !== 1 ? "s" : "",
|
|
30853
30948
|
search ? ` \xB7 "${search}"` : ""
|
|
30854
30949
|
] }),
|
|
30855
|
-
selectableCount > MAX_VISIBLE && /* @__PURE__ */
|
|
30950
|
+
selectableCount > MAX_VISIBLE && /* @__PURE__ */ jsxs53(Text57, { color: theme.ui.comment, dimColor: true, children: [
|
|
30856
30951
|
clampedIndex + 1,
|
|
30857
30952
|
"/",
|
|
30858
30953
|
selectableCount
|
|
30859
30954
|
] })
|
|
30860
30955
|
] }),
|
|
30861
|
-
/* @__PURE__ */
|
|
30862
|
-
|
|
30956
|
+
/* @__PURE__ */ jsx59(
|
|
30957
|
+
Box49,
|
|
30863
30958
|
{
|
|
30864
30959
|
marginTop: 1,
|
|
30865
30960
|
borderStyle: "single",
|
|
@@ -30868,7 +30963,7 @@ var ModelDialog = ({
|
|
|
30868
30963
|
borderLeft: false,
|
|
30869
30964
|
borderRight: false,
|
|
30870
30965
|
borderColor: theme.ui.comment,
|
|
30871
|
-
children: /* @__PURE__ */
|
|
30966
|
+
children: /* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navegar digitar para buscar Enter usar Esc fechar" })
|
|
30872
30967
|
}
|
|
30873
30968
|
)
|
|
30874
30969
|
]
|
|
@@ -30922,8 +31017,8 @@ var FeedbackDialog = ({ cwd, onClose }) => {
|
|
|
30922
31017
|
[onClose]
|
|
30923
31018
|
);
|
|
30924
31019
|
useKeypress(handleEscape, { isActive: true });
|
|
30925
|
-
return /* @__PURE__ */
|
|
30926
|
-
|
|
31020
|
+
return /* @__PURE__ */ jsxs54(
|
|
31021
|
+
Box50,
|
|
30927
31022
|
{
|
|
30928
31023
|
flexDirection: "column",
|
|
30929
31024
|
borderStyle: "round",
|
|
@@ -30932,9 +31027,9 @@ var FeedbackDialog = ({ cwd, onClose }) => {
|
|
|
30932
31027
|
marginLeft: 2,
|
|
30933
31028
|
marginRight: 2,
|
|
30934
31029
|
children: [
|
|
30935
|
-
/* @__PURE__ */
|
|
30936
|
-
/* @__PURE__ */
|
|
30937
|
-
/* @__PURE__ */
|
|
31030
|
+
/* @__PURE__ */ jsx60(Text58, { bold: true, color: theme.text.accent, children: "How useful was DeepCode in this session?" }),
|
|
31031
|
+
/* @__PURE__ */ jsx60(RadioButtonSelect, { items, onSelect: handleSelect, isFocused: true, showNumbers: false }),
|
|
31032
|
+
/* @__PURE__ */ jsx60(Text58, { color: theme.text.secondary, children: "\u2191\u2193 navigate \xB7 Enter submit \xB7 Esc cancel" })
|
|
30938
31033
|
]
|
|
30939
31034
|
}
|
|
30940
31035
|
);
|
|
@@ -31033,8 +31128,8 @@ var SessionsDialog = ({ cwd, currentSessionId, onSelect, onClose }) => {
|
|
|
31033
31128
|
}, { isActive: true });
|
|
31034
31129
|
const canScrollUp = scrollTop > 0;
|
|
31035
31130
|
const canScrollDown = scrollTop + MAX_VISIBLE2 < sessions.length;
|
|
31036
|
-
return /* @__PURE__ */
|
|
31037
|
-
|
|
31131
|
+
return /* @__PURE__ */ jsxs55(
|
|
31132
|
+
Box51,
|
|
31038
31133
|
{
|
|
31039
31134
|
flexDirection: "column",
|
|
31040
31135
|
borderStyle: "round",
|
|
@@ -31045,34 +31140,34 @@ var SessionsDialog = ({ cwd, currentSessionId, onSelect, onClose }) => {
|
|
|
31045
31140
|
marginRight: 1,
|
|
31046
31141
|
minWidth: 60,
|
|
31047
31142
|
children: [
|
|
31048
|
-
/* @__PURE__ */
|
|
31049
|
-
/* @__PURE__ */
|
|
31050
|
-
/* @__PURE__ */
|
|
31143
|
+
/* @__PURE__ */ jsxs55(Box51, { justifyContent: "space-between", marginBottom: 1, children: [
|
|
31144
|
+
/* @__PURE__ */ jsx61(Text59, { bold: true, color: theme.text.primary, children: "Retomar sess\xE3o" }),
|
|
31145
|
+
/* @__PURE__ */ jsx61(Text59, { color: theme.ui.comment, dimColor: true, children: "esc" })
|
|
31051
31146
|
] }),
|
|
31052
|
-
/* @__PURE__ */
|
|
31053
|
-
|
|
31147
|
+
/* @__PURE__ */ jsxs55(
|
|
31148
|
+
Box51,
|
|
31054
31149
|
{
|
|
31055
31150
|
borderStyle: "single",
|
|
31056
31151
|
borderColor: search ? theme.border.focused : theme.ui.comment,
|
|
31057
31152
|
paddingX: 1,
|
|
31058
31153
|
marginBottom: 1,
|
|
31059
31154
|
children: [
|
|
31060
|
-
/* @__PURE__ */
|
|
31061
|
-
search ? /* @__PURE__ */
|
|
31155
|
+
/* @__PURE__ */ jsx61(Text59, { color: theme.ui.comment, children: "\u2315 " }),
|
|
31156
|
+
search ? /* @__PURE__ */ jsxs55(Text59, { color: theme.text.primary, children: [
|
|
31062
31157
|
search,
|
|
31063
|
-
/* @__PURE__ */
|
|
31064
|
-
] }) : /* @__PURE__ */
|
|
31158
|
+
/* @__PURE__ */ jsx61(Text59, { color: theme.text.accent, children: "\u258C" })
|
|
31159
|
+
] }) : /* @__PURE__ */ jsxs55(Text59, { color: theme.ui.comment, dimColor: true, children: [
|
|
31065
31160
|
"Search",
|
|
31066
|
-
/* @__PURE__ */
|
|
31161
|
+
/* @__PURE__ */ jsx61(Text59, { color: theme.text.accent, children: "\u258C" })
|
|
31067
31162
|
] })
|
|
31068
31163
|
]
|
|
31069
31164
|
}
|
|
31070
31165
|
),
|
|
31071
|
-
loadState === "loading" && /* @__PURE__ */
|
|
31072
|
-
loadState === "error" && /* @__PURE__ */
|
|
31073
|
-
loadState === "ready" && sessions.length === 0 && /* @__PURE__ */
|
|
31074
|
-
loadState === "ready" && sessions.length > 0 && /* @__PURE__ */
|
|
31075
|
-
canScrollUp && /* @__PURE__ */
|
|
31166
|
+
loadState === "loading" && /* @__PURE__ */ jsx61(Box51, { marginY: 1, children: /* @__PURE__ */ jsx61(Text59, { color: theme.text.secondary, children: "Carregando sess\xF5es\u2026" }) }),
|
|
31167
|
+
loadState === "error" && /* @__PURE__ */ jsx61(Box51, { marginY: 1, children: /* @__PURE__ */ jsx61(Text59, { color: theme.status.error, children: "\u2717 N\xE3o foi poss\xEDvel carregar sess\xF5es" }) }),
|
|
31168
|
+
loadState === "ready" && sessions.length === 0 && /* @__PURE__ */ jsx61(Box51, { marginY: 1, children: /* @__PURE__ */ jsx61(Text59, { color: theme.ui.comment, dimColor: true, children: search ? `Nenhuma sess\xE3o para "${search}"` : "Nenhuma sess\xE3o em .deepcode/sessions/" }) }),
|
|
31169
|
+
loadState === "ready" && sessions.length > 0 && /* @__PURE__ */ jsxs55(Box51, { flexDirection: "column", children: [
|
|
31170
|
+
canScrollUp && /* @__PURE__ */ jsx61(Text59, { color: theme.ui.comment, dimColor: true, children: " \u2191" }),
|
|
31076
31171
|
visibleSessions.map((session, visIdx) => {
|
|
31077
31172
|
const globalIdx = scrollTop + visIdx;
|
|
31078
31173
|
const isActive = globalIdx === clampedIndex;
|
|
@@ -31082,11 +31177,11 @@ var SessionsDialog = ({ cwd, currentSessionId, onSelect, onClose }) => {
|
|
|
31082
31177
|
const msgCount = session.messages.length;
|
|
31083
31178
|
const preview = sessionLabel2(session);
|
|
31084
31179
|
const isCurrent = session.id === currentSessionId;
|
|
31085
|
-
return /* @__PURE__ */
|
|
31086
|
-
/* @__PURE__ */
|
|
31087
|
-
/* @__PURE__ */
|
|
31088
|
-
/* @__PURE__ */
|
|
31089
|
-
|
|
31180
|
+
return /* @__PURE__ */ jsxs55(Box51, { flexDirection: "column", children: [
|
|
31181
|
+
/* @__PURE__ */ jsxs55(Box51, { gap: 1, children: [
|
|
31182
|
+
/* @__PURE__ */ jsx61(Text59, { color: isActive ? theme.text.accent : isCurrent ? theme.status.success : theme.ui.comment, children: isCurrent ? "\u25CF" : isActive ? "\u203A" : " " }),
|
|
31183
|
+
/* @__PURE__ */ jsx61(
|
|
31184
|
+
Text59,
|
|
31090
31185
|
{
|
|
31091
31186
|
color: isActive ? theme.text.primary : theme.text.secondary,
|
|
31092
31187
|
bold: isActive,
|
|
@@ -31095,7 +31190,7 @@ var SessionsDialog = ({ cwd, currentSessionId, onSelect, onClose }) => {
|
|
|
31095
31190
|
}
|
|
31096
31191
|
)
|
|
31097
31192
|
] }),
|
|
31098
|
-
isActive && /* @__PURE__ */
|
|
31193
|
+
isActive && /* @__PURE__ */ jsx61(Box51, { paddingLeft: 2, children: /* @__PURE__ */ jsxs55(Text59, { color: theme.ui.comment, dimColor: true, children: [
|
|
31099
31194
|
shortId,
|
|
31100
31195
|
" ",
|
|
31101
31196
|
target,
|
|
@@ -31106,23 +31201,23 @@ var SessionsDialog = ({ cwd, currentSessionId, onSelect, onClose }) => {
|
|
|
31106
31201
|
] }) })
|
|
31107
31202
|
] }, session.id);
|
|
31108
31203
|
}),
|
|
31109
|
-
canScrollDown && /* @__PURE__ */
|
|
31110
|
-
/* @__PURE__ */
|
|
31111
|
-
/* @__PURE__ */
|
|
31204
|
+
canScrollDown && /* @__PURE__ */ jsx61(Text59, { color: theme.ui.comment, dimColor: true, children: " \u2193" }),
|
|
31205
|
+
/* @__PURE__ */ jsxs55(Box51, { marginTop: 1, justifyContent: "space-between", children: [
|
|
31206
|
+
/* @__PURE__ */ jsxs55(Text59, { color: theme.ui.comment, dimColor: true, children: [
|
|
31112
31207
|
sessions.length,
|
|
31113
31208
|
" session",
|
|
31114
31209
|
sessions.length !== 1 ? "s" : "",
|
|
31115
31210
|
search ? ` \xB7 "${search}"` : ""
|
|
31116
31211
|
] }),
|
|
31117
|
-
sessions.length > MAX_VISIBLE2 && /* @__PURE__ */
|
|
31212
|
+
sessions.length > MAX_VISIBLE2 && /* @__PURE__ */ jsxs55(Text59, { color: theme.ui.comment, dimColor: true, children: [
|
|
31118
31213
|
clampedIndex + 1,
|
|
31119
31214
|
"/",
|
|
31120
31215
|
sessions.length
|
|
31121
31216
|
] })
|
|
31122
31217
|
] })
|
|
31123
31218
|
] }),
|
|
31124
|
-
/* @__PURE__ */
|
|
31125
|
-
|
|
31219
|
+
/* @__PURE__ */ jsx61(
|
|
31220
|
+
Box51,
|
|
31126
31221
|
{
|
|
31127
31222
|
marginTop: 1,
|
|
31128
31223
|
borderStyle: "single",
|
|
@@ -31131,7 +31226,7 @@ var SessionsDialog = ({ cwd, currentSessionId, onSelect, onClose }) => {
|
|
|
31131
31226
|
borderLeft: false,
|
|
31132
31227
|
borderRight: false,
|
|
31133
31228
|
borderColor: theme.ui.comment,
|
|
31134
|
-
children: /* @__PURE__ */
|
|
31229
|
+
children: /* @__PURE__ */ jsx61(Text59, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navegar digitar para buscar Enter retomar Esc fechar" })
|
|
31135
31230
|
}
|
|
31136
31231
|
)
|
|
31137
31232
|
]
|
|
@@ -31152,8 +31247,8 @@ var SubagentsPanel = ({ subagents, mainAreaWidth }) => {
|
|
|
31152
31247
|
if (subagents.length === 0) return null;
|
|
31153
31248
|
const running = subagents.filter((s) => s.status === "running").length;
|
|
31154
31249
|
const title = running > 0 ? `Subagents (${running} running)` : `Subagents (${subagents.length} finishing\u2026)`;
|
|
31155
|
-
return /* @__PURE__ */
|
|
31156
|
-
|
|
31250
|
+
return /* @__PURE__ */ jsxs56(
|
|
31251
|
+
Box52,
|
|
31157
31252
|
{
|
|
31158
31253
|
flexDirection: "column",
|
|
31159
31254
|
borderStyle: "round",
|
|
@@ -31163,25 +31258,25 @@ var SubagentsPanel = ({ subagents, mainAreaWidth }) => {
|
|
|
31163
31258
|
marginTop: 1,
|
|
31164
31259
|
width: Math.min(mainAreaWidth, 80),
|
|
31165
31260
|
children: [
|
|
31166
|
-
/* @__PURE__ */
|
|
31167
|
-
subagents.map((entry) => /* @__PURE__ */
|
|
31168
|
-
/* @__PURE__ */
|
|
31169
|
-
/* @__PURE__ */
|
|
31170
|
-
/* @__PURE__ */
|
|
31261
|
+
/* @__PURE__ */ jsx62(Box52, { paddingX: 1, children: /* @__PURE__ */ jsx62(Text60, { bold: true, color: theme.text.accent, children: title }) }),
|
|
31262
|
+
subagents.map((entry) => /* @__PURE__ */ jsxs56(Box52, { flexDirection: "column", paddingX: 1, children: [
|
|
31263
|
+
/* @__PURE__ */ jsxs56(Box52, { flexDirection: "row", gap: 1, children: [
|
|
31264
|
+
/* @__PURE__ */ jsx62(Text60, { color: statusColor(entry), children: statusIcon(entry) }),
|
|
31265
|
+
/* @__PURE__ */ jsxs56(Text60, { wrap: "truncate", color: theme.text.primary, children: [
|
|
31171
31266
|
entry.prompt,
|
|
31172
31267
|
entry.prompt.length >= 50 ? "\u2026" : ""
|
|
31173
31268
|
] })
|
|
31174
31269
|
] }),
|
|
31175
|
-
entry.status === "running" && entry.currentTool && /* @__PURE__ */
|
|
31270
|
+
entry.status === "running" && entry.currentTool && /* @__PURE__ */ jsxs56(Text60, { color: theme.text.secondary, dimColor: true, children: [
|
|
31176
31271
|
" ",
|
|
31177
31272
|
"using ",
|
|
31178
31273
|
entry.currentTool
|
|
31179
31274
|
] }),
|
|
31180
|
-
entry.status === "running" && !entry.currentTool && entry.currentOutput && /* @__PURE__ */
|
|
31275
|
+
entry.status === "running" && !entry.currentTool && entry.currentOutput && /* @__PURE__ */ jsxs56(Text60, { color: theme.text.secondary, dimColor: true, wrap: "truncate", children: [
|
|
31181
31276
|
" ",
|
|
31182
31277
|
entry.currentOutput.trimStart()
|
|
31183
31278
|
] }),
|
|
31184
|
-
entry.status === "failed" && entry.error && /* @__PURE__ */
|
|
31279
|
+
entry.status === "failed" && entry.error && /* @__PURE__ */ jsxs56(Text60, { color: theme.status.error, dimColor: true, wrap: "truncate", children: [
|
|
31185
31280
|
" ",
|
|
31186
31281
|
entry.error.slice(0, 60)
|
|
31187
31282
|
] })
|
|
@@ -31562,6 +31657,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
31562
31657
|
clearCommand,
|
|
31563
31658
|
undoCommand,
|
|
31564
31659
|
compactCommand,
|
|
31660
|
+
vimCommand,
|
|
31565
31661
|
diffCommand,
|
|
31566
31662
|
exportCommand,
|
|
31567
31663
|
contextCommand,
|
|
@@ -33018,10 +33114,10 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33018
33114
|
userMessages
|
|
33019
33115
|
]
|
|
33020
33116
|
);
|
|
33021
|
-
return /* @__PURE__ */
|
|
33022
|
-
/* @__PURE__ */
|
|
33023
|
-
/* @__PURE__ */
|
|
33024
|
-
/* @__PURE__ */
|
|
33117
|
+
return /* @__PURE__ */ jsx63(AppContext.Provider, { value: appContextValue, children: /* @__PURE__ */ jsx63(CompactModeProvider, { value: { compactMode }, children: /* @__PURE__ */ jsx63(ConfigContext.Provider, { value: configAdapter, children: /* @__PURE__ */ jsx63(SettingsContext.Provider, { value: loadedSettings, children: /* @__PURE__ */ jsx63(StreamingContext.Provider, { value: streamingState, children: /* @__PURE__ */ jsxs57(VimModeProvider, { initialVimEnabled: loadedSettings.merged.general?.vimMode ?? false, children: [
|
|
33118
|
+
/* @__PURE__ */ jsx63(VimToggleRegistrar, { onRegister: registerVimToggle }),
|
|
33119
|
+
/* @__PURE__ */ jsx63(KeypressProvider, { kittyProtocolEnabled: false, config: configAdapter, children: /* @__PURE__ */ jsx63(ShellFocusContext.Provider, { value: true, children: /* @__PURE__ */ jsx63(AgentViewProvider, { children: /* @__PURE__ */ jsx63(BackgroundTaskViewProvider, { children: /* @__PURE__ */ jsx63(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ jsx63(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ jsxs57(Box53, { flexDirection: "column", flexGrow: 1, children: [
|
|
33120
|
+
/* @__PURE__ */ jsx63(
|
|
33025
33121
|
AppHeader,
|
|
33026
33122
|
{
|
|
33027
33123
|
version: VERSION,
|
|
@@ -33033,11 +33129,11 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33033
33129
|
sessionName: sessionDisplayName || void 0
|
|
33034
33130
|
}
|
|
33035
33131
|
),
|
|
33036
|
-
initError ? /* @__PURE__ */
|
|
33132
|
+
initError ? /* @__PURE__ */ jsx63(Box53, { marginLeft: 2, marginRight: 2, children: /* @__PURE__ */ jsxs57(Text61, { color: theme.status.error, children: [
|
|
33037
33133
|
"Failed to initialize runtime: ",
|
|
33038
33134
|
initError
|
|
33039
|
-
] }) }) : /* @__PURE__ */
|
|
33040
|
-
/* @__PURE__ */
|
|
33135
|
+
] }) }) : /* @__PURE__ */ jsxs57(Box53, { flexDirection: "column", flexGrow: 1, children: [
|
|
33136
|
+
/* @__PURE__ */ jsx63(
|
|
33041
33137
|
MainContent,
|
|
33042
33138
|
{
|
|
33043
33139
|
history: historyManager.history,
|
|
@@ -33049,11 +33145,11 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33049
33145
|
isFocused: approvalQueue.length === 0
|
|
33050
33146
|
}
|
|
33051
33147
|
),
|
|
33052
|
-
/* @__PURE__ */
|
|
33148
|
+
/* @__PURE__ */ jsx63(ShowMoreLines, { constrainHeight })
|
|
33053
33149
|
] }),
|
|
33054
|
-
approvalQueue.length > 0 && /* @__PURE__ */
|
|
33055
|
-
dialogModel && /* @__PURE__ */
|
|
33056
|
-
activeDialog === "provider" && /* @__PURE__ */
|
|
33150
|
+
approvalQueue.length > 0 && /* @__PURE__ */ jsx63(Box53, { marginLeft: 2, marginRight: 2, marginTop: 1, children: /* @__PURE__ */ jsx63(ApprovalPrompt, { request: approvalQueue[0], queueLength: approvalQueue.length }) }),
|
|
33151
|
+
dialogModel && /* @__PURE__ */ jsx63(CommandDialog, { title: dialogModel.title, lines: dialogModel.lines }),
|
|
33152
|
+
activeDialog === "provider" && /* @__PURE__ */ jsx63(
|
|
33057
33153
|
ProviderDialog,
|
|
33058
33154
|
{
|
|
33059
33155
|
providers: listAvailableProviders(),
|
|
@@ -33068,7 +33164,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33068
33164
|
onClose: closeDialog
|
|
33069
33165
|
}
|
|
33070
33166
|
),
|
|
33071
|
-
activeDialog === "model" && /* @__PURE__ */
|
|
33167
|
+
activeDialog === "model" && /* @__PURE__ */ jsx63(
|
|
33072
33168
|
ModelDialog,
|
|
33073
33169
|
{
|
|
33074
33170
|
currentProvider: getSessionCommandState().provider,
|
|
@@ -33078,7 +33174,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33078
33174
|
onClose: closeDialog
|
|
33079
33175
|
}
|
|
33080
33176
|
),
|
|
33081
|
-
activeDialog === "theme" && /* @__PURE__ */
|
|
33177
|
+
activeDialog === "theme" && /* @__PURE__ */ jsx63(
|
|
33082
33178
|
ThemeDialog,
|
|
33083
33179
|
{
|
|
33084
33180
|
onSelect: handleSelectTheme,
|
|
@@ -33086,7 +33182,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33086
33182
|
onPreview: previewTheme
|
|
33087
33183
|
}
|
|
33088
33184
|
),
|
|
33089
|
-
activeDialog === "permissions" && /* @__PURE__ */
|
|
33185
|
+
activeDialog === "permissions" && /* @__PURE__ */ jsx63(
|
|
33090
33186
|
PermissionsDialog,
|
|
33091
33187
|
{
|
|
33092
33188
|
current: permissionModes,
|
|
@@ -33094,7 +33190,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33094
33190
|
onClose: closeDialog
|
|
33095
33191
|
}
|
|
33096
33192
|
),
|
|
33097
|
-
activeDialog === "auth" && runtimeRef.current && /* @__PURE__ */
|
|
33193
|
+
activeDialog === "auth" && runtimeRef.current && /* @__PURE__ */ jsx63(
|
|
33098
33194
|
AuthDialog,
|
|
33099
33195
|
{
|
|
33100
33196
|
clientId: runtimeRef.current.config.github.oauthClientId,
|
|
@@ -33107,8 +33203,8 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33107
33203
|
onClose: closeDialog
|
|
33108
33204
|
}
|
|
33109
33205
|
),
|
|
33110
|
-
activeDialog === "feedback" && /* @__PURE__ */
|
|
33111
|
-
activeDialog === "sessions" && /* @__PURE__ */
|
|
33206
|
+
activeDialog === "feedback" && /* @__PURE__ */ jsx63(FeedbackDialog, { cwd, onClose: closeDialog }),
|
|
33207
|
+
activeDialog === "sessions" && /* @__PURE__ */ jsx63(
|
|
33112
33208
|
SessionsDialog,
|
|
33113
33209
|
{
|
|
33114
33210
|
cwd,
|
|
@@ -33117,7 +33213,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33117
33213
|
onClose: closeDialog
|
|
33118
33214
|
}
|
|
33119
33215
|
),
|
|
33120
|
-
pendingCommandConfirmation && /* @__PURE__ */
|
|
33216
|
+
pendingCommandConfirmation && /* @__PURE__ */ jsx63(
|
|
33121
33217
|
CommandDialog,
|
|
33122
33218
|
{
|
|
33123
33219
|
title: "Confirm action",
|
|
@@ -33129,14 +33225,14 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33129
33225
|
footerText: "Press y or Enter to confirm. Press n or Esc to cancel."
|
|
33130
33226
|
}
|
|
33131
33227
|
),
|
|
33132
|
-
/* @__PURE__ */
|
|
33228
|
+
/* @__PURE__ */ jsx63(
|
|
33133
33229
|
SubagentsPanel,
|
|
33134
33230
|
{
|
|
33135
33231
|
subagents: Array.from(subagentMap.values()),
|
|
33136
33232
|
mainAreaWidth
|
|
33137
33233
|
}
|
|
33138
33234
|
),
|
|
33139
|
-
stickyTodos && /* @__PURE__ */
|
|
33235
|
+
stickyTodos && /* @__PURE__ */ jsx63(
|
|
33140
33236
|
StickyTodoList,
|
|
33141
33237
|
{
|
|
33142
33238
|
todos: stickyTodos,
|
|
@@ -33144,8 +33240,8 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33144
33240
|
maxVisibleItems: stickyTodoMaxItems
|
|
33145
33241
|
}
|
|
33146
33242
|
),
|
|
33147
|
-
/* @__PURE__ */
|
|
33148
|
-
/* @__PURE__ */
|
|
33243
|
+
/* @__PURE__ */ jsx63(Notifications, {}),
|
|
33244
|
+
/* @__PURE__ */ jsx63(Composer, {})
|
|
33149
33245
|
] }) }) }) }) }) }) })
|
|
33150
33246
|
] }) }) }) }) }) });
|
|
33151
33247
|
};
|
|
@@ -33290,83 +33386,6 @@ function formatAuthSummary(config) {
|
|
|
33290
33386
|
const enterprise = config.enterpriseUrl?.trim() ? `enterprise=${config.enterpriseUrl}` : "enterprise=github.com";
|
|
33291
33387
|
return `github token=${tokenState}, ${oauthState}, ${enterprise}`;
|
|
33292
33388
|
}
|
|
33293
|
-
var APPROVAL_PREVIEW_MAX_LINES = 4;
|
|
33294
|
-
var ApprovalPrompt = ({ request, queueLength = 1 }) => {
|
|
33295
|
-
if (!request) return null;
|
|
33296
|
-
const operationLabel = formatApprovalOperationLabel(request);
|
|
33297
|
-
const hasDiff = !!(request.diff?.before && request.diff?.after);
|
|
33298
|
-
let beforeLines = [];
|
|
33299
|
-
let afterLines = [];
|
|
33300
|
-
let singleLines = [];
|
|
33301
|
-
let truncated = false;
|
|
33302
|
-
if (hasDiff) {
|
|
33303
|
-
beforeLines = request.diff.before.split("\n").slice(0, APPROVAL_PREVIEW_MAX_LINES);
|
|
33304
|
-
afterLines = request.diff.after.split("\n").slice(0, APPROVAL_PREVIEW_MAX_LINES);
|
|
33305
|
-
truncated = request.diff.before.split("\n").length > APPROVAL_PREVIEW_MAX_LINES || request.diff.after.split("\n").length > APPROVAL_PREVIEW_MAX_LINES;
|
|
33306
|
-
} else {
|
|
33307
|
-
const raw = request.diff?.after ?? request.preview?.content ?? "";
|
|
33308
|
-
singleLines = raw.split("\n").slice(0, APPROVAL_PREVIEW_MAX_LINES);
|
|
33309
|
-
truncated = raw.split("\n").length > APPROVAL_PREVIEW_MAX_LINES;
|
|
33310
|
-
}
|
|
33311
|
-
return /* @__PURE__ */ jsxs56(
|
|
33312
|
-
Box52,
|
|
33313
|
-
{
|
|
33314
|
-
flexDirection: "column",
|
|
33315
|
-
borderStyle: "round",
|
|
33316
|
-
borderColor: theme.status.warning,
|
|
33317
|
-
paddingX: 1,
|
|
33318
|
-
marginLeft: 2,
|
|
33319
|
-
marginRight: 2,
|
|
33320
|
-
marginTop: 1,
|
|
33321
|
-
children: [
|
|
33322
|
-
/* @__PURE__ */ jsxs56(Text60, { bold: true, color: theme.status.warning, children: [
|
|
33323
|
-
"\u26A0 ",
|
|
33324
|
-
operationLabel,
|
|
33325
|
-
queueLength > 1 && /* @__PURE__ */ jsx62(Text60, { color: theme.text.secondary, children: ` (1 de ${queueLength})` })
|
|
33326
|
-
] }),
|
|
33327
|
-
request.path && /* @__PURE__ */ jsx62(Text60, { color: theme.text.secondary, children: request.path }),
|
|
33328
|
-
request.preview?.command && /* @__PURE__ */ jsxs56(Text60, { color: theme.text.primary, children: [
|
|
33329
|
-
"$ ",
|
|
33330
|
-
request.preview.command,
|
|
33331
|
-
request.preview.args?.length ? ` ${request.preview.args.join(" ")}` : ""
|
|
33332
|
-
] }),
|
|
33333
|
-
hasDiff && /* @__PURE__ */ jsxs56(Box52, { flexDirection: "column", marginTop: 1, children: [
|
|
33334
|
-
/* @__PURE__ */ jsx62(Text60, { color: theme.status.error, dimColor: true, children: "\u2500\u2500 antes" }),
|
|
33335
|
-
beforeLines.map((line, i) => /* @__PURE__ */ jsxs56(Text60, { color: theme.status.error, dimColor: true, wrap: "truncate", children: [
|
|
33336
|
-
"\u2212 ",
|
|
33337
|
-
line
|
|
33338
|
-
] }, `b${i}`)),
|
|
33339
|
-
/* @__PURE__ */ jsx62(Text60, { color: theme.status.success, dimColor: true, children: "\u2500\u2500 depois" }),
|
|
33340
|
-
afterLines.map((line, i) => /* @__PURE__ */ jsxs56(Text60, { color: theme.status.success, dimColor: true, wrap: "truncate", children: [
|
|
33341
|
-
"+ ",
|
|
33342
|
-
line
|
|
33343
|
-
] }, `a${i}`)),
|
|
33344
|
-
truncated && /* @__PURE__ */ jsx62(Text60, { color: theme.ui.comment, dimColor: true, children: "\u2026" })
|
|
33345
|
-
] }),
|
|
33346
|
-
!hasDiff && singleLines.length > 0 && /* @__PURE__ */ jsxs56(Box52, { flexDirection: "column", marginTop: 1, children: [
|
|
33347
|
-
singleLines.map((line, i) => /* @__PURE__ */ jsx62(Text60, { color: theme.ui.comment, dimColor: true, wrap: "truncate", children: line }, i)),
|
|
33348
|
-
truncated && /* @__PURE__ */ jsx62(Text60, { color: theme.ui.comment, dimColor: true, children: "\u2026" })
|
|
33349
|
-
] }),
|
|
33350
|
-
/* @__PURE__ */ jsx62(Box52, { marginTop: 1, children: /* @__PURE__ */ jsx62(Text60, { color: theme.text.secondary, dimColor: true, children: "[\u21B5/y] uma vez [s] sess\xE3o [a] sempre [n/Esc] negar" }) })
|
|
33351
|
-
]
|
|
33352
|
-
}
|
|
33353
|
-
);
|
|
33354
|
-
};
|
|
33355
|
-
function formatApprovalOperationLabel(request) {
|
|
33356
|
-
const labels = {
|
|
33357
|
-
write_file: "escrever arquivo",
|
|
33358
|
-
edit_file: "editar arquivo",
|
|
33359
|
-
read_file: "ler arquivo",
|
|
33360
|
-
bash: "executar comando shell",
|
|
33361
|
-
shell: "executar comando shell",
|
|
33362
|
-
git: "executar comando git",
|
|
33363
|
-
fetch_web: "acessar URL",
|
|
33364
|
-
search_text: "buscar em arquivos",
|
|
33365
|
-
list_dir: "listar diret\xF3rio",
|
|
33366
|
-
analyze_code: "analisar c\xF3digo"
|
|
33367
|
-
};
|
|
33368
|
-
return labels[request.operation] ?? request.operation.replace(/_/g, " ");
|
|
33369
|
-
}
|
|
33370
33389
|
var DeepCodeConfigAdapter = class {
|
|
33371
33390
|
constructor(cwd) {
|
|
33372
33391
|
this.cwd = cwd;
|
|
@@ -33410,7 +33429,7 @@ var DeepCodeConfigAdapter = class {
|
|
|
33410
33429
|
}
|
|
33411
33430
|
};
|
|
33412
33431
|
function App(props) {
|
|
33413
|
-
return /* @__PURE__ */
|
|
33432
|
+
return /* @__PURE__ */ jsx64(
|
|
33414
33433
|
AppContainer,
|
|
33415
33434
|
{
|
|
33416
33435
|
cwd: props.cwd,
|