@staticpayload/zai-code 1.0.1 → 1.1.0
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/cli.js +5 -29
- package/dist/cli.js.map +1 -1
- package/dist/commands.js +5 -5
- package/dist/commands.js.map +1 -1
- package/dist/interactive.d.ts +2 -1
- package/dist/interactive.d.ts.map +1 -1
- package/dist/interactive.js +334 -67
- package/dist/interactive.js.map +1 -1
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +35 -57
- package/dist/orchestrator.js.map +1 -1
- package/dist/tui/App.d.ts +11 -0
- package/dist/tui/App.d.ts.map +1 -0
- package/dist/tui/App.js +159 -0
- package/dist/tui/App.js.map +1 -0
- package/dist/tui/CommandPalette.d.ts +17 -0
- package/dist/tui/CommandPalette.d.ts.map +1 -0
- package/dist/tui/CommandPalette.js +50 -0
- package/dist/tui/CommandPalette.js.map +1 -0
- package/dist/tui/Header.d.ts +8 -0
- package/dist/tui/Header.d.ts.map +1 -0
- package/dist/tui/Header.js +33 -0
- package/dist/tui/Header.js.map +1 -0
- package/dist/tui/InputBox.d.ts +13 -0
- package/dist/tui/InputBox.d.ts.map +1 -0
- package/dist/tui/InputBox.js +42 -0
- package/dist/tui/InputBox.js.map +1 -0
- package/dist/tui/OutputArea.d.ts +13 -0
- package/dist/tui/OutputArea.d.ts.map +1 -0
- package/dist/tui/OutputArea.js +26 -0
- package/dist/tui/OutputArea.js.map +1 -0
- package/dist/tui/entry.d.ts +2 -0
- package/dist/tui/entry.d.ts.map +1 -0
- package/dist/tui/entry.js +84 -0
- package/dist/tui/entry.js.map +1 -0
- package/dist/tui/index.d.ts +6 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +14 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/ui.d.ts +5 -3
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +78 -54
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutputArea.d.ts","sourceRoot":"","sources":["../../src/tui/OutputArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,CAAC;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,eAAe;IACrB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAiChD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.OutputArea = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const ink_1 = require("ink");
|
|
9
|
+
const OutputArea = ({ lines, maxLines = 20 }) => {
|
|
10
|
+
const visibleLines = lines.slice(-maxLines);
|
|
11
|
+
const getColor = (type) => {
|
|
12
|
+
switch (type) {
|
|
13
|
+
case 'success': return 'green';
|
|
14
|
+
case 'error': return 'red';
|
|
15
|
+
case 'info': return 'cyan';
|
|
16
|
+
default: return undefined;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return (react_1.default.createElement(ink_1.Box, { flexDirection: "column", flexGrow: 1, paddingX: 1, overflow: "hidden" }, visibleLines.length === 0 ? (react_1.default.createElement(ink_1.Text, { dimColor: true }, "Type / for commands, or enter a task")) : (visibleLines.map((line, i) => (react_1.default.createElement(ink_1.Box, { key: i },
|
|
20
|
+
line.type === 'success' && react_1.default.createElement(ink_1.Text, { color: "green" }, "\u2713 "),
|
|
21
|
+
line.type === 'error' && react_1.default.createElement(ink_1.Text, { color: "red" }, "\u2717 "),
|
|
22
|
+
line.type === 'info' && react_1.default.createElement(ink_1.Text, { color: "cyan" }, "\u2192 "),
|
|
23
|
+
react_1.default.createElement(ink_1.Text, { color: getColor(line.type), dimColor: line.type === 'dim' }, line.text)))))));
|
|
24
|
+
};
|
|
25
|
+
exports.OutputArea = OutputArea;
|
|
26
|
+
//# sourceMappingURL=OutputArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutputArea.js","sourceRoot":"","sources":["../../src/tui/OutputArea.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,6BAAgC;AAazB,MAAM,UAAU,GAA8B,CAAC,EAAE,KAAK,EAAE,QAAQ,GAAG,EAAE,EAAE,EAAE,EAAE;IAC9E,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC;IAE5C,MAAM,QAAQ,GAAG,CAAC,IAAwB,EAAsB,EAAE;QAC9D,QAAQ,IAAI,EAAE,CAAC;YACX,KAAK,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC;YAC/B,KAAK,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC;YAC3B,KAAK,MAAM,CAAC,CAAC,OAAO,MAAM,CAAC;YAC3B,OAAO,CAAC,CAAC,OAAO,SAAS,CAAC;QAC9B,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACH,8BAAC,SAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAC,QAAQ,IAClE,YAAY,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACzB,8BAAC,UAAI,IAAC,QAAQ,iDAA4C,CAC7D,CAAC,CAAC,CAAC,CACA,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1B,8BAAC,SAAG,IAAC,GAAG,EAAE,CAAC;QACN,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,8BAAC,UAAI,IAAC,KAAK,EAAC,OAAO,cAAU;QACxD,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,8BAAC,UAAI,IAAC,KAAK,EAAC,KAAK,cAAU;QACpD,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,8BAAC,UAAI,IAAC,KAAK,EAAC,MAAM,cAAU;QACrD,8BAAC,UAAI,IACD,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAC1B,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,KAAK,IAE5B,IAAI,CAAC,IAAI,CACP,CACL,CACT,CAAC,CACL,CACC,CACT,CAAC;AACN,CAAC,CAAC;AAjCW,QAAA,UAAU,cAiCrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../../src/tui/entry.tsx"],"names":[],"mappings":"AAyCA,wBAAsB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAuB9C"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.startTUI = startTUI;
|
|
40
|
+
const react_1 = __importDefault(require("react"));
|
|
41
|
+
const ink_1 = require("ink");
|
|
42
|
+
const App_1 = require("./App");
|
|
43
|
+
const orchestrator_1 = require("../orchestrator");
|
|
44
|
+
const session_1 = require("../session");
|
|
45
|
+
const workspace_model_1 = require("../workspace_model");
|
|
46
|
+
const auth_1 = require("../auth");
|
|
47
|
+
const path = __importStar(require("path"));
|
|
48
|
+
// Capture console.log output for TUI
|
|
49
|
+
let pendingOutput = [];
|
|
50
|
+
const originalLog = console.log;
|
|
51
|
+
function captureLog(type) {
|
|
52
|
+
return (...args) => {
|
|
53
|
+
const text = args.map(a => String(a)).join(' ');
|
|
54
|
+
pendingOutput.push({ type, text });
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
// Process input and return output lines
|
|
58
|
+
async function processInput(input) {
|
|
59
|
+
pendingOutput = [];
|
|
60
|
+
// Temporarily override console.log
|
|
61
|
+
console.log = captureLog('plain');
|
|
62
|
+
try {
|
|
63
|
+
await (0, orchestrator_1.orchestrate)(input);
|
|
64
|
+
}
|
|
65
|
+
catch (e) {
|
|
66
|
+
pendingOutput.push({ type: 'error', text: String(e) });
|
|
67
|
+
}
|
|
68
|
+
// Restore console.log
|
|
69
|
+
console.log = originalLog;
|
|
70
|
+
return pendingOutput;
|
|
71
|
+
}
|
|
72
|
+
async function startTUI() {
|
|
73
|
+
await (0, auth_1.ensureAuthenticated)();
|
|
74
|
+
const session = (0, session_1.getSession)();
|
|
75
|
+
const ws = (0, workspace_model_1.getWorkspace)(session.workingDirectory);
|
|
76
|
+
// Restore session
|
|
77
|
+
ws.restoreState();
|
|
78
|
+
const projectName = path.basename(session.workingDirectory);
|
|
79
|
+
const { waitUntilExit } = (0, ink_1.render)(react_1.default.createElement(App_1.App, { projectName: projectName, workingDirectory: session.workingDirectory, onCommand: processInput, onExit: () => {
|
|
80
|
+
ws.saveState();
|
|
81
|
+
} }));
|
|
82
|
+
await waitUntilExit();
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../src/tui/entry.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,4BAuBC;AAhED,kDAA0B;AAC1B,6BAA6B;AAC7B,+BAA4B;AAG5B,kDAA8C;AAC9C,wCAAkE;AAClE,wDAAkD;AAClD,kCAA8C;AAC9C,2CAA6B;AAE7B,qCAAqC;AACrC,IAAI,aAAa,GAAiB,EAAE,CAAC;AACrC,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC;AAEhC,SAAS,UAAU,CAAC,IA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C1C,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,GAAG,EAAE;YACT,EAAE,CAAC,SAAS,EAAE,CAAC;QACnB,CAAC,GACH,CACL,CAAC;IAEF,MAAM,aAAa,EAAE,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tui/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommandPalette = exports.InputBox = exports.OutputArea = exports.Header = exports.App = void 0;
|
|
4
|
+
var App_1 = require("./App");
|
|
5
|
+
Object.defineProperty(exports, "App", { enumerable: true, get: function () { return App_1.App; } });
|
|
6
|
+
var Header_1 = require("./Header");
|
|
7
|
+
Object.defineProperty(exports, "Header", { enumerable: true, get: function () { return Header_1.Header; } });
|
|
8
|
+
var OutputArea_1 = require("./OutputArea");
|
|
9
|
+
Object.defineProperty(exports, "OutputArea", { enumerable: true, get: function () { return OutputArea_1.OutputArea; } });
|
|
10
|
+
var InputBox_1 = require("./InputBox");
|
|
11
|
+
Object.defineProperty(exports, "InputBox", { enumerable: true, get: function () { return InputBox_1.InputBox; } });
|
|
12
|
+
var CommandPalette_1 = require("./CommandPalette");
|
|
13
|
+
Object.defineProperty(exports, "CommandPalette", { enumerable: true, get: function () { return CommandPalette_1.CommandPalette; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tui/index.tsx"],"names":[],"mappings":";;;AAAA,6BAA4B;AAAnB,0FAAA,GAAG,OAAA;AACZ,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,2CAAsD;AAA7C,wGAAA,UAAU,OAAA;AACnB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA"}
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { SessionState } from './session';
|
|
2
|
-
declare const ASCII_LOGO = "\
|
|
2
|
+
declare const ASCII_LOGO = "zai\u00B7code";
|
|
3
3
|
export declare function renderStartup(projectName: string): string;
|
|
4
4
|
export declare function getPrompt(session: SessionState): string;
|
|
5
|
-
export declare function renderStatus(session: SessionState): string;
|
|
6
5
|
export declare function renderStatusBar(session: SessionState): string;
|
|
6
|
+
export declare function renderStatus(session: SessionState): string;
|
|
7
7
|
export declare function getWarnings(session: SessionState): string[];
|
|
8
8
|
export declare function success(msg: string): string;
|
|
9
9
|
export declare function warning(msg: string): string;
|
|
10
10
|
export declare function error(msg: string): string;
|
|
11
11
|
export declare function dim(msg: string): string;
|
|
12
12
|
export declare function info(msg: string): string;
|
|
13
|
-
export declare function hint(
|
|
13
|
+
export declare function hint(action: string): string;
|
|
14
|
+
export declare function header(title: string): string;
|
|
15
|
+
export declare function box(content: string[], title?: string): string;
|
|
14
16
|
export { ASCII_LOGO };
|
|
15
17
|
//# sourceMappingURL=ui.d.ts.map
|
package/dist/ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAuBzC,QAAA,MAAM,UAAU,kBAAa,CAAC;AAG9B,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA0BzD;AAuBD,wBAAgB,SAAS,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAsBvD;AAGD,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAe7D;AAGD,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAI1D;AAGD,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,EAAE,CAoB3D;AAGD,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG3C;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG3C;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGzC;AAED,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGvC;AAED,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGxC;AAGD,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAG3C;AAGD,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAG5C;AAGD,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAc7D;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/ui.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ASCII_LOGO = void 0;
|
|
4
4
|
exports.renderStartup = renderStartup;
|
|
5
5
|
exports.getPrompt = getPrompt;
|
|
6
|
-
exports.renderStatus = renderStatus;
|
|
7
6
|
exports.renderStatusBar = renderStatusBar;
|
|
7
|
+
exports.renderStatus = renderStatus;
|
|
8
8
|
exports.getWarnings = getWarnings;
|
|
9
9
|
exports.success = success;
|
|
10
10
|
exports.warning = warning;
|
|
@@ -12,6 +12,8 @@ exports.error = error;
|
|
|
12
12
|
exports.dim = dim;
|
|
13
13
|
exports.info = info;
|
|
14
14
|
exports.hint = hint;
|
|
15
|
+
exports.header = header;
|
|
16
|
+
exports.box = box;
|
|
15
17
|
const settings_1 = require("./settings");
|
|
16
18
|
const git_1 = require("./git");
|
|
17
19
|
const profiles_1 = require("./profiles");
|
|
@@ -26,89 +28,96 @@ function getColors() {
|
|
|
26
28
|
yellow: enabled ? '\x1b[33m' : '',
|
|
27
29
|
red: enabled ? '\x1b[31m' : '',
|
|
28
30
|
cyan: enabled ? '\x1b[36m' : '',
|
|
31
|
+
blue: enabled ? '\x1b[34m' : '',
|
|
32
|
+
white: enabled ? '\x1b[37m' : '',
|
|
33
|
+
bgBlue: enabled ? '\x1b[44m' : '',
|
|
29
34
|
};
|
|
30
35
|
}
|
|
31
|
-
// ASCII logo -
|
|
32
|
-
const ASCII_LOGO = `
|
|
33
|
-
_____ ___ ___
|
|
34
|
-
|__ // _ |/ /
|
|
35
|
-
/ // __ | __|
|
|
36
|
-
/___\\___|___| code
|
|
37
|
-
`;
|
|
36
|
+
// Minimal ASCII logo - 2 lines max
|
|
37
|
+
const ASCII_LOGO = `zai·code`;
|
|
38
38
|
exports.ASCII_LOGO = ASCII_LOGO;
|
|
39
|
-
// Show logo on startup (only if enabled
|
|
39
|
+
// Show logo on startup (only if enabled)
|
|
40
40
|
function renderStartup(projectName) {
|
|
41
41
|
const c = getColors();
|
|
42
42
|
const lines = [];
|
|
43
|
-
// Logo (optional)
|
|
43
|
+
// Logo (optional, minimal)
|
|
44
44
|
if ((0, settings_1.shouldShowLogo)()) {
|
|
45
|
-
lines.push(c.dim + ASCII_LOGO.trim() + c.reset);
|
|
46
45
|
lines.push('');
|
|
46
|
+
lines.push(`${c.bold}zai${c.reset}${c.dim}·code${c.reset}`);
|
|
47
47
|
}
|
|
48
|
-
//
|
|
49
|
-
|
|
48
|
+
// Get git info
|
|
49
|
+
const cwd = process.cwd();
|
|
50
|
+
const gitInfo = (0, git_1.getGitInfo)(cwd);
|
|
51
|
+
const gitStatus = gitInfo.isRepo ?
|
|
52
|
+
`${gitInfo.branch || 'unknown'}${gitInfo.isDirty ? '*' : ''}` :
|
|
53
|
+
'no-git';
|
|
54
|
+
// Status line
|
|
55
|
+
const model = (0, settings_1.getModel)().split('-').slice(1, 3).join('-');
|
|
56
|
+
const profile = (0, profiles_1.getActiveProfileName)() || 'custom';
|
|
57
|
+
lines.push('');
|
|
58
|
+
lines.push(`${c.dim}${projectName}${c.reset} ${c.dim}|${c.reset} ${gitStatus} ${c.dim}|${c.reset} ${model}`);
|
|
59
|
+
lines.push('');
|
|
50
60
|
return lines.join('\n');
|
|
51
61
|
}
|
|
52
62
|
// Get state label
|
|
53
63
|
function getStateLabel(session) {
|
|
54
64
|
if (session.pendingActions)
|
|
55
|
-
return '
|
|
65
|
+
return 'pending';
|
|
56
66
|
if (session.lastDiff)
|
|
57
|
-
return 'dirty';
|
|
58
|
-
if (session.lastPlan && session.lastPlan.length > 0)
|
|
59
67
|
return 'pending';
|
|
60
|
-
|
|
68
|
+
if (session.lastPlan && session.lastPlan.length > 0)
|
|
69
|
+
return 'planned';
|
|
70
|
+
return 'ready';
|
|
61
71
|
}
|
|
62
72
|
// Get focus (current file or step)
|
|
63
73
|
function getFocus(session) {
|
|
74
|
+
if (session.taskSteps.length > 0 && session.currentStepIndex < session.taskSteps.length) {
|
|
75
|
+
return `${session.currentStepIndex + 1}/${session.taskSteps.length}`;
|
|
76
|
+
}
|
|
64
77
|
if (session.openFiles.length === 1) {
|
|
65
78
|
const file = session.openFiles[0];
|
|
66
|
-
// Return just filename
|
|
67
79
|
return file.split('/').pop() || null;
|
|
68
80
|
}
|
|
69
|
-
if (session.taskSteps.length > 0 && session.currentStepIndex < session.taskSteps.length) {
|
|
70
|
-
return `step${session.currentStepIndex + 1}`;
|
|
71
|
-
}
|
|
72
81
|
return null;
|
|
73
82
|
}
|
|
74
|
-
// Build prompt
|
|
83
|
+
// Build prompt - minimal and clear
|
|
75
84
|
function getPrompt(session) {
|
|
85
|
+
const c = getColors();
|
|
76
86
|
const state = getStateLabel(session);
|
|
77
87
|
const focus = getFocus(session);
|
|
78
|
-
|
|
88
|
+
// Format: mode:state focus>
|
|
89
|
+
// Examples: edit:ready> edit:pending auth.ts>
|
|
90
|
+
let prompt = `${c.cyan}${session.mode}${c.reset}`;
|
|
79
91
|
if (session.dryRun) {
|
|
80
|
-
prompt +=
|
|
92
|
+
prompt += `${c.yellow}(dry)${c.reset}`;
|
|
81
93
|
}
|
|
82
|
-
prompt +=
|
|
94
|
+
prompt += `${c.dim}:${c.reset}${state}`;
|
|
83
95
|
if (focus) {
|
|
84
|
-
prompt += `
|
|
96
|
+
prompt += ` ${c.dim}${focus}${c.reset}`;
|
|
85
97
|
}
|
|
86
|
-
prompt +=
|
|
98
|
+
prompt += `${c.bold}>${c.reset} `;
|
|
87
99
|
return prompt;
|
|
88
100
|
}
|
|
89
|
-
// Status
|
|
90
|
-
function renderStatus(session) {
|
|
91
|
-
const c = getColors();
|
|
92
|
-
const state = getStateLabel(session);
|
|
93
|
-
return `${c.dim}Mode: ${session.mode} | State: ${state}${c.reset}`;
|
|
94
|
-
}
|
|
95
|
-
// Status bar: git | model | profile | pending
|
|
101
|
+
// Status bar for info display
|
|
96
102
|
function renderStatusBar(session) {
|
|
97
103
|
const c = getColors();
|
|
98
104
|
const gitInfo = (0, git_1.getGitInfo)(session.workingDirectory);
|
|
99
105
|
const gitStatus = (0, git_1.formatGitStatus)(gitInfo);
|
|
100
|
-
const model = (0, settings_1.getModel)().split('-').slice(0, 2).join('-');
|
|
106
|
+
const model = (0, settings_1.getModel)().split('-').slice(0, 2).join('-');
|
|
101
107
|
const profile = (0, profiles_1.getActiveProfileName)();
|
|
102
|
-
const pending = session.pendingActions ?
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
`model:${model}`,
|
|
106
|
-
`profile:${profile}`,
|
|
107
|
-
];
|
|
108
|
+
const pending = session.pendingActions ?
|
|
109
|
+
(session.pendingActions.files?.length || 0) + (session.pendingActions.diffs?.length || 0) : 0;
|
|
110
|
+
const parts = [gitStatus, `${model}`, profile];
|
|
108
111
|
if (pending > 0) {
|
|
109
|
-
parts.push(
|
|
112
|
+
parts.push(`${pending} pending`);
|
|
110
113
|
}
|
|
111
|
-
return c.dim + parts.join('
|
|
114
|
+
return c.dim + parts.join(' · ') + c.reset;
|
|
115
|
+
}
|
|
116
|
+
// Status line: Mode: <mode> | State: <state>
|
|
117
|
+
function renderStatus(session) {
|
|
118
|
+
const c = getColors();
|
|
119
|
+
const state = getStateLabel(session);
|
|
120
|
+
return `${c.dim}Mode: ${session.mode} | State: ${state}${c.reset}`;
|
|
112
121
|
}
|
|
113
122
|
// Contextual warnings
|
|
114
123
|
function getWarnings(session) {
|
|
@@ -116,33 +125,30 @@ function getWarnings(session) {
|
|
|
116
125
|
const fs = require('fs');
|
|
117
126
|
const path = require('path');
|
|
118
127
|
const os = require('os');
|
|
119
|
-
// Check: running in home directory
|
|
120
128
|
if (session.workingDirectory === os.homedir()) {
|
|
121
129
|
warnings.push('Warning: running in home directory');
|
|
122
130
|
}
|
|
123
|
-
// Check: not in a git repo
|
|
124
131
|
const gitDir = path.join(session.workingDirectory, '.git');
|
|
125
132
|
if (!fs.existsSync(gitDir)) {
|
|
126
|
-
warnings.push('
|
|
133
|
+
warnings.push('Not a git repository');
|
|
127
134
|
}
|
|
128
|
-
// Check: pending changes
|
|
129
135
|
if (session.pendingActions) {
|
|
130
|
-
warnings.push('Pending changes
|
|
136
|
+
warnings.push('Pending changes. Use /diff to review.');
|
|
131
137
|
}
|
|
132
138
|
return warnings;
|
|
133
139
|
}
|
|
134
140
|
// Output helpers
|
|
135
141
|
function success(msg) {
|
|
136
142
|
const c = getColors();
|
|
137
|
-
return `${c.green}
|
|
143
|
+
return `${c.green}✓${c.reset} ${msg}`;
|
|
138
144
|
}
|
|
139
145
|
function warning(msg) {
|
|
140
146
|
const c = getColors();
|
|
141
|
-
return `${c.yellow}
|
|
147
|
+
return `${c.yellow}!${c.reset} ${msg}`;
|
|
142
148
|
}
|
|
143
149
|
function error(msg) {
|
|
144
150
|
const c = getColors();
|
|
145
|
-
return `${c.red}
|
|
151
|
+
return `${c.red}✗${c.reset} ${msg}`;
|
|
146
152
|
}
|
|
147
153
|
function dim(msg) {
|
|
148
154
|
const c = getColors();
|
|
@@ -152,9 +158,27 @@ function info(msg) {
|
|
|
152
158
|
const c = getColors();
|
|
153
159
|
return `${c.cyan}${msg}${c.reset}`;
|
|
154
160
|
}
|
|
155
|
-
// Hint for next action
|
|
156
|
-
function hint(
|
|
161
|
+
// Hint for next action - now more prominent
|
|
162
|
+
function hint(action) {
|
|
157
163
|
const c = getColors();
|
|
158
|
-
return `${c.dim}
|
|
164
|
+
return `${c.dim}→ ${action}${c.reset}`;
|
|
165
|
+
}
|
|
166
|
+
// Section header
|
|
167
|
+
function header(title) {
|
|
168
|
+
const c = getColors();
|
|
169
|
+
return `${c.bold}${title}${c.reset}`;
|
|
170
|
+
}
|
|
171
|
+
// Box drawing for structured output
|
|
172
|
+
function box(content, title) {
|
|
173
|
+
const c = getColors();
|
|
174
|
+
const maxLen = Math.max(...content.map(l => l.length), title?.length || 0);
|
|
175
|
+
const lines = [];
|
|
176
|
+
if (title) {
|
|
177
|
+
lines.push(`${c.dim}─${c.reset} ${title} ${c.dim}${'─'.repeat(Math.max(0, maxLen - title.length))}${c.reset}`);
|
|
178
|
+
}
|
|
179
|
+
for (const line of content) {
|
|
180
|
+
lines.push(` ${line}`);
|
|
181
|
+
}
|
|
182
|
+
return lines.join('\n');
|
|
159
183
|
}
|
|
160
184
|
//# sourceMappingURL=ui.js.map
|
package/dist/ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","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CAAC,CAAC,IAAI,GAAG,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;AACvC,CAAC;AAED,oCAAoC;AACpC,SAAgB,GAAG,CAAC,OAAiB,EAAE,KAAc;IACnD,MAAM,CAAC,GAAG,SAAS,EAAE,CAAC;IACtB,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC;IAC3E,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,IAAI,KAAK,EAAE,CAAC;QACV,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,KAAK,IAAI,KAAK,IAAI,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;IACjH,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@staticpayload/zai-code",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Z.ai-native AI code editor - CLI-first, interactive editor shell with keyboard-driven settings, plan-diff-apply workflow, and safety-first design",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|