deepcode-ai 1.2.27 → 1.2.29
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 +329 -316
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2779,10 +2779,11 @@ function buildFallbackToolCallPrompt(allowedToolNames) {
|
|
|
2779
2779
|
return [
|
|
2780
2780
|
"Tool fallback for this model:",
|
|
2781
2781
|
"Prefer native tool calling when the model supports it.",
|
|
2782
|
-
"If you need
|
|
2782
|
+
"If you need one or more tools and native tool calling is unavailable for this model, emit one XML block per tool call, each in this format:",
|
|
2783
2783
|
'<tool_call>{"name":"tool_name","arguments":{"key":"value"}}</tool_call>',
|
|
2784
|
+
"You may emit multiple <tool_call> blocks in a single response to invoke several tools in parallel.",
|
|
2784
2785
|
"Do not wrap the JSON in markdown fences.",
|
|
2785
|
-
"Use only
|
|
2786
|
+
"Use only tool names from this turn's allowed set.",
|
|
2786
2787
|
`Allowed tool names: ${[...allowedToolNames].join(", ")}`,
|
|
2787
2788
|
"If no tool is needed, answer normally with plain text."
|
|
2788
2789
|
].join("\n");
|
|
@@ -2794,16 +2795,16 @@ function applyFallbackToolCallParsing(assistantText, nativeToolCalls, allowedToo
|
|
|
2794
2795
|
toolCalls: nativeToolCalls
|
|
2795
2796
|
};
|
|
2796
2797
|
}
|
|
2797
|
-
const
|
|
2798
|
-
if (
|
|
2798
|
+
const fallbackCalls = extractFallbackToolCalls(assistantText, allowedToolNames);
|
|
2799
|
+
if (fallbackCalls.length === 0) {
|
|
2799
2800
|
return {
|
|
2800
2801
|
assistantText: stripFallbackToolEnvelope(assistantText),
|
|
2801
2802
|
toolCalls: nativeToolCalls
|
|
2802
2803
|
};
|
|
2803
2804
|
}
|
|
2804
2805
|
return {
|
|
2805
|
-
assistantText:
|
|
2806
|
-
toolCalls:
|
|
2806
|
+
assistantText: stripFallbackToolEnvelope(assistantText),
|
|
2807
|
+
toolCalls: fallbackCalls
|
|
2807
2808
|
};
|
|
2808
2809
|
}
|
|
2809
2810
|
function truncateToolOutput(output, maxLength = MAX_TOOL_OUTPUT_LENGTH) {
|
|
@@ -2861,26 +2862,19 @@ function shouldDropSchemaKey(key, schemaMode, depth) {
|
|
|
2861
2862
|
}
|
|
2862
2863
|
return false;
|
|
2863
2864
|
}
|
|
2864
|
-
function
|
|
2865
|
-
const
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
return void 0;
|
|
2872
|
-
}
|
|
2873
|
-
const cleanedText = collapseFallbackWhitespace(
|
|
2874
|
-
`${assistantText.slice(0, match.index)}${assistantText.slice(match.index + match[0].length)}`
|
|
2875
|
-
);
|
|
2876
|
-
return {
|
|
2877
|
-
call: {
|
|
2865
|
+
function extractFallbackToolCalls(assistantText, allowedToolNames) {
|
|
2866
|
+
const matches = [...assistantText.matchAll(/<tool_call>\s*([\s\S]*?)\s*<\/tool_call>/gi)];
|
|
2867
|
+
const calls = [];
|
|
2868
|
+
for (const match of matches) {
|
|
2869
|
+
const payload = parseFallbackToolPayload(match[1] ?? "");
|
|
2870
|
+
if (!payload || !allowedToolNames.has(payload.name)) continue;
|
|
2871
|
+
calls.push({
|
|
2878
2872
|
id: createId("toolcall"),
|
|
2879
2873
|
name: payload.name,
|
|
2880
2874
|
arguments: payload.arguments
|
|
2881
|
-
}
|
|
2882
|
-
|
|
2883
|
-
|
|
2875
|
+
});
|
|
2876
|
+
}
|
|
2877
|
+
return calls;
|
|
2884
2878
|
}
|
|
2885
2879
|
function stripFallbackToolEnvelope(assistantText) {
|
|
2886
2880
|
return collapseFallbackWhitespace(
|
|
@@ -7864,7 +7858,7 @@ import path62 from "path";
|
|
|
7864
7858
|
import fs12 from "fs";
|
|
7865
7859
|
import path19 from "path";
|
|
7866
7860
|
import React41, { isValidElement, useCallback as useCallback28, useEffect as useEffect31, useMemo as useMemo19, useRef as useRef21, useState as useState33 } from "react";
|
|
7867
|
-
import { Box as
|
|
7861
|
+
import { Box as Box53, Text as Text61, useInput as useInput6, useStdin as useStdin3 } from "ink";
|
|
7868
7862
|
import os22 from "os";
|
|
7869
7863
|
import path92 from "path";
|
|
7870
7864
|
import fs22 from "fs";
|
|
@@ -9873,9 +9867,11 @@ import fs7 from "fs";
|
|
|
9873
9867
|
import fsPromises from "fs/promises";
|
|
9874
9868
|
import path142 from "path";
|
|
9875
9869
|
import { Fragment as Fragment10, jsx as jsx51, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
9876
|
-
import { memo, useMemo as useMemo12 } from "react";
|
|
9877
9870
|
import { Box as Box42, Text as Text50 } from "ink";
|
|
9878
9871
|
import { jsx as jsx52, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
9872
|
+
import { memo, useMemo as useMemo12 } from "react";
|
|
9873
|
+
import { Box as Box43, Text as Text51 } from "ink";
|
|
9874
|
+
import { jsx as jsx53, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
9879
9875
|
import { useState as useState27, useEffect as useEffect27, useRef as useRef17 } from "react";
|
|
9880
9876
|
import { useState as useState25, useEffect as useEffect25, useRef as useRef15 } from "react";
|
|
9881
9877
|
import { useState as useState26, useEffect as useEffect26, useRef as useRef16 } from "react";
|
|
@@ -9888,35 +9884,35 @@ import process4 from "process";
|
|
|
9888
9884
|
import fs10 from "fs";
|
|
9889
9885
|
import os7 from "os";
|
|
9890
9886
|
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
9887
|
import { Box as Box44, Text as Text52 } from "ink";
|
|
9895
9888
|
import { jsx as jsx54, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
9889
|
+
import { useCallback as useCallback21, useMemo as useMemo13, useRef as useRef18 } from "react";
|
|
9890
|
+
import { Box as Box45, Text as Text53 } from "ink";
|
|
9891
|
+
import { jsx as jsx55, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
9896
9892
|
import { useCallback as useCallback22, useMemo as useMemo14, useState as useState28 } from "react";
|
|
9897
|
-
import { Box as
|
|
9898
|
-
import { Fragment as Fragment11, jsx as
|
|
9893
|
+
import { Box as Box46, Text as Text54, useInput as useInput3 } from "ink";
|
|
9894
|
+
import { Fragment as Fragment11, jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
9899
9895
|
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
9896
|
import { Box as Box47, Text as Text55 } from "ink";
|
|
9904
9897
|
import { jsx as jsx57, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
9905
|
-
import { useCallback as
|
|
9906
|
-
import { Box as Box48, Text as Text56
|
|
9898
|
+
import { useCallback as useCallback24, useEffect as useEffect28, useMemo as useMemo15, useRef as useRef19, useState as useState30 } from "react";
|
|
9899
|
+
import { Box as Box48, Text as Text56 } from "ink";
|
|
9907
9900
|
import { jsx as jsx58, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
9901
|
+
import { useCallback as useCallback25, useEffect as useEffect29, useMemo as useMemo16, useRef as useRef20, useState as useState31 } from "react";
|
|
9902
|
+
import { Box as Box49, Text as Text57, useInput as useInput4 } from "ink";
|
|
9903
|
+
import { jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
9908
9904
|
import fs11 from "fs";
|
|
9909
9905
|
import path18 from "path";
|
|
9910
9906
|
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";
|
|
9907
|
+
import { Box as Box50, Text as Text58 } from "ink";
|
|
9915
9908
|
import { jsx as jsx60, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
9916
|
-
import {
|
|
9909
|
+
import { useCallback as useCallback27, useEffect as useEffect30, useMemo as useMemo18, useState as useState32 } from "react";
|
|
9910
|
+
import { Box as Box51, Text as Text59, useInput as useInput5 } from "ink";
|
|
9917
9911
|
import { jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
9912
|
+
import { Box as Box52, Text as Text60 } from "ink";
|
|
9918
9913
|
import { jsx as jsx62, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
9919
|
-
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
9914
|
+
import { jsx as jsx63, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
9915
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
9920
9916
|
async function createRuntime(options) {
|
|
9921
9917
|
const worktree = path10.resolve(options.cwd);
|
|
9922
9918
|
const config = await new ConfigLoader().load({ cwd: worktree, configPath: options.configPath });
|
|
@@ -11509,7 +11505,7 @@ function parseVersion(version) {
|
|
|
11509
11505
|
if (!match) return null;
|
|
11510
11506
|
return [Number(match[1]), Number(match[2]), Number(match[3])];
|
|
11511
11507
|
}
|
|
11512
|
-
var VERSION = "1.2.
|
|
11508
|
+
var VERSION = "1.2.29".length > 0 ? "1.2.29" : "0.0.0-dev";
|
|
11513
11509
|
async function updateCommand() {
|
|
11514
11510
|
writeStdoutLine(`Current version: ${VERSION}`);
|
|
11515
11511
|
const update = await checkForUpdate(VERSION, { force: true });
|
|
@@ -28818,6 +28814,83 @@ var AppHeader = ({
|
|
|
28818
28814
|
}
|
|
28819
28815
|
);
|
|
28820
28816
|
};
|
|
28817
|
+
var APPROVAL_PREVIEW_MAX_LINES = 4;
|
|
28818
|
+
function formatApprovalOperationLabel(request) {
|
|
28819
|
+
const labels = {
|
|
28820
|
+
write_file: "escrever arquivo",
|
|
28821
|
+
edit_file: "editar arquivo",
|
|
28822
|
+
read_file: "ler arquivo",
|
|
28823
|
+
bash: "executar comando shell",
|
|
28824
|
+
shell: "executar comando shell",
|
|
28825
|
+
git: "executar comando git",
|
|
28826
|
+
fetch_web: "acessar URL",
|
|
28827
|
+
search_text: "buscar em arquivos",
|
|
28828
|
+
list_dir: "listar diret\xF3rio",
|
|
28829
|
+
analyze_code: "analisar c\xF3digo"
|
|
28830
|
+
};
|
|
28831
|
+
return labels[request.operation] ?? request.operation.replace(/_/g, " ");
|
|
28832
|
+
}
|
|
28833
|
+
var ApprovalPrompt = ({ request, queueLength = 1 }) => {
|
|
28834
|
+
if (!request) return null;
|
|
28835
|
+
const operationLabel = formatApprovalOperationLabel(request);
|
|
28836
|
+
const hasDiff = !!(request.diff?.before && request.diff?.after);
|
|
28837
|
+
let beforeLines = [];
|
|
28838
|
+
let afterLines = [];
|
|
28839
|
+
let singleLines = [];
|
|
28840
|
+
let truncated = false;
|
|
28841
|
+
if (hasDiff) {
|
|
28842
|
+
beforeLines = request.diff.before.split("\n").slice(0, APPROVAL_PREVIEW_MAX_LINES);
|
|
28843
|
+
afterLines = request.diff.after.split("\n").slice(0, APPROVAL_PREVIEW_MAX_LINES);
|
|
28844
|
+
truncated = request.diff.before.split("\n").length > APPROVAL_PREVIEW_MAX_LINES || request.diff.after.split("\n").length > APPROVAL_PREVIEW_MAX_LINES;
|
|
28845
|
+
} else {
|
|
28846
|
+
const raw = request.diff?.after ?? request.preview?.content ?? "";
|
|
28847
|
+
singleLines = raw.split("\n").slice(0, APPROVAL_PREVIEW_MAX_LINES);
|
|
28848
|
+
truncated = raw.split("\n").length > APPROVAL_PREVIEW_MAX_LINES;
|
|
28849
|
+
}
|
|
28850
|
+
return /* @__PURE__ */ jsxs46(
|
|
28851
|
+
Box42,
|
|
28852
|
+
{
|
|
28853
|
+
flexDirection: "column",
|
|
28854
|
+
borderStyle: "round",
|
|
28855
|
+
borderColor: theme.status.warning,
|
|
28856
|
+
paddingX: 1,
|
|
28857
|
+
marginLeft: 2,
|
|
28858
|
+
marginRight: 2,
|
|
28859
|
+
marginTop: 1,
|
|
28860
|
+
children: [
|
|
28861
|
+
/* @__PURE__ */ jsxs46(Text50, { bold: true, color: theme.status.warning, children: [
|
|
28862
|
+
"\u26A0 ",
|
|
28863
|
+
operationLabel,
|
|
28864
|
+
queueLength > 1 && /* @__PURE__ */ jsx52(Text50, { color: theme.text.secondary, children: ` (1 de ${queueLength})` })
|
|
28865
|
+
] }),
|
|
28866
|
+
request.path && /* @__PURE__ */ jsx52(Text50, { color: theme.text.secondary, children: request.path }),
|
|
28867
|
+
request.preview?.command && /* @__PURE__ */ jsxs46(Text50, { color: theme.text.primary, children: [
|
|
28868
|
+
"$ ",
|
|
28869
|
+
request.preview.command,
|
|
28870
|
+
request.preview.args?.length ? ` ${request.preview.args.join(" ")}` : ""
|
|
28871
|
+
] }),
|
|
28872
|
+
hasDiff && /* @__PURE__ */ jsxs46(Box42, { flexDirection: "column", marginTop: 1, children: [
|
|
28873
|
+
/* @__PURE__ */ jsx52(Text50, { color: theme.status.error, dimColor: true, children: "\u2500\u2500 antes" }),
|
|
28874
|
+
beforeLines.map((line, i) => /* @__PURE__ */ jsxs46(Text50, { color: theme.status.error, dimColor: true, wrap: "truncate", children: [
|
|
28875
|
+
"\u2212 ",
|
|
28876
|
+
line
|
|
28877
|
+
] }, `b${i}`)),
|
|
28878
|
+
/* @__PURE__ */ jsx52(Text50, { color: theme.status.success, dimColor: true, children: "\u2500\u2500 depois" }),
|
|
28879
|
+
afterLines.map((line, i) => /* @__PURE__ */ jsxs46(Text50, { color: theme.status.success, dimColor: true, wrap: "truncate", children: [
|
|
28880
|
+
"+ ",
|
|
28881
|
+
line
|
|
28882
|
+
] }, `a${i}`)),
|
|
28883
|
+
truncated && /* @__PURE__ */ jsx52(Text50, { color: theme.ui.comment, dimColor: true, children: "\u2026" })
|
|
28884
|
+
] }),
|
|
28885
|
+
!hasDiff && singleLines.length > 0 && /* @__PURE__ */ jsxs46(Box42, { flexDirection: "column", marginTop: 1, children: [
|
|
28886
|
+
singleLines.map((line, i) => /* @__PURE__ */ jsx52(Text50, { color: theme.ui.comment, dimColor: true, wrap: "truncate", children: line }, i)),
|
|
28887
|
+
truncated && /* @__PURE__ */ jsx52(Text50, { color: theme.ui.comment, dimColor: true, children: "\u2026" })
|
|
28888
|
+
] }),
|
|
28889
|
+
/* @__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" }) })
|
|
28890
|
+
]
|
|
28891
|
+
}
|
|
28892
|
+
);
|
|
28893
|
+
};
|
|
28821
28894
|
var STICKY_TODO_MAX_VISIBLE_ITEMS = 5;
|
|
28822
28895
|
var MIN_HISTORY_ITEMS_AFTER_TODO_BEFORE_STICKY = 2;
|
|
28823
28896
|
var STICKY_TODO_ROWS_PER_VISIBLE_ITEM = 5;
|
|
@@ -28913,8 +28986,8 @@ var StickyTodoListComponent = ({
|
|
|
28913
28986
|
const hidden = ordered.length - visible.length;
|
|
28914
28987
|
const numColWidth = Math.max(...visible.map((t2, i) => (numberById.get(t2.id) ?? `${i + 1}.`).length)) + 1;
|
|
28915
28988
|
const contentColWidth = Math.max(1, width - numColWidth - 6);
|
|
28916
|
-
return /* @__PURE__ */
|
|
28917
|
-
|
|
28989
|
+
return /* @__PURE__ */ jsxs47(
|
|
28990
|
+
Box43,
|
|
28918
28991
|
{
|
|
28919
28992
|
marginX: 2,
|
|
28920
28993
|
width,
|
|
@@ -28923,15 +28996,15 @@ var StickyTodoListComponent = ({
|
|
|
28923
28996
|
borderColor: theme.border.default,
|
|
28924
28997
|
paddingX: 1,
|
|
28925
28998
|
children: [
|
|
28926
|
-
/* @__PURE__ */
|
|
28999
|
+
/* @__PURE__ */ jsx53(Text51, { color: theme.text.secondary, bold: true, children: "Tarefas em andamento" }),
|
|
28927
29000
|
visible.map((todo, i) => {
|
|
28928
29001
|
const num = numberById.get(todo.id) ?? `${i + 1}.`;
|
|
28929
29002
|
const color = todo.status === "in_progress" ? theme.status.success : theme.text.primary;
|
|
28930
|
-
return /* @__PURE__ */
|
|
28931
|
-
/* @__PURE__ */
|
|
28932
|
-
/* @__PURE__ */
|
|
28933
|
-
/* @__PURE__ */
|
|
28934
|
-
|
|
29003
|
+
return /* @__PURE__ */ jsxs47(Box43, { flexDirection: "row", height: 1, children: [
|
|
29004
|
+
/* @__PURE__ */ jsx53(Box43, { width: numColWidth, children: /* @__PURE__ */ jsx53(Text51, { color: theme.text.secondary, children: num }) }),
|
|
29005
|
+
/* @__PURE__ */ jsx53(Box43, { width: 2, children: /* @__PURE__ */ jsx53(Text51, { color, children: STATUS_ICONS3[todo.status] }) }),
|
|
29006
|
+
/* @__PURE__ */ jsx53(Box43, { width: contentColWidth, children: /* @__PURE__ */ jsx53(
|
|
29007
|
+
Text51,
|
|
28935
29008
|
{
|
|
28936
29009
|
color,
|
|
28937
29010
|
strikethrough: todo.status === "completed",
|
|
@@ -28941,10 +29014,10 @@ var StickyTodoListComponent = ({
|
|
|
28941
29014
|
) })
|
|
28942
29015
|
] }, todo.id);
|
|
28943
29016
|
}),
|
|
28944
|
-
hidden > 0 && /* @__PURE__ */
|
|
28945
|
-
/* @__PURE__ */
|
|
28946
|
-
/* @__PURE__ */
|
|
28947
|
-
/* @__PURE__ */
|
|
29017
|
+
hidden > 0 && /* @__PURE__ */ jsxs47(Box43, { flexDirection: "row", height: 1, children: [
|
|
29018
|
+
/* @__PURE__ */ jsx53(Box43, { width: numColWidth }),
|
|
29019
|
+
/* @__PURE__ */ jsx53(Box43, { width: 2 }),
|
|
29020
|
+
/* @__PURE__ */ jsx53(Box43, { width: contentColWidth, children: /* @__PURE__ */ jsxs47(Text51, { color: theme.text.secondary, wrap: "truncate-end", children: [
|
|
28948
29021
|
"... e mais ",
|
|
28949
29022
|
hidden
|
|
28950
29023
|
] }) })
|
|
@@ -29515,6 +29588,22 @@ var undoCommand = {
|
|
|
29515
29588
|
};
|
|
29516
29589
|
}
|
|
29517
29590
|
};
|
|
29591
|
+
var vimCommand = {
|
|
29592
|
+
name: "vim",
|
|
29593
|
+
get description() {
|
|
29594
|
+
return t("Toggle Vim mode (Normal/Insert)");
|
|
29595
|
+
},
|
|
29596
|
+
kind: "built-in",
|
|
29597
|
+
supportedModes: ["interactive"],
|
|
29598
|
+
action: async (context) => {
|
|
29599
|
+
const enabled = await context.ui.toggleVimEnabled();
|
|
29600
|
+
return {
|
|
29601
|
+
type: "message",
|
|
29602
|
+
messageType: "info",
|
|
29603
|
+
content: enabled ? "Vim mode ativado. Pressione 'i' para INSERT, 'Esc' para NORMAL." : "Vim mode desativado."
|
|
29604
|
+
};
|
|
29605
|
+
}
|
|
29606
|
+
};
|
|
29518
29607
|
var compactCommand = {
|
|
29519
29608
|
name: "compact",
|
|
29520
29609
|
get description() {
|
|
@@ -29978,10 +30067,10 @@ var CommandDialog = ({
|
|
|
29978
30067
|
title,
|
|
29979
30068
|
lines,
|
|
29980
30069
|
footerText = "Press Esc or Enter to close."
|
|
29981
|
-
}) => /* @__PURE__ */
|
|
29982
|
-
/* @__PURE__ */
|
|
29983
|
-
/* @__PURE__ */
|
|
29984
|
-
/* @__PURE__ */
|
|
30070
|
+
}) => /* @__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: [
|
|
30071
|
+
/* @__PURE__ */ jsx54(Text52, { bold: true, color: theme.text.accent, children: title }),
|
|
30072
|
+
/* @__PURE__ */ jsx54(Box44, { marginTop: 1, flexDirection: "column", children: lines.map((line, index) => /* @__PURE__ */ jsx54(Text52, { color: theme.text.primary, children: line }, index)) }),
|
|
30073
|
+
/* @__PURE__ */ jsx54(Box44, { marginTop: 1, children: /* @__PURE__ */ jsx54(Text52, { color: theme.text.secondary, children: footerText }) })
|
|
29985
30074
|
] }) });
|
|
29986
30075
|
var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
|
|
29987
30076
|
const originalTheme = useRef18(themeManager.getActiveTheme().name);
|
|
@@ -30018,8 +30107,8 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
|
|
|
30018
30107
|
},
|
|
30019
30108
|
[onPreview]
|
|
30020
30109
|
);
|
|
30021
|
-
return /* @__PURE__ */
|
|
30022
|
-
|
|
30110
|
+
return /* @__PURE__ */ jsxs49(
|
|
30111
|
+
Box45,
|
|
30023
30112
|
{
|
|
30024
30113
|
flexDirection: "column",
|
|
30025
30114
|
borderStyle: "round",
|
|
@@ -30028,8 +30117,8 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
|
|
|
30028
30117
|
marginLeft: 2,
|
|
30029
30118
|
marginRight: 2,
|
|
30030
30119
|
children: [
|
|
30031
|
-
/* @__PURE__ */
|
|
30032
|
-
/* @__PURE__ */
|
|
30120
|
+
/* @__PURE__ */ jsx55(Text53, { bold: true, color: theme.text.accent, children: "Select theme" }),
|
|
30121
|
+
/* @__PURE__ */ jsx55(
|
|
30033
30122
|
RadioButtonSelect,
|
|
30034
30123
|
{
|
|
30035
30124
|
items,
|
|
@@ -30039,7 +30128,7 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
|
|
|
30039
30128
|
isFocused: true
|
|
30040
30129
|
}
|
|
30041
30130
|
),
|
|
30042
|
-
/* @__PURE__ */
|
|
30131
|
+
/* @__PURE__ */ jsx55(Text53, { color: theme.text.secondary, children: "\u2191\u2193 navegar \xB7 Enter aplicar \xB7 Esc cancelar" })
|
|
30043
30132
|
]
|
|
30044
30133
|
}
|
|
30045
30134
|
);
|
|
@@ -30269,8 +30358,8 @@ var ProviderDialog = ({
|
|
|
30269
30358
|
);
|
|
30270
30359
|
const statusColor2 = status ? status.ok ? status.text.startsWith("\u2713") ? theme.status.success : theme.text.secondary : theme.status.error : void 0;
|
|
30271
30360
|
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
|
-
|
|
30361
|
+
return /* @__PURE__ */ jsxs50(
|
|
30362
|
+
Box46,
|
|
30274
30363
|
{
|
|
30275
30364
|
flexDirection: "column",
|
|
30276
30365
|
borderStyle: "round",
|
|
@@ -30281,19 +30370,19 @@ var ProviderDialog = ({
|
|
|
30281
30370
|
marginRight: 2,
|
|
30282
30371
|
minWidth: 44,
|
|
30283
30372
|
children: [
|
|
30284
|
-
/* @__PURE__ */
|
|
30285
|
-
/* @__PURE__ */
|
|
30286
|
-
phase !== "providers" && /* @__PURE__ */
|
|
30287
|
-
/* @__PURE__ */
|
|
30288
|
-
/* @__PURE__ */
|
|
30373
|
+
/* @__PURE__ */ jsxs50(Box46, { marginBottom: 1, gap: 1, children: [
|
|
30374
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: theme.text.accent, children: "Providers" }),
|
|
30375
|
+
phase !== "providers" && /* @__PURE__ */ jsxs50(Fragment11, { children: [
|
|
30376
|
+
/* @__PURE__ */ jsx56(Text54, { color: theme.text.secondary, children: "\u203A" }),
|
|
30377
|
+
/* @__PURE__ */ jsx56(Text54, { bold: true, color: theme.text.primary, children: selectedProvider })
|
|
30289
30378
|
] }),
|
|
30290
|
-
phase === "providers" && currentModel && /* @__PURE__ */
|
|
30379
|
+
phase === "providers" && currentModel && /* @__PURE__ */ jsxs50(Text54, { color: theme.text.secondary, children: [
|
|
30291
30380
|
" (",
|
|
30292
30381
|
currentModel,
|
|
30293
30382
|
")"
|
|
30294
30383
|
] })
|
|
30295
30384
|
] }),
|
|
30296
|
-
phase === "providers" && /* @__PURE__ */
|
|
30385
|
+
phase === "providers" && /* @__PURE__ */ jsx56(
|
|
30297
30386
|
BaseSelectionList,
|
|
30298
30387
|
{
|
|
30299
30388
|
items: providerItems,
|
|
@@ -30303,25 +30392,25 @@ var ProviderDialog = ({
|
|
|
30303
30392
|
maxItemsToShow: 8,
|
|
30304
30393
|
renderItem: (item, { titleColor }) => {
|
|
30305
30394
|
const { icon, color, label } = getStatusMark(item.provider, item.keyIsSet);
|
|
30306
|
-
return /* @__PURE__ */
|
|
30307
|
-
/* @__PURE__ */
|
|
30308
|
-
/* @__PURE__ */
|
|
30309
|
-
/* @__PURE__ */
|
|
30310
|
-
item.isCurrent && /* @__PURE__ */
|
|
30395
|
+
return /* @__PURE__ */ jsxs50(Box46, { gap: 1, children: [
|
|
30396
|
+
/* @__PURE__ */ jsx56(Text54, { color, children: icon }),
|
|
30397
|
+
/* @__PURE__ */ jsx56(Text54, { color: titleColor, bold: item.isCurrent, children: item.provider.padEnd(12) }),
|
|
30398
|
+
/* @__PURE__ */ jsx56(Text54, { color, dimColor: !item.keyIsSet && !item.isLocal, children: label }),
|
|
30399
|
+
item.isCurrent && /* @__PURE__ */ jsx56(Text54, { color: theme.text.accent, children: "\u25B6" })
|
|
30311
30400
|
] });
|
|
30312
30401
|
}
|
|
30313
30402
|
}
|
|
30314
30403
|
),
|
|
30315
|
-
phase === "actions" && /* @__PURE__ */
|
|
30316
|
-
/* @__PURE__ */
|
|
30317
|
-
/* @__PURE__ */
|
|
30318
|
-
/* @__PURE__ */
|
|
30404
|
+
phase === "actions" && /* @__PURE__ */ jsxs50(Fragment11, { children: [
|
|
30405
|
+
/* @__PURE__ */ jsxs50(Box46, { marginBottom: 1, gap: 1, children: [
|
|
30406
|
+
/* @__PURE__ */ jsx56(Text54, { color: theme.ui.comment, children: "session" }),
|
|
30407
|
+
/* @__PURE__ */ jsx56(Text54, { color: selectedProvider === currentProvider ? theme.text.accent : theme.text.secondary, children: selectedProvider === currentProvider ? "active" : `still using ${currentProvider}` })
|
|
30319
30408
|
] }),
|
|
30320
|
-
/* @__PURE__ */
|
|
30321
|
-
/* @__PURE__ */
|
|
30322
|
-
isLocal ? /* @__PURE__ */
|
|
30409
|
+
/* @__PURE__ */ jsxs50(Box46, { marginBottom: 1, gap: 1, children: [
|
|
30410
|
+
/* @__PURE__ */ jsx56(Text54, { color: theme.ui.comment, children: "key" }),
|
|
30411
|
+
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
30412
|
] }),
|
|
30324
|
-
/* @__PURE__ */
|
|
30413
|
+
/* @__PURE__ */ jsx56(
|
|
30325
30414
|
BaseSelectionList,
|
|
30326
30415
|
{
|
|
30327
30416
|
items: actionItems,
|
|
@@ -30329,10 +30418,10 @@ var ProviderDialog = ({
|
|
|
30329
30418
|
isFocused: !isBusy,
|
|
30330
30419
|
showNumbers: false,
|
|
30331
30420
|
maxItemsToShow: 6,
|
|
30332
|
-
renderItem: (item, { titleColor }) => /* @__PURE__ */
|
|
30333
|
-
/* @__PURE__ */
|
|
30334
|
-
/* @__PURE__ */
|
|
30335
|
-
item.hint && /* @__PURE__ */
|
|
30421
|
+
renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs50(Box46, { gap: 1, children: [
|
|
30422
|
+
/* @__PURE__ */ jsx56(Text54, { color: titleColor, children: item.icon }),
|
|
30423
|
+
/* @__PURE__ */ jsx56(Text54, { color: titleColor, children: item.label }),
|
|
30424
|
+
item.hint && /* @__PURE__ */ jsxs50(Text54, { color: theme.ui.comment, dimColor: true, children: [
|
|
30336
30425
|
"(",
|
|
30337
30426
|
item.hint,
|
|
30338
30427
|
")"
|
|
@@ -30341,26 +30430,26 @@ var ProviderDialog = ({
|
|
|
30341
30430
|
}
|
|
30342
30431
|
)
|
|
30343
30432
|
] }),
|
|
30344
|
-
phase === "apiKey" && /* @__PURE__ */
|
|
30345
|
-
/* @__PURE__ */
|
|
30346
|
-
/* @__PURE__ */
|
|
30347
|
-
isLocal ? /* @__PURE__ */
|
|
30433
|
+
phase === "apiKey" && /* @__PURE__ */ jsxs50(Box46, { flexDirection: "column", gap: 1, marginBottom: 1, children: [
|
|
30434
|
+
/* @__PURE__ */ jsxs50(Box46, { gap: 1, children: [
|
|
30435
|
+
/* @__PURE__ */ jsx56(Text54, { color: theme.ui.comment, children: "current" }),
|
|
30436
|
+
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
30437
|
] }),
|
|
30349
|
-
/* @__PURE__ */
|
|
30350
|
-
/* @__PURE__ */
|
|
30351
|
-
/* @__PURE__ */
|
|
30438
|
+
/* @__PURE__ */ jsxs50(Box46, { gap: 1, children: [
|
|
30439
|
+
/* @__PURE__ */ jsx56(Text54, { color: theme.ui.comment, children: "new key" }),
|
|
30440
|
+
/* @__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
30441
|
] })
|
|
30353
30442
|
] }),
|
|
30354
|
-
status && /* @__PURE__ */
|
|
30355
|
-
phase === "actions" && testLatencyMs !== void 0 && /* @__PURE__ */
|
|
30356
|
-
/* @__PURE__ */
|
|
30443
|
+
status && /* @__PURE__ */ jsx56(Box46, { marginTop: 1, children: /* @__PURE__ */ jsx56(Text54, { color: statusColor2, children: status.text }) }),
|
|
30444
|
+
phase === "actions" && testLatencyMs !== void 0 && /* @__PURE__ */ jsxs50(Box46, { marginTop: 0, gap: 1, children: [
|
|
30445
|
+
/* @__PURE__ */ jsxs50(Text54, { color: getLatencyColor(testLatencyMs), bold: true, children: [
|
|
30357
30446
|
testLatencyMs,
|
|
30358
30447
|
"ms"
|
|
30359
30448
|
] }),
|
|
30360
|
-
/* @__PURE__ */
|
|
30449
|
+
/* @__PURE__ */ jsx56(Text54, { color: theme.text.secondary, children: testLatencyMs < 300 ? "excellent" : testLatencyMs < 800 ? "good" : "slow" })
|
|
30361
30450
|
] }),
|
|
30362
|
-
/* @__PURE__ */
|
|
30363
|
-
|
|
30451
|
+
/* @__PURE__ */ jsx56(
|
|
30452
|
+
Box46,
|
|
30364
30453
|
{
|
|
30365
30454
|
marginTop: 1,
|
|
30366
30455
|
borderStyle: "single",
|
|
@@ -30369,7 +30458,7 @@ var ProviderDialog = ({
|
|
|
30369
30458
|
borderLeft: false,
|
|
30370
30459
|
borderRight: false,
|
|
30371
30460
|
borderColor: theme.ui.comment,
|
|
30372
|
-
children: /* @__PURE__ */
|
|
30461
|
+
children: /* @__PURE__ */ jsxs50(Text54, { color: theme.ui.comment, dimColor: true, children: [
|
|
30373
30462
|
footer,
|
|
30374
30463
|
phase === "actions" && " Test does not change the session."
|
|
30375
30464
|
] })
|
|
@@ -30443,8 +30532,8 @@ var PermissionsDialog = ({
|
|
|
30443
30532
|
[focusIndex, modes, onClose, onSave]
|
|
30444
30533
|
);
|
|
30445
30534
|
useKeypress(handleKey, { isActive: true });
|
|
30446
|
-
return /* @__PURE__ */
|
|
30447
|
-
|
|
30535
|
+
return /* @__PURE__ */ jsxs51(
|
|
30536
|
+
Box47,
|
|
30448
30537
|
{
|
|
30449
30538
|
flexDirection: "column",
|
|
30450
30539
|
borderStyle: "round",
|
|
@@ -30453,25 +30542,25 @@ var PermissionsDialog = ({
|
|
|
30453
30542
|
marginLeft: 2,
|
|
30454
30543
|
marginRight: 2,
|
|
30455
30544
|
children: [
|
|
30456
|
-
/* @__PURE__ */
|
|
30545
|
+
/* @__PURE__ */ jsx57(Text55, { bold: true, color: theme.text.accent, children: "Permiss\xF5es" }),
|
|
30457
30546
|
PERMISSION_KEYS.map((key, i) => {
|
|
30458
30547
|
const focused = focusIndex === i;
|
|
30459
30548
|
const mode = modes[key];
|
|
30460
|
-
return /* @__PURE__ */
|
|
30461
|
-
/* @__PURE__ */
|
|
30462
|
-
/* @__PURE__ */
|
|
30463
|
-
/* @__PURE__ */
|
|
30549
|
+
return /* @__PURE__ */ jsxs51(Box47, { flexDirection: "row", gap: 1, children: [
|
|
30550
|
+
/* @__PURE__ */ jsx57(Text55, { color: focused ? theme.text.accent : theme.text.secondary, children: focused ? "\u203A" : " " }),
|
|
30551
|
+
/* @__PURE__ */ jsx57(Text55, { color: focused ? theme.text.primary : theme.text.secondary, bold: focused, children: KEY_LABEL[key].padEnd(10) }),
|
|
30552
|
+
/* @__PURE__ */ jsx57(Text55, { color: modeColor(mode), bold: focused, children: mode })
|
|
30464
30553
|
] }, key);
|
|
30465
30554
|
}),
|
|
30466
|
-
/* @__PURE__ */
|
|
30555
|
+
/* @__PURE__ */ jsx57(Box47, { marginTop: 1, flexDirection: "column", children: ACTIONS3.map((action, i) => {
|
|
30467
30556
|
const focused = focusIndex === PERMISSION_KEYS.length + i;
|
|
30468
30557
|
const label = action === "save" ? dirty ? "Salvar" : "Salvar (sem edi\xE7\xF5es)" : "Cancelar";
|
|
30469
|
-
return /* @__PURE__ */
|
|
30470
|
-
/* @__PURE__ */
|
|
30471
|
-
/* @__PURE__ */
|
|
30558
|
+
return /* @__PURE__ */ jsxs51(Box47, { flexDirection: "row", gap: 1, children: [
|
|
30559
|
+
/* @__PURE__ */ jsx57(Text55, { color: focused ? theme.text.accent : theme.text.secondary, children: focused ? "\u203A" : " " }),
|
|
30560
|
+
/* @__PURE__ */ jsx57(Text55, { color: focused ? theme.text.primary : theme.text.secondary, bold: focused, children: label })
|
|
30472
30561
|
] }, action);
|
|
30473
30562
|
}) }),
|
|
30474
|
-
/* @__PURE__ */
|
|
30563
|
+
/* @__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
30564
|
]
|
|
30476
30565
|
}
|
|
30477
30566
|
);
|
|
@@ -30579,8 +30668,8 @@ var AuthDialog = ({
|
|
|
30579
30668
|
[onClose, phase]
|
|
30580
30669
|
);
|
|
30581
30670
|
useKeypress(handleEscape, { isActive: true });
|
|
30582
|
-
return /* @__PURE__ */
|
|
30583
|
-
|
|
30671
|
+
return /* @__PURE__ */ jsxs52(
|
|
30672
|
+
Box48,
|
|
30584
30673
|
{
|
|
30585
30674
|
flexDirection: "column",
|
|
30586
30675
|
borderStyle: "round",
|
|
@@ -30589,32 +30678,32 @@ var AuthDialog = ({
|
|
|
30589
30678
|
marginLeft: 2,
|
|
30590
30679
|
marginRight: 2,
|
|
30591
30680
|
children: [
|
|
30592
|
-
/* @__PURE__ */
|
|
30593
|
-
/* @__PURE__ */
|
|
30594
|
-
phase === "menu" && /* @__PURE__ */
|
|
30595
|
-
deviceCode && phase === "running" && /* @__PURE__ */
|
|
30596
|
-
/* @__PURE__ */
|
|
30681
|
+
/* @__PURE__ */ jsx58(Text56, { bold: true, color: theme.text.accent, children: "GitHub authentication" }),
|
|
30682
|
+
/* @__PURE__ */ jsx58(Text56, { color: theme.text.secondary, children: statusSummary }),
|
|
30683
|
+
phase === "menu" && /* @__PURE__ */ jsx58(RadioButtonSelect, { items, onSelect: handleSelect, isFocused: true, showNumbers: false }),
|
|
30684
|
+
deviceCode && phase === "running" && /* @__PURE__ */ jsxs52(Box48, { flexDirection: "column", marginTop: 1, children: [
|
|
30685
|
+
/* @__PURE__ */ jsxs52(Text56, { children: [
|
|
30597
30686
|
"Open: ",
|
|
30598
|
-
/* @__PURE__ */
|
|
30687
|
+
/* @__PURE__ */ jsx58(Text56, { color: theme.text.accent, children: deviceCode.verificationUri })
|
|
30599
30688
|
] }),
|
|
30600
|
-
/* @__PURE__ */
|
|
30689
|
+
/* @__PURE__ */ jsxs52(Text56, { children: [
|
|
30601
30690
|
"Code: ",
|
|
30602
|
-
/* @__PURE__ */
|
|
30691
|
+
/* @__PURE__ */ jsx58(Text56, { bold: true, color: theme.text.accent, children: deviceCode.userCode })
|
|
30603
30692
|
] }),
|
|
30604
|
-
/* @__PURE__ */
|
|
30693
|
+
/* @__PURE__ */ jsxs52(Text56, { color: theme.text.secondary, children: [
|
|
30605
30694
|
"Expires in ",
|
|
30606
30695
|
Math.round(deviceCode.expiresIn / 60),
|
|
30607
30696
|
" minutes."
|
|
30608
30697
|
] })
|
|
30609
30698
|
] }),
|
|
30610
|
-
message && /* @__PURE__ */
|
|
30611
|
-
|
|
30699
|
+
message && /* @__PURE__ */ jsx58(
|
|
30700
|
+
Text56,
|
|
30612
30701
|
{
|
|
30613
30702
|
color: phase === "error" ? theme.status.error : phase === "done" ? theme.status.success : theme.text.secondary,
|
|
30614
30703
|
children: message
|
|
30615
30704
|
}
|
|
30616
30705
|
),
|
|
30617
|
-
/* @__PURE__ */
|
|
30706
|
+
/* @__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
30707
|
]
|
|
30619
30708
|
}
|
|
30620
30709
|
);
|
|
@@ -30754,8 +30843,8 @@ var ModelDialog = ({
|
|
|
30754
30843
|
}, { isActive: true });
|
|
30755
30844
|
const canScrollUp = scrollTop > 0;
|
|
30756
30845
|
const canScrollDown = scrollTop + MAX_VISIBLE < rows.length;
|
|
30757
|
-
return /* @__PURE__ */
|
|
30758
|
-
|
|
30846
|
+
return /* @__PURE__ */ jsxs53(
|
|
30847
|
+
Box49,
|
|
30759
30848
|
{
|
|
30760
30849
|
flexDirection: "column",
|
|
30761
30850
|
borderStyle: "round",
|
|
@@ -30766,70 +30855,70 @@ var ModelDialog = ({
|
|
|
30766
30855
|
marginRight: 1,
|
|
30767
30856
|
minWidth: 58,
|
|
30768
30857
|
children: [
|
|
30769
|
-
/* @__PURE__ */
|
|
30770
|
-
/* @__PURE__ */
|
|
30771
|
-
/* @__PURE__ */
|
|
30772
|
-
/* @__PURE__ */
|
|
30773
|
-
/* @__PURE__ */
|
|
30858
|
+
/* @__PURE__ */ jsxs53(Box49, { justifyContent: "space-between", marginBottom: 1, children: [
|
|
30859
|
+
/* @__PURE__ */ jsxs53(Box49, { gap: 1, children: [
|
|
30860
|
+
/* @__PURE__ */ jsx59(Text57, { bold: true, color: theme.text.primary, children: "Selecionar modelo" }),
|
|
30861
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.text.secondary, children: "para" }),
|
|
30862
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.text.accent, children: currentProvider })
|
|
30774
30863
|
] }),
|
|
30775
|
-
/* @__PURE__ */
|
|
30864
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: "esc" })
|
|
30776
30865
|
] }),
|
|
30777
|
-
/* @__PURE__ */
|
|
30778
|
-
|
|
30866
|
+
/* @__PURE__ */ jsxs53(
|
|
30867
|
+
Box49,
|
|
30779
30868
|
{
|
|
30780
30869
|
borderStyle: "single",
|
|
30781
30870
|
borderColor: search ? theme.border.focused : theme.ui.comment,
|
|
30782
30871
|
paddingX: 1,
|
|
30783
30872
|
marginBottom: 1,
|
|
30784
30873
|
children: [
|
|
30785
|
-
/* @__PURE__ */
|
|
30786
|
-
search ? /* @__PURE__ */
|
|
30874
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, children: "\u2315 " }),
|
|
30875
|
+
search ? /* @__PURE__ */ jsxs53(Text57, { color: theme.text.primary, children: [
|
|
30787
30876
|
search,
|
|
30788
|
-
/* @__PURE__ */
|
|
30789
|
-
] }) : /* @__PURE__ */
|
|
30877
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.text.accent, children: "\u258C" })
|
|
30878
|
+
] }) : /* @__PURE__ */ jsxs53(Text57, { color: theme.ui.comment, dimColor: true, children: [
|
|
30790
30879
|
"Search",
|
|
30791
|
-
/* @__PURE__ */
|
|
30880
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.text.accent, children: "\u258C" })
|
|
30792
30881
|
] })
|
|
30793
30882
|
]
|
|
30794
30883
|
}
|
|
30795
30884
|
),
|
|
30796
|
-
loadState === "loading" && /* @__PURE__ */
|
|
30797
|
-
loadState === "error" && /* @__PURE__ */
|
|
30798
|
-
/* @__PURE__ */
|
|
30799
|
-
/* @__PURE__ */
|
|
30885
|
+
loadState === "loading" && /* @__PURE__ */ jsx59(Box49, { marginY: 1, children: /* @__PURE__ */ jsx59(Text57, { color: theme.text.secondary, children: "Carregando modelos\u2026" }) }),
|
|
30886
|
+
loadState === "error" && /* @__PURE__ */ jsxs53(Box49, { flexDirection: "column", marginY: 1, children: [
|
|
30887
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.status.error, children: "\u2717 N\xE3o foi poss\xEDvel carregar modelos" }),
|
|
30888
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: errorMsg })
|
|
30800
30889
|
] }),
|
|
30801
|
-
loadState === "ready" && selectableCount === 0 && /* @__PURE__ */
|
|
30890
|
+
loadState === "ready" && selectableCount === 0 && /* @__PURE__ */ jsx59(Box49, { marginY: 1, children: /* @__PURE__ */ jsxs53(Text57, { color: theme.ui.comment, dimColor: true, children: [
|
|
30802
30891
|
'Nenhum modelo para "',
|
|
30803
30892
|
search,
|
|
30804
30893
|
'"'
|
|
30805
30894
|
] }) }),
|
|
30806
|
-
loadState === "ready" && selectableCount > 0 && /* @__PURE__ */
|
|
30807
|
-
canScrollUp && /* @__PURE__ */
|
|
30895
|
+
loadState === "ready" && selectableCount > 0 && /* @__PURE__ */ jsxs53(Box49, { flexDirection: "column", children: [
|
|
30896
|
+
canScrollUp && /* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: " \u2191" }),
|
|
30808
30897
|
visibleRows.map((row, i) => {
|
|
30809
30898
|
if (row.kind === "header") {
|
|
30810
|
-
return /* @__PURE__ */
|
|
30899
|
+
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
30900
|
}
|
|
30812
30901
|
const { model, selIndex } = row;
|
|
30813
30902
|
const isActive = selIndex === clampedIndex;
|
|
30814
30903
|
const isCurrent = model.id === currentModel;
|
|
30815
30904
|
const price = fmtPrice(model);
|
|
30816
30905
|
const group = providerGroup(model);
|
|
30817
|
-
return /* @__PURE__ */
|
|
30818
|
-
/* @__PURE__ */
|
|
30819
|
-
/* @__PURE__ */
|
|
30820
|
-
/* @__PURE__ */
|
|
30821
|
-
/* @__PURE__ */
|
|
30822
|
-
|
|
30906
|
+
return /* @__PURE__ */ jsxs53(Box49, { flexDirection: "column", children: [
|
|
30907
|
+
/* @__PURE__ */ jsxs53(Box49, { gap: 1, children: [
|
|
30908
|
+
/* @__PURE__ */ jsx59(Text57, { color: isActive ? theme.text.accent : theme.ui.comment, children: isCurrent ? "\u25CF" : isActive ? "\u203A" : " " }),
|
|
30909
|
+
/* @__PURE__ */ jsxs53(Box49, { flexGrow: 1, gap: 1, children: [
|
|
30910
|
+
/* @__PURE__ */ jsx59(
|
|
30911
|
+
Text57,
|
|
30823
30912
|
{
|
|
30824
30913
|
color: isActive ? theme.text.primary : theme.text.secondary,
|
|
30825
30914
|
bold: isActive,
|
|
30826
30915
|
children: model.name
|
|
30827
30916
|
}
|
|
30828
30917
|
),
|
|
30829
|
-
/* @__PURE__ */
|
|
30918
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.text.accent, dimColor: true, children: group })
|
|
30830
30919
|
] }),
|
|
30831
|
-
price && /* @__PURE__ */
|
|
30832
|
-
|
|
30920
|
+
price && /* @__PURE__ */ jsx59(
|
|
30921
|
+
Text57,
|
|
30833
30922
|
{
|
|
30834
30923
|
color: price === "Free" ? theme.status.success : theme.ui.comment,
|
|
30835
30924
|
dimColor: !isActive,
|
|
@@ -30837,29 +30926,29 @@ var ModelDialog = ({
|
|
|
30837
30926
|
}
|
|
30838
30927
|
)
|
|
30839
30928
|
] }),
|
|
30840
|
-
isActive && /* @__PURE__ */
|
|
30841
|
-
/* @__PURE__ */
|
|
30842
|
-
model.contextLength > 0 && /* @__PURE__ */
|
|
30929
|
+
isActive && /* @__PURE__ */ jsxs53(Box49, { paddingLeft: 2, gap: 2, children: [
|
|
30930
|
+
/* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: model.id }),
|
|
30931
|
+
model.contextLength > 0 && /* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: fmtCtx(model.contextLength) })
|
|
30843
30932
|
] })
|
|
30844
30933
|
] }, model.id);
|
|
30845
30934
|
}),
|
|
30846
|
-
canScrollDown && /* @__PURE__ */
|
|
30935
|
+
canScrollDown && /* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: " \u2193" })
|
|
30847
30936
|
] }),
|
|
30848
|
-
loadState === "ready" && /* @__PURE__ */
|
|
30849
|
-
/* @__PURE__ */
|
|
30937
|
+
loadState === "ready" && /* @__PURE__ */ jsxs53(Box49, { marginTop: 1, justifyContent: "space-between", children: [
|
|
30938
|
+
/* @__PURE__ */ jsxs53(Text57, { color: theme.ui.comment, dimColor: true, children: [
|
|
30850
30939
|
selectableCount,
|
|
30851
30940
|
" model",
|
|
30852
30941
|
selectableCount !== 1 ? "s" : "",
|
|
30853
30942
|
search ? ` \xB7 "${search}"` : ""
|
|
30854
30943
|
] }),
|
|
30855
|
-
selectableCount > MAX_VISIBLE && /* @__PURE__ */
|
|
30944
|
+
selectableCount > MAX_VISIBLE && /* @__PURE__ */ jsxs53(Text57, { color: theme.ui.comment, dimColor: true, children: [
|
|
30856
30945
|
clampedIndex + 1,
|
|
30857
30946
|
"/",
|
|
30858
30947
|
selectableCount
|
|
30859
30948
|
] })
|
|
30860
30949
|
] }),
|
|
30861
|
-
/* @__PURE__ */
|
|
30862
|
-
|
|
30950
|
+
/* @__PURE__ */ jsx59(
|
|
30951
|
+
Box49,
|
|
30863
30952
|
{
|
|
30864
30953
|
marginTop: 1,
|
|
30865
30954
|
borderStyle: "single",
|
|
@@ -30868,7 +30957,7 @@ var ModelDialog = ({
|
|
|
30868
30957
|
borderLeft: false,
|
|
30869
30958
|
borderRight: false,
|
|
30870
30959
|
borderColor: theme.ui.comment,
|
|
30871
|
-
children: /* @__PURE__ */
|
|
30960
|
+
children: /* @__PURE__ */ jsx59(Text57, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navegar digitar para buscar Enter usar Esc fechar" })
|
|
30872
30961
|
}
|
|
30873
30962
|
)
|
|
30874
30963
|
]
|
|
@@ -30922,8 +31011,8 @@ var FeedbackDialog = ({ cwd, onClose }) => {
|
|
|
30922
31011
|
[onClose]
|
|
30923
31012
|
);
|
|
30924
31013
|
useKeypress(handleEscape, { isActive: true });
|
|
30925
|
-
return /* @__PURE__ */
|
|
30926
|
-
|
|
31014
|
+
return /* @__PURE__ */ jsxs54(
|
|
31015
|
+
Box50,
|
|
30927
31016
|
{
|
|
30928
31017
|
flexDirection: "column",
|
|
30929
31018
|
borderStyle: "round",
|
|
@@ -30932,9 +31021,9 @@ var FeedbackDialog = ({ cwd, onClose }) => {
|
|
|
30932
31021
|
marginLeft: 2,
|
|
30933
31022
|
marginRight: 2,
|
|
30934
31023
|
children: [
|
|
30935
|
-
/* @__PURE__ */
|
|
30936
|
-
/* @__PURE__ */
|
|
30937
|
-
/* @__PURE__ */
|
|
31024
|
+
/* @__PURE__ */ jsx60(Text58, { bold: true, color: theme.text.accent, children: "How useful was DeepCode in this session?" }),
|
|
31025
|
+
/* @__PURE__ */ jsx60(RadioButtonSelect, { items, onSelect: handleSelect, isFocused: true, showNumbers: false }),
|
|
31026
|
+
/* @__PURE__ */ jsx60(Text58, { color: theme.text.secondary, children: "\u2191\u2193 navigate \xB7 Enter submit \xB7 Esc cancel" })
|
|
30938
31027
|
]
|
|
30939
31028
|
}
|
|
30940
31029
|
);
|
|
@@ -31033,8 +31122,8 @@ var SessionsDialog = ({ cwd, currentSessionId, onSelect, onClose }) => {
|
|
|
31033
31122
|
}, { isActive: true });
|
|
31034
31123
|
const canScrollUp = scrollTop > 0;
|
|
31035
31124
|
const canScrollDown = scrollTop + MAX_VISIBLE2 < sessions.length;
|
|
31036
|
-
return /* @__PURE__ */
|
|
31037
|
-
|
|
31125
|
+
return /* @__PURE__ */ jsxs55(
|
|
31126
|
+
Box51,
|
|
31038
31127
|
{
|
|
31039
31128
|
flexDirection: "column",
|
|
31040
31129
|
borderStyle: "round",
|
|
@@ -31045,34 +31134,34 @@ var SessionsDialog = ({ cwd, currentSessionId, onSelect, onClose }) => {
|
|
|
31045
31134
|
marginRight: 1,
|
|
31046
31135
|
minWidth: 60,
|
|
31047
31136
|
children: [
|
|
31048
|
-
/* @__PURE__ */
|
|
31049
|
-
/* @__PURE__ */
|
|
31050
|
-
/* @__PURE__ */
|
|
31137
|
+
/* @__PURE__ */ jsxs55(Box51, { justifyContent: "space-between", marginBottom: 1, children: [
|
|
31138
|
+
/* @__PURE__ */ jsx61(Text59, { bold: true, color: theme.text.primary, children: "Retomar sess\xE3o" }),
|
|
31139
|
+
/* @__PURE__ */ jsx61(Text59, { color: theme.ui.comment, dimColor: true, children: "esc" })
|
|
31051
31140
|
] }),
|
|
31052
|
-
/* @__PURE__ */
|
|
31053
|
-
|
|
31141
|
+
/* @__PURE__ */ jsxs55(
|
|
31142
|
+
Box51,
|
|
31054
31143
|
{
|
|
31055
31144
|
borderStyle: "single",
|
|
31056
31145
|
borderColor: search ? theme.border.focused : theme.ui.comment,
|
|
31057
31146
|
paddingX: 1,
|
|
31058
31147
|
marginBottom: 1,
|
|
31059
31148
|
children: [
|
|
31060
|
-
/* @__PURE__ */
|
|
31061
|
-
search ? /* @__PURE__ */
|
|
31149
|
+
/* @__PURE__ */ jsx61(Text59, { color: theme.ui.comment, children: "\u2315 " }),
|
|
31150
|
+
search ? /* @__PURE__ */ jsxs55(Text59, { color: theme.text.primary, children: [
|
|
31062
31151
|
search,
|
|
31063
|
-
/* @__PURE__ */
|
|
31064
|
-
] }) : /* @__PURE__ */
|
|
31152
|
+
/* @__PURE__ */ jsx61(Text59, { color: theme.text.accent, children: "\u258C" })
|
|
31153
|
+
] }) : /* @__PURE__ */ jsxs55(Text59, { color: theme.ui.comment, dimColor: true, children: [
|
|
31065
31154
|
"Search",
|
|
31066
|
-
/* @__PURE__ */
|
|
31155
|
+
/* @__PURE__ */ jsx61(Text59, { color: theme.text.accent, children: "\u258C" })
|
|
31067
31156
|
] })
|
|
31068
31157
|
]
|
|
31069
31158
|
}
|
|
31070
31159
|
),
|
|
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__ */
|
|
31160
|
+
loadState === "loading" && /* @__PURE__ */ jsx61(Box51, { marginY: 1, children: /* @__PURE__ */ jsx61(Text59, { color: theme.text.secondary, children: "Carregando sess\xF5es\u2026" }) }),
|
|
31161
|
+
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" }) }),
|
|
31162
|
+
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/" }) }),
|
|
31163
|
+
loadState === "ready" && sessions.length > 0 && /* @__PURE__ */ jsxs55(Box51, { flexDirection: "column", children: [
|
|
31164
|
+
canScrollUp && /* @__PURE__ */ jsx61(Text59, { color: theme.ui.comment, dimColor: true, children: " \u2191" }),
|
|
31076
31165
|
visibleSessions.map((session, visIdx) => {
|
|
31077
31166
|
const globalIdx = scrollTop + visIdx;
|
|
31078
31167
|
const isActive = globalIdx === clampedIndex;
|
|
@@ -31082,11 +31171,11 @@ var SessionsDialog = ({ cwd, currentSessionId, onSelect, onClose }) => {
|
|
|
31082
31171
|
const msgCount = session.messages.length;
|
|
31083
31172
|
const preview = sessionLabel2(session);
|
|
31084
31173
|
const isCurrent = session.id === currentSessionId;
|
|
31085
|
-
return /* @__PURE__ */
|
|
31086
|
-
/* @__PURE__ */
|
|
31087
|
-
/* @__PURE__ */
|
|
31088
|
-
/* @__PURE__ */
|
|
31089
|
-
|
|
31174
|
+
return /* @__PURE__ */ jsxs55(Box51, { flexDirection: "column", children: [
|
|
31175
|
+
/* @__PURE__ */ jsxs55(Box51, { gap: 1, children: [
|
|
31176
|
+
/* @__PURE__ */ jsx61(Text59, { color: isActive ? theme.text.accent : isCurrent ? theme.status.success : theme.ui.comment, children: isCurrent ? "\u25CF" : isActive ? "\u203A" : " " }),
|
|
31177
|
+
/* @__PURE__ */ jsx61(
|
|
31178
|
+
Text59,
|
|
31090
31179
|
{
|
|
31091
31180
|
color: isActive ? theme.text.primary : theme.text.secondary,
|
|
31092
31181
|
bold: isActive,
|
|
@@ -31095,7 +31184,7 @@ var SessionsDialog = ({ cwd, currentSessionId, onSelect, onClose }) => {
|
|
|
31095
31184
|
}
|
|
31096
31185
|
)
|
|
31097
31186
|
] }),
|
|
31098
|
-
isActive && /* @__PURE__ */
|
|
31187
|
+
isActive && /* @__PURE__ */ jsx61(Box51, { paddingLeft: 2, children: /* @__PURE__ */ jsxs55(Text59, { color: theme.ui.comment, dimColor: true, children: [
|
|
31099
31188
|
shortId,
|
|
31100
31189
|
" ",
|
|
31101
31190
|
target,
|
|
@@ -31106,23 +31195,23 @@ var SessionsDialog = ({ cwd, currentSessionId, onSelect, onClose }) => {
|
|
|
31106
31195
|
] }) })
|
|
31107
31196
|
] }, session.id);
|
|
31108
31197
|
}),
|
|
31109
|
-
canScrollDown && /* @__PURE__ */
|
|
31110
|
-
/* @__PURE__ */
|
|
31111
|
-
/* @__PURE__ */
|
|
31198
|
+
canScrollDown && /* @__PURE__ */ jsx61(Text59, { color: theme.ui.comment, dimColor: true, children: " \u2193" }),
|
|
31199
|
+
/* @__PURE__ */ jsxs55(Box51, { marginTop: 1, justifyContent: "space-between", children: [
|
|
31200
|
+
/* @__PURE__ */ jsxs55(Text59, { color: theme.ui.comment, dimColor: true, children: [
|
|
31112
31201
|
sessions.length,
|
|
31113
31202
|
" session",
|
|
31114
31203
|
sessions.length !== 1 ? "s" : "",
|
|
31115
31204
|
search ? ` \xB7 "${search}"` : ""
|
|
31116
31205
|
] }),
|
|
31117
|
-
sessions.length > MAX_VISIBLE2 && /* @__PURE__ */
|
|
31206
|
+
sessions.length > MAX_VISIBLE2 && /* @__PURE__ */ jsxs55(Text59, { color: theme.ui.comment, dimColor: true, children: [
|
|
31118
31207
|
clampedIndex + 1,
|
|
31119
31208
|
"/",
|
|
31120
31209
|
sessions.length
|
|
31121
31210
|
] })
|
|
31122
31211
|
] })
|
|
31123
31212
|
] }),
|
|
31124
|
-
/* @__PURE__ */
|
|
31125
|
-
|
|
31213
|
+
/* @__PURE__ */ jsx61(
|
|
31214
|
+
Box51,
|
|
31126
31215
|
{
|
|
31127
31216
|
marginTop: 1,
|
|
31128
31217
|
borderStyle: "single",
|
|
@@ -31131,7 +31220,7 @@ var SessionsDialog = ({ cwd, currentSessionId, onSelect, onClose }) => {
|
|
|
31131
31220
|
borderLeft: false,
|
|
31132
31221
|
borderRight: false,
|
|
31133
31222
|
borderColor: theme.ui.comment,
|
|
31134
|
-
children: /* @__PURE__ */
|
|
31223
|
+
children: /* @__PURE__ */ jsx61(Text59, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navegar digitar para buscar Enter retomar Esc fechar" })
|
|
31135
31224
|
}
|
|
31136
31225
|
)
|
|
31137
31226
|
]
|
|
@@ -31152,8 +31241,8 @@ var SubagentsPanel = ({ subagents, mainAreaWidth }) => {
|
|
|
31152
31241
|
if (subagents.length === 0) return null;
|
|
31153
31242
|
const running = subagents.filter((s) => s.status === "running").length;
|
|
31154
31243
|
const title = running > 0 ? `Subagents (${running} running)` : `Subagents (${subagents.length} finishing\u2026)`;
|
|
31155
|
-
return /* @__PURE__ */
|
|
31156
|
-
|
|
31244
|
+
return /* @__PURE__ */ jsxs56(
|
|
31245
|
+
Box52,
|
|
31157
31246
|
{
|
|
31158
31247
|
flexDirection: "column",
|
|
31159
31248
|
borderStyle: "round",
|
|
@@ -31163,25 +31252,25 @@ var SubagentsPanel = ({ subagents, mainAreaWidth }) => {
|
|
|
31163
31252
|
marginTop: 1,
|
|
31164
31253
|
width: Math.min(mainAreaWidth, 80),
|
|
31165
31254
|
children: [
|
|
31166
|
-
/* @__PURE__ */
|
|
31167
|
-
subagents.map((entry) => /* @__PURE__ */
|
|
31168
|
-
/* @__PURE__ */
|
|
31169
|
-
/* @__PURE__ */
|
|
31170
|
-
/* @__PURE__ */
|
|
31255
|
+
/* @__PURE__ */ jsx62(Box52, { paddingX: 1, children: /* @__PURE__ */ jsx62(Text60, { bold: true, color: theme.text.accent, children: title }) }),
|
|
31256
|
+
subagents.map((entry) => /* @__PURE__ */ jsxs56(Box52, { flexDirection: "column", paddingX: 1, children: [
|
|
31257
|
+
/* @__PURE__ */ jsxs56(Box52, { flexDirection: "row", gap: 1, children: [
|
|
31258
|
+
/* @__PURE__ */ jsx62(Text60, { color: statusColor(entry), children: statusIcon(entry) }),
|
|
31259
|
+
/* @__PURE__ */ jsxs56(Text60, { wrap: "truncate", color: theme.text.primary, children: [
|
|
31171
31260
|
entry.prompt,
|
|
31172
31261
|
entry.prompt.length >= 50 ? "\u2026" : ""
|
|
31173
31262
|
] })
|
|
31174
31263
|
] }),
|
|
31175
|
-
entry.status === "running" && entry.currentTool && /* @__PURE__ */
|
|
31264
|
+
entry.status === "running" && entry.currentTool && /* @__PURE__ */ jsxs56(Text60, { color: theme.text.secondary, dimColor: true, children: [
|
|
31176
31265
|
" ",
|
|
31177
31266
|
"using ",
|
|
31178
31267
|
entry.currentTool
|
|
31179
31268
|
] }),
|
|
31180
|
-
entry.status === "running" && !entry.currentTool && entry.currentOutput && /* @__PURE__ */
|
|
31269
|
+
entry.status === "running" && !entry.currentTool && entry.currentOutput && /* @__PURE__ */ jsxs56(Text60, { color: theme.text.secondary, dimColor: true, wrap: "truncate", children: [
|
|
31181
31270
|
" ",
|
|
31182
31271
|
entry.currentOutput.trimStart()
|
|
31183
31272
|
] }),
|
|
31184
|
-
entry.status === "failed" && entry.error && /* @__PURE__ */
|
|
31273
|
+
entry.status === "failed" && entry.error && /* @__PURE__ */ jsxs56(Text60, { color: theme.status.error, dimColor: true, wrap: "truncate", children: [
|
|
31185
31274
|
" ",
|
|
31186
31275
|
entry.error.slice(0, 60)
|
|
31187
31276
|
] })
|
|
@@ -31562,6 +31651,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
31562
31651
|
clearCommand,
|
|
31563
31652
|
undoCommand,
|
|
31564
31653
|
compactCommand,
|
|
31654
|
+
vimCommand,
|
|
31565
31655
|
diffCommand,
|
|
31566
31656
|
exportCommand,
|
|
31567
31657
|
contextCommand,
|
|
@@ -33018,10 +33108,10 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33018
33108
|
userMessages
|
|
33019
33109
|
]
|
|
33020
33110
|
);
|
|
33021
|
-
return /* @__PURE__ */
|
|
33022
|
-
/* @__PURE__ */
|
|
33023
|
-
/* @__PURE__ */
|
|
33024
|
-
/* @__PURE__ */
|
|
33111
|
+
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: [
|
|
33112
|
+
/* @__PURE__ */ jsx63(VimToggleRegistrar, { onRegister: registerVimToggle }),
|
|
33113
|
+
/* @__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: [
|
|
33114
|
+
/* @__PURE__ */ jsx63(
|
|
33025
33115
|
AppHeader,
|
|
33026
33116
|
{
|
|
33027
33117
|
version: VERSION,
|
|
@@ -33033,11 +33123,11 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33033
33123
|
sessionName: sessionDisplayName || void 0
|
|
33034
33124
|
}
|
|
33035
33125
|
),
|
|
33036
|
-
initError ? /* @__PURE__ */
|
|
33126
|
+
initError ? /* @__PURE__ */ jsx63(Box53, { marginLeft: 2, marginRight: 2, children: /* @__PURE__ */ jsxs57(Text61, { color: theme.status.error, children: [
|
|
33037
33127
|
"Failed to initialize runtime: ",
|
|
33038
33128
|
initError
|
|
33039
|
-
] }) }) : /* @__PURE__ */
|
|
33040
|
-
/* @__PURE__ */
|
|
33129
|
+
] }) }) : /* @__PURE__ */ jsxs57(Box53, { flexDirection: "column", flexGrow: 1, children: [
|
|
33130
|
+
/* @__PURE__ */ jsx63(
|
|
33041
33131
|
MainContent,
|
|
33042
33132
|
{
|
|
33043
33133
|
history: historyManager.history,
|
|
@@ -33049,11 +33139,11 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33049
33139
|
isFocused: approvalQueue.length === 0
|
|
33050
33140
|
}
|
|
33051
33141
|
),
|
|
33052
|
-
/* @__PURE__ */
|
|
33142
|
+
/* @__PURE__ */ jsx63(ShowMoreLines, { constrainHeight })
|
|
33053
33143
|
] }),
|
|
33054
|
-
approvalQueue.length > 0 && /* @__PURE__ */
|
|
33055
|
-
dialogModel && /* @__PURE__ */
|
|
33056
|
-
activeDialog === "provider" && /* @__PURE__ */
|
|
33144
|
+
approvalQueue.length > 0 && /* @__PURE__ */ jsx63(Box53, { marginLeft: 2, marginRight: 2, marginTop: 1, children: /* @__PURE__ */ jsx63(ApprovalPrompt, { request: approvalQueue[0], queueLength: approvalQueue.length }) }),
|
|
33145
|
+
dialogModel && /* @__PURE__ */ jsx63(CommandDialog, { title: dialogModel.title, lines: dialogModel.lines }),
|
|
33146
|
+
activeDialog === "provider" && /* @__PURE__ */ jsx63(
|
|
33057
33147
|
ProviderDialog,
|
|
33058
33148
|
{
|
|
33059
33149
|
providers: listAvailableProviders(),
|
|
@@ -33068,7 +33158,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33068
33158
|
onClose: closeDialog
|
|
33069
33159
|
}
|
|
33070
33160
|
),
|
|
33071
|
-
activeDialog === "model" && /* @__PURE__ */
|
|
33161
|
+
activeDialog === "model" && /* @__PURE__ */ jsx63(
|
|
33072
33162
|
ModelDialog,
|
|
33073
33163
|
{
|
|
33074
33164
|
currentProvider: getSessionCommandState().provider,
|
|
@@ -33078,7 +33168,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33078
33168
|
onClose: closeDialog
|
|
33079
33169
|
}
|
|
33080
33170
|
),
|
|
33081
|
-
activeDialog === "theme" && /* @__PURE__ */
|
|
33171
|
+
activeDialog === "theme" && /* @__PURE__ */ jsx63(
|
|
33082
33172
|
ThemeDialog,
|
|
33083
33173
|
{
|
|
33084
33174
|
onSelect: handleSelectTheme,
|
|
@@ -33086,7 +33176,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33086
33176
|
onPreview: previewTheme
|
|
33087
33177
|
}
|
|
33088
33178
|
),
|
|
33089
|
-
activeDialog === "permissions" && /* @__PURE__ */
|
|
33179
|
+
activeDialog === "permissions" && /* @__PURE__ */ jsx63(
|
|
33090
33180
|
PermissionsDialog,
|
|
33091
33181
|
{
|
|
33092
33182
|
current: permissionModes,
|
|
@@ -33094,7 +33184,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33094
33184
|
onClose: closeDialog
|
|
33095
33185
|
}
|
|
33096
33186
|
),
|
|
33097
|
-
activeDialog === "auth" && runtimeRef.current && /* @__PURE__ */
|
|
33187
|
+
activeDialog === "auth" && runtimeRef.current && /* @__PURE__ */ jsx63(
|
|
33098
33188
|
AuthDialog,
|
|
33099
33189
|
{
|
|
33100
33190
|
clientId: runtimeRef.current.config.github.oauthClientId,
|
|
@@ -33107,8 +33197,8 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33107
33197
|
onClose: closeDialog
|
|
33108
33198
|
}
|
|
33109
33199
|
),
|
|
33110
|
-
activeDialog === "feedback" && /* @__PURE__ */
|
|
33111
|
-
activeDialog === "sessions" && /* @__PURE__ */
|
|
33200
|
+
activeDialog === "feedback" && /* @__PURE__ */ jsx63(FeedbackDialog, { cwd, onClose: closeDialog }),
|
|
33201
|
+
activeDialog === "sessions" && /* @__PURE__ */ jsx63(
|
|
33112
33202
|
SessionsDialog,
|
|
33113
33203
|
{
|
|
33114
33204
|
cwd,
|
|
@@ -33117,7 +33207,7 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33117
33207
|
onClose: closeDialog
|
|
33118
33208
|
}
|
|
33119
33209
|
),
|
|
33120
|
-
pendingCommandConfirmation && /* @__PURE__ */
|
|
33210
|
+
pendingCommandConfirmation && /* @__PURE__ */ jsx63(
|
|
33121
33211
|
CommandDialog,
|
|
33122
33212
|
{
|
|
33123
33213
|
title: "Confirm action",
|
|
@@ -33129,14 +33219,14 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33129
33219
|
footerText: "Press y or Enter to confirm. Press n or Esc to cancel."
|
|
33130
33220
|
}
|
|
33131
33221
|
),
|
|
33132
|
-
/* @__PURE__ */
|
|
33222
|
+
/* @__PURE__ */ jsx63(
|
|
33133
33223
|
SubagentsPanel,
|
|
33134
33224
|
{
|
|
33135
33225
|
subagents: Array.from(subagentMap.values()),
|
|
33136
33226
|
mainAreaWidth
|
|
33137
33227
|
}
|
|
33138
33228
|
),
|
|
33139
|
-
stickyTodos && /* @__PURE__ */
|
|
33229
|
+
stickyTodos && /* @__PURE__ */ jsx63(
|
|
33140
33230
|
StickyTodoList,
|
|
33141
33231
|
{
|
|
33142
33232
|
todos: stickyTodos,
|
|
@@ -33144,8 +33234,8 @@ var AppContainer = ({ cwd, config, provider, model, resumeSessionId, startupWarn
|
|
|
33144
33234
|
maxVisibleItems: stickyTodoMaxItems
|
|
33145
33235
|
}
|
|
33146
33236
|
),
|
|
33147
|
-
/* @__PURE__ */
|
|
33148
|
-
/* @__PURE__ */
|
|
33237
|
+
/* @__PURE__ */ jsx63(Notifications, {}),
|
|
33238
|
+
/* @__PURE__ */ jsx63(Composer, {})
|
|
33149
33239
|
] }) }) }) }) }) }) })
|
|
33150
33240
|
] }) }) }) }) }) });
|
|
33151
33241
|
};
|
|
@@ -33290,83 +33380,6 @@ function formatAuthSummary(config) {
|
|
|
33290
33380
|
const enterprise = config.enterpriseUrl?.trim() ? `enterprise=${config.enterpriseUrl}` : "enterprise=github.com";
|
|
33291
33381
|
return `github token=${tokenState}, ${oauthState}, ${enterprise}`;
|
|
33292
33382
|
}
|
|
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
33383
|
var DeepCodeConfigAdapter = class {
|
|
33371
33384
|
constructor(cwd) {
|
|
33372
33385
|
this.cwd = cwd;
|
|
@@ -33410,7 +33423,7 @@ var DeepCodeConfigAdapter = class {
|
|
|
33410
33423
|
}
|
|
33411
33424
|
};
|
|
33412
33425
|
function App(props) {
|
|
33413
|
-
return /* @__PURE__ */
|
|
33426
|
+
return /* @__PURE__ */ jsx64(
|
|
33414
33427
|
AppContainer,
|
|
33415
33428
|
{
|
|
33416
33429
|
cwd: props.cwd,
|