@golba98/codexa 1.0.3 → 1.0.4
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/README.md +17 -18
- package/bin/codexa.js +62 -144
- package/package.json +4 -3
- package/src/app.tsx +533 -275
- package/src/commands/handler.ts +2 -2
- package/src/config/buildInfo.ts +2 -2
- package/src/config/layeredConfig.ts +1 -1
- package/src/config/runtimeConfig.ts +1 -1
- package/src/config/settings.ts +1 -1
- package/src/config/trustStore.ts +1 -1
- package/src/core/README.md +52 -0
- package/src/core/agent/loop.ts +282 -0
- package/src/core/agent/protocol.ts +211 -0
- package/src/core/agent/tools.ts +414 -0
- package/src/core/{codexExecArgs.ts → codex/codexExecArgs.ts} +2 -2
- package/src/core/{codexLaunch.ts → codex/codexLaunch.ts} +3 -3
- package/src/core/{codexPrompt.ts → codex/codexPrompt.ts} +3 -3
- package/src/core/debug/modelStateDebug.ts +34 -0
- package/src/core/executables/antigravityExecutable.ts +48 -0
- package/src/core/executables/executableResolver.ts +5 -1
- package/src/core/perf/renderDebug.ts +10 -6
- package/src/core/providerLauncher/registry.ts +30 -14
- package/src/core/providerLauncher/types.ts +11 -9
- package/src/core/providerLauncher/workspaceConfig.ts +41 -26
- package/src/core/providerRuntime/anthropic.ts +7 -1
- package/src/core/providerRuntime/antigravity.ts +305 -0
- package/src/core/providerRuntime/claudeCodeDiscovery.ts +268 -22
- package/src/core/providerRuntime/claudeCodeDiscoveryDebug.ts +55 -0
- package/src/core/providerRuntime/contextMetadata.ts +12 -24
- package/src/core/providerRuntime/local.ts +129 -51
- package/src/core/providerRuntime/models.ts +22 -11
- package/src/core/providerRuntime/registry.ts +58 -31
- package/src/core/providerRuntime/types.ts +19 -14
- package/src/core/providers/codexSubprocess.ts +2 -2
- package/src/core/providers/types.ts +1 -1
- package/src/core/{attachments.ts → shared/attachments.ts} +27 -4
- package/src/core/{cleanupFastFail.ts → shared/cleanupFastFail.ts} +1 -1
- package/src/core/{hollowResponseFormat.ts → shared/hollowResponseFormat.ts} +1 -1
- package/src/core/terminal/clearFrameBoundary.ts +814 -0
- package/src/core/terminal/frameLock.ts +109 -0
- package/src/core/terminal/inkRenderReset.ts +123 -0
- package/src/core/terminal/terminalControl.ts +22 -0
- package/src/core/terminal/terminalTitle.ts +16 -102
- package/src/core/{channel.ts → version/channel.ts} +1 -1
- package/src/core/{updateCheck.ts → version/updateCheck.ts} +10 -5
- package/src/core/{launchContext.ts → workspace/launchContext.ts} +9 -16
- package/src/core/{planStorage.ts → workspace/planStorage.ts} +2 -2
- package/src/core/{workspaceGuard.ts → workspace/workspaceGuard.ts} +97 -13
- package/src/headless/execRunner.ts +2 -2
- package/src/index.tsx +43 -89
- package/src/session/appSession.ts +10 -7
- package/src/session/chatLifecycle.ts +1 -1
- package/src/session/liveRenderScheduler.ts +1 -1
- package/src/session/types.ts +1 -1
- package/src/ui/AppShell.tsx +672 -706
- package/src/ui/AttachmentImportPanel.tsx +2 -2
- package/src/ui/BottomComposer.tsx +145 -144
- package/src/ui/ModelPickerScreen.tsx +216 -36
- package/src/ui/ModelReasoningPicker.tsx +1 -1
- package/src/ui/PlanReviewPanel.tsx +1 -1
- package/src/ui/ProviderPicker.tsx +735 -321
- package/src/ui/RuntimeStatusBar.tsx +108 -0
- package/src/ui/SelectionPanel.tsx +4 -0
- package/src/ui/SettingsPanel.tsx +1 -1
- package/src/ui/TextEntryPanel.tsx +1 -1
- package/src/ui/Timeline.tsx +1619 -1470
- package/src/ui/TopHeader.tsx +46 -30
- package/src/ui/TranscriptShell.tsx +322 -0
- package/src/ui/TurnGroup.tsx +2 -2
- package/src/ui/UpdateAvailableCard.tsx +3 -3
- package/src/ui/UpdatePromptPanel.tsx +16 -22
- package/src/ui/layout.ts +298 -24
- package/src/ui/layoutListWindow.ts +145 -0
- package/src/ui/logoVariants.ts +4 -8
- package/src/ui/runtimeDisplay.ts +15 -3
- package/src/ui/textLayout.ts +15 -4
- package/src/ui/timelineMeasure.ts +194 -122
- package/src/core/codex.ts +0 -124
- package/src/ui/StaticTranscriptItem.tsx +0 -56
- /package/src/core/{inputDebug.ts → debug/inputDebug.ts} +0 -0
- /package/src/core/{clipboard.ts → shared/clipboard.ts} +0 -0
- /package/src/core/{githubDiagnostics.ts → shared/githubDiagnostics.ts} +0 -0
- /package/src/core/{projectInstructions.ts → workspace/projectInstructions.ts} +0 -0
- /package/src/core/{workspaceActivity.ts → workspace/workspaceActivity.ts} +0 -0
- /package/src/core/{workspaceRoot.ts → workspace/workspaceRoot.ts} +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { useTheme } from "./theme.js";
|
|
4
|
+
import type { Layout } from "./layout.js";
|
|
5
|
+
import * as renderDebug from "../core/perf/renderDebug.js";
|
|
6
|
+
|
|
7
|
+
export type RuntimeAvailability = "available" | "checking" | "reconnecting" | "unavailable" | "unknown";
|
|
8
|
+
|
|
9
|
+
export interface RuntimeStatusBarProps {
|
|
10
|
+
layout: Layout;
|
|
11
|
+
modelDisplay: string;
|
|
12
|
+
contextDisplay?: string;
|
|
13
|
+
availability?: RuntimeAvailability;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function measureRuntimeStatusBarRows(): number {
|
|
17
|
+
return 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function getAvailabilityLabel(availability: RuntimeAvailability | undefined): string | null {
|
|
21
|
+
if (availability === "checking") return "checking";
|
|
22
|
+
if (availability === "reconnecting") return "reconnecting";
|
|
23
|
+
if (availability === "unavailable") return "unavailable";
|
|
24
|
+
if (availability === "unknown") return "Unknown";
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function renderRuntimeDisplay(displayStr: string, theme: ReturnType<typeof useTheme>) {
|
|
29
|
+
const safeDisplay = displayStr.trim() || "Local / Detecting...";
|
|
30
|
+
const slashIndex = safeDisplay.indexOf("/");
|
|
31
|
+
if (slashIndex === -1) {
|
|
32
|
+
return <Text color={theme.model} wrap="truncate">{safeDisplay}</Text>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const providerPart = safeDisplay.substring(0, slashIndex).trim() || "Local";
|
|
36
|
+
const remaining = safeDisplay.substring(slashIndex + 1).trim() || "Detecting...";
|
|
37
|
+
const parenIndex = remaining.indexOf("(");
|
|
38
|
+
|
|
39
|
+
if (parenIndex === -1) {
|
|
40
|
+
return (
|
|
41
|
+
<Box flexDirection="row" overflow="hidden">
|
|
42
|
+
<Text color={theme.provider}>{providerPart}</Text>
|
|
43
|
+
<Text color={theme.textMuted}>{" / "}</Text>
|
|
44
|
+
<Text color={theme.model}>{remaining}</Text>
|
|
45
|
+
</Box>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const modelPart = remaining.substring(0, parenIndex).trim();
|
|
50
|
+
let reasoningPart = remaining.substring(parenIndex + 1).trim();
|
|
51
|
+
if (reasoningPart.endsWith(")")) {
|
|
52
|
+
reasoningPart = reasoningPart.substring(0, reasoningPart.length - 1).trim();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<Box flexDirection="row" overflow="hidden">
|
|
57
|
+
<Text color={theme.provider}>{providerPart}</Text>
|
|
58
|
+
<Text color={theme.textMuted}>{" / "}</Text>
|
|
59
|
+
<Text color={theme.model}>{modelPart}</Text>
|
|
60
|
+
<Text color={theme.textMuted}>{" ("}</Text>
|
|
61
|
+
<Text color={theme.accentMuted}>{reasoningPart}</Text>
|
|
62
|
+
<Text color={theme.textMuted}>{")"}</Text>
|
|
63
|
+
</Box>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function RuntimeStatusBar({
|
|
68
|
+
layout,
|
|
69
|
+
modelDisplay,
|
|
70
|
+
contextDisplay,
|
|
71
|
+
availability = "available",
|
|
72
|
+
}: RuntimeStatusBarProps) {
|
|
73
|
+
const theme = useTheme();
|
|
74
|
+
const availabilityLabel = getAvailabilityLabel(availability);
|
|
75
|
+
const safeModelDisplay = modelDisplay.trim() || "Local / Detecting...";
|
|
76
|
+
const safeContextDisplay = contextDisplay?.trim() || "Unknown";
|
|
77
|
+
renderDebug.useRenderDebug("RuntimeStatusBar", {
|
|
78
|
+
modelDisplay: safeModelDisplay,
|
|
79
|
+
contextDisplay: safeContextDisplay,
|
|
80
|
+
availability,
|
|
81
|
+
cols: layout.cols,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<Box
|
|
86
|
+
height={measureRuntimeStatusBarRows()}
|
|
87
|
+
width="100%"
|
|
88
|
+
paddingLeft={1}
|
|
89
|
+
paddingRight={1}
|
|
90
|
+
justifyContent="space-between"
|
|
91
|
+
overflow="hidden"
|
|
92
|
+
>
|
|
93
|
+
<Box flexGrow={1} flexShrink={1} overflow="hidden" flexDirection="row">
|
|
94
|
+
{renderRuntimeDisplay(safeModelDisplay, theme)}
|
|
95
|
+
{availabilityLabel && (
|
|
96
|
+
<>
|
|
97
|
+
<Text color={theme.textMuted}>{" · "}</Text>
|
|
98
|
+
<Text color={availability === "unavailable" ? theme.warning : theme.info}>{availabilityLabel}</Text>
|
|
99
|
+
</>
|
|
100
|
+
)}
|
|
101
|
+
</Box>
|
|
102
|
+
<Box flexShrink={0}>
|
|
103
|
+
<Text color={theme.textMuted}>{layout.cols >= 48 ? "Context: " : "Ctx: "}</Text>
|
|
104
|
+
<Text color={safeContextDisplay === "Unknown" ? theme.textDim : theme.context}>{safeContextDisplay}</Text>
|
|
105
|
+
</Box>
|
|
106
|
+
</Box>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -53,6 +53,7 @@ export function SelectionPanel({
|
|
|
53
53
|
paddingY={1}
|
|
54
54
|
marginTop={1}
|
|
55
55
|
width="100%"
|
|
56
|
+
flexDirection="column"
|
|
56
57
|
>
|
|
57
58
|
<SelectInput
|
|
58
59
|
items={items}
|
|
@@ -61,6 +62,9 @@ export function SelectionPanel({
|
|
|
61
62
|
onSelect={(item) => onSelect(item.value)}
|
|
62
63
|
onHighlight={(item) => onHighlight?.(item.value)}
|
|
63
64
|
/>
|
|
65
|
+
<Box marginTop={1}>
|
|
66
|
+
<Text color={theme.textDim}>Esc to close · Enter to confirm</Text>
|
|
67
|
+
</Box>
|
|
64
68
|
</Box>
|
|
65
69
|
</Box>
|
|
66
70
|
);
|
package/src/ui/SettingsPanel.tsx
CHANGED
|
@@ -39,7 +39,7 @@ export function SettingsPanel<TKey extends string>({
|
|
|
39
39
|
|
|
40
40
|
const activeSetting = settings[selectedIndex] ?? settings[0];
|
|
41
41
|
const subtitle = useMemo(() => {
|
|
42
|
-
const instructions = "↑↓ setting ←→ option Enter
|
|
42
|
+
const instructions = "↑↓ setting ←→ option Esc to close · Enter to confirm";
|
|
43
43
|
if (!activeSetting?.description) {
|
|
44
44
|
return instructions;
|
|
45
45
|
}
|
|
@@ -27,7 +27,7 @@ export function TextEntryPanel({
|
|
|
27
27
|
placeholder = "",
|
|
28
28
|
initialValue = "",
|
|
29
29
|
inputLabel = "Input",
|
|
30
|
-
footerHint = "Enter
|
|
30
|
+
footerHint = "Esc to close · Enter to confirm",
|
|
31
31
|
onSubmit,
|
|
32
32
|
onCancel,
|
|
33
33
|
}: TextEntryPanelProps) {
|