@thegitai/cli 1.0.0-preview.66 → 1.0.0-preview.67
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/src/ui/tui/build-frame.js +23 -34
- package/package.json +6 -6
|
@@ -58,7 +58,7 @@ const MODEL_PICKER_PANEL_MAX_WIDTH = 144;
|
|
|
58
58
|
const MODEL_PICKER_PANEL_MARGIN_LINES = 2;
|
|
59
59
|
const MODEL_PICKER_BORDER_COLOR = 'cyan';
|
|
60
60
|
const MODEL_PICKER_ACCENT_COLOR = 'cyan';
|
|
61
|
-
const
|
|
61
|
+
const MODEL_PICKER_LOCKED_COLOR = 'ansi256(247)';
|
|
62
62
|
const MODEL_PICKER_META_INDENT = ' ';
|
|
63
63
|
const COMPOSER_MARKER_PATTERN = /\[Image #\d+\]|\[Pasted Text: [^\]\n]*\]/g;
|
|
64
64
|
function composerMarkerMask(text) {
|
|
@@ -836,12 +836,12 @@ function buildOverlayPanel(rows, width, color, height = Number.POSITIVE_INFINITY
|
|
|
836
836
|
...margin,
|
|
837
837
|
];
|
|
838
838
|
}
|
|
839
|
-
function padSpansToInnerWidth(spans, innerWidth
|
|
839
|
+
function padSpansToInnerWidth(spans, innerWidth) {
|
|
840
840
|
const used = spans.reduce((total, part) => total + displayWidth(part.text), 0);
|
|
841
841
|
const pad = Math.max(0, innerWidth - used);
|
|
842
842
|
if (pad === 0)
|
|
843
843
|
return spans;
|
|
844
|
-
return [...spans, span(' '.repeat(pad)
|
|
844
|
+
return [...spans, span(' '.repeat(pad))];
|
|
845
845
|
}
|
|
846
846
|
function modelPickerPanelSideLine(content, innerWidth) {
|
|
847
847
|
return overlayPanelLine(content, innerWidth, MODEL_PICKER_BORDER_COLOR);
|
|
@@ -882,7 +882,7 @@ function modelPickerNotesWidth(innerWidth) {
|
|
|
882
882
|
MODEL_PICKER_COST_WIDTH -
|
|
883
883
|
MODEL_PICKER_COLUMN_GAP.length * 2);
|
|
884
884
|
}
|
|
885
|
-
function modelPickerModelSpans(option, selected, effort, width, showCurrentTag, labelStyle
|
|
885
|
+
function modelPickerModelSpans(option, selected, effort, width, showCurrentTag, labelStyle) {
|
|
886
886
|
const tag = option.current && showCurrentTag ? ' (current)' : '';
|
|
887
887
|
const effortText = option.group === 'auto' || effort === 'default'
|
|
888
888
|
? ''
|
|
@@ -890,45 +890,39 @@ function modelPickerModelSpans(option, selected, effort, width, showCurrentTag,
|
|
|
890
890
|
const nameWidth = Math.max(1, width - displayWidth(tag + effortText) - 2);
|
|
891
891
|
const label = `${selected ? '▶ ' : ' '}${fitModelLabel(option.label, nameWidth)}`;
|
|
892
892
|
const used = displayWidth(label + effortText + tag);
|
|
893
|
+
const locked = option.disabled ? { color: MODEL_PICKER_LOCKED_COLOR } : null;
|
|
893
894
|
return [
|
|
894
|
-
span(label,
|
|
895
|
-
span(effortText, { color: mutedColor(), bold: selected
|
|
896
|
-
span(tag, { color: 'gray'
|
|
897
|
-
span(' '.repeat(Math.max(0, width - used))
|
|
895
|
+
span(label, labelStyle),
|
|
896
|
+
span(effortText, locked ?? { color: mutedColor(), bold: selected }),
|
|
897
|
+
span(tag, locked ?? { color: 'gray' }),
|
|
898
|
+
span(' '.repeat(Math.max(0, width - used))),
|
|
898
899
|
];
|
|
899
900
|
}
|
|
900
901
|
function modelPickerItemLines(option, selected, effort, innerWidth) {
|
|
901
|
-
const
|
|
902
|
-
const labelStyle =
|
|
903
|
-
? { color: 'ansi256(247)' }
|
|
904
|
-
: selected
|
|
905
|
-
? { color: 'cyan', bold: true }
|
|
906
|
-
: {};
|
|
902
|
+
const lockedStyle = option.disabled ? { color: MODEL_PICKER_LOCKED_COLOR } : undefined;
|
|
903
|
+
const labelStyle = lockedStyle ?? (selected ? { color: 'cyan', bold: true } : {});
|
|
907
904
|
const cost = modelPickerCostText(option.costRating);
|
|
908
905
|
if (innerWidth < MODEL_PICKER_WIDE_MIN_WIDTH) {
|
|
909
906
|
const costWidth = 3;
|
|
910
907
|
const modelWidth = Math.max(12, innerWidth - costWidth - 2);
|
|
911
908
|
const row = [
|
|
912
|
-
...modelPickerModelSpans(option, selected, effort, modelWidth, false, labelStyle
|
|
913
|
-
span(' '
|
|
914
|
-
modelPickerCell(cost, costWidth,
|
|
909
|
+
...modelPickerModelSpans(option, selected, effort, modelWidth, false, labelStyle),
|
|
910
|
+
span(' '),
|
|
911
|
+
modelPickerCell(cost, costWidth, lockedStyle),
|
|
915
912
|
];
|
|
916
913
|
return [
|
|
917
|
-
modelPickerPanelSideLine(line(...padSpansToInnerWidth(row, innerWidth
|
|
914
|
+
modelPickerPanelSideLine(line(...padSpansToInnerWidth(row, innerWidth)), innerWidth),
|
|
918
915
|
];
|
|
919
916
|
}
|
|
920
917
|
const row = [
|
|
921
|
-
...modelPickerModelSpans(option, selected, effort, modelPickerModelWidth(innerWidth), true, labelStyle
|
|
922
|
-
span(MODEL_PICKER_COLUMN_GAP
|
|
923
|
-
modelPickerCell(cost, MODEL_PICKER_COST_WIDTH,
|
|
924
|
-
span(MODEL_PICKER_COLUMN_GAP
|
|
925
|
-
modelPickerCell(option.note, modelPickerNotesWidth(innerWidth), {
|
|
926
|
-
color: 'gray',
|
|
927
|
-
...selectedStyle,
|
|
928
|
-
}),
|
|
918
|
+
...modelPickerModelSpans(option, selected, effort, modelPickerModelWidth(innerWidth), true, labelStyle),
|
|
919
|
+
span(MODEL_PICKER_COLUMN_GAP),
|
|
920
|
+
modelPickerCell(cost, MODEL_PICKER_COST_WIDTH, lockedStyle),
|
|
921
|
+
span(MODEL_PICKER_COLUMN_GAP),
|
|
922
|
+
modelPickerCell(option.note, modelPickerNotesWidth(innerWidth), lockedStyle ?? { color: 'gray' }),
|
|
929
923
|
];
|
|
930
924
|
return [
|
|
931
|
-
modelPickerPanelSideLine(line(...padSpansToInnerWidth(row, innerWidth
|
|
925
|
+
modelPickerPanelSideLine(line(...padSpansToInnerWidth(row, innerWidth)), innerWidth),
|
|
932
926
|
];
|
|
933
927
|
}
|
|
934
928
|
function modelPickerHeadingLine(title, innerWidth, withColumns) {
|
|
@@ -1094,31 +1088,26 @@ function commandPaletteSeparatorLine(innerWidth) {
|
|
|
1094
1088
|
return modelPickerPanelSideLine(line(span('┈'.repeat(Math.max(1, innerWidth)), { color: 'gray', dim: true })), innerWidth);
|
|
1095
1089
|
}
|
|
1096
1090
|
function commandPaletteItemLines(option, selected, innerWidth) {
|
|
1097
|
-
const highlight = { bgColor: MODEL_PICKER_HIGHLIGHT_BG };
|
|
1098
1091
|
if (selected) {
|
|
1099
1092
|
const titleSpans = padSpansToInnerWidth([
|
|
1100
1093
|
span('▌', {
|
|
1101
1094
|
color: MODEL_PICKER_ACCENT_COLOR,
|
|
1102
1095
|
bold: true,
|
|
1103
|
-
...highlight,
|
|
1104
1096
|
}),
|
|
1105
1097
|
span('▶ ', {
|
|
1106
1098
|
color: MODEL_PICKER_ACCENT_COLOR,
|
|
1107
1099
|
bold: true,
|
|
1108
|
-
...highlight,
|
|
1109
1100
|
}),
|
|
1110
1101
|
span(option.command, {
|
|
1111
1102
|
color: MODEL_PICKER_ACCENT_COLOR,
|
|
1112
1103
|
bold: true,
|
|
1113
|
-
...highlight,
|
|
1114
1104
|
}),
|
|
1115
|
-
], innerWidth
|
|
1105
|
+
], innerWidth);
|
|
1116
1106
|
const metaSpans = padSpansToInnerWidth([
|
|
1117
1107
|
span(`${MODEL_PICKER_META_INDENT}${option.description}`, {
|
|
1118
1108
|
color: 'gray',
|
|
1119
|
-
...highlight,
|
|
1120
1109
|
}),
|
|
1121
|
-
], innerWidth
|
|
1110
|
+
], innerWidth);
|
|
1122
1111
|
return [
|
|
1123
1112
|
modelPickerPanelSideLine(line(...titleSpans), innerWidth),
|
|
1124
1113
|
modelPickerPanelSideLine(line(...metaSpans), innerWidth),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thegitai/cli",
|
|
3
|
-
"version": "1.0.0-preview.
|
|
3
|
+
"version": "1.0.0-preview.67",
|
|
4
4
|
"description": "TheGitAI is an agentic AI coding tool for your terminal. It reads and searches your repository, writes and edits files, runs your tests, and verifies the change before handing it back.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentic-ai",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"@lydell/node-pty-linux-x64": "1.1.0",
|
|
46
46
|
"@lydell/node-pty-win32-arm64": "1.1.0",
|
|
47
47
|
"@lydell/node-pty-win32-x64": "1.1.0",
|
|
48
|
-
"@thegitai/tui-darwin-arm64": "1.0.0-preview.
|
|
49
|
-
"@thegitai/tui-darwin-x64": "1.0.0-preview.
|
|
50
|
-
"@thegitai/tui-linux-arm64": "1.0.0-preview.
|
|
51
|
-
"@thegitai/tui-linux-x64": "1.0.0-preview.
|
|
52
|
-
"@thegitai/tui-win32-x64": "1.0.0-preview.
|
|
48
|
+
"@thegitai/tui-darwin-arm64": "1.0.0-preview.67",
|
|
49
|
+
"@thegitai/tui-darwin-x64": "1.0.0-preview.67",
|
|
50
|
+
"@thegitai/tui-linux-arm64": "1.0.0-preview.67",
|
|
51
|
+
"@thegitai/tui-linux-x64": "1.0.0-preview.67",
|
|
52
|
+
"@thegitai/tui-win32-x64": "1.0.0-preview.67",
|
|
53
53
|
"@vscode/ripgrep": "1.18.0"
|
|
54
54
|
},
|
|
55
55
|
"repository": {
|