centaurus-cli 2.5.3 → 2.6.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-adapter.d.ts +6 -0
- package/dist/cli-adapter.d.ts.map +1 -1
- package/dist/cli-adapter.js +215 -29
- package/dist/cli-adapter.js.map +1 -1
- package/dist/commands/CommandParser.js +2 -2
- package/dist/commands/CommandParser.js.map +1 -1
- package/dist/config/defaultConfig.js +1 -1
- package/dist/config/defaultConfig.js.map +1 -1
- package/dist/config/models.d.ts +50 -5
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +144 -22
- package/dist/config/models.js.map +1 -1
- package/dist/config/types.d.ts +3 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +3 -1
- package/dist/config/types.js.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/services/ai-service-client.d.ts +8 -2
- package/dist/services/ai-service-client.d.ts.map +1 -1
- package/dist/services/ai-service-client.js +2 -1
- package/dist/services/ai-service-client.js.map +1 -1
- package/dist/services/environment-context-injector.d.ts +69 -0
- package/dist/services/environment-context-injector.d.ts.map +1 -0
- package/dist/services/environment-context-injector.js +198 -0
- package/dist/services/environment-context-injector.js.map +1 -0
- package/dist/tools/ToolRegistry.d.ts.map +1 -1
- package/dist/tools/ToolRegistry.js +120 -26
- package/dist/tools/ToolRegistry.js.map +1 -1
- package/dist/tools/command.d.ts.map +1 -1
- package/dist/tools/command.js +30 -6
- package/dist/tools/command.js.map +1 -1
- package/dist/tools/file-ops.d.ts.map +1 -1
- package/dist/tools/file-ops.js +70 -23
- package/dist/tools/file-ops.js.map +1 -1
- package/dist/tools/find-files.d.ts +47 -0
- package/dist/tools/find-files.d.ts.map +1 -0
- package/dist/tools/find-files.js +190 -0
- package/dist/tools/find-files.js.map +1 -0
- package/dist/tools/get-diff.d.ts +45 -0
- package/dist/tools/get-diff.d.ts.map +1 -0
- package/dist/tools/get-diff.js +138 -0
- package/dist/tools/get-diff.js.map +1 -0
- package/dist/tools/grep-search.d.ts +85 -0
- package/dist/tools/grep-search.d.ts.map +1 -0
- package/dist/tools/grep-search.js +497 -0
- package/dist/tools/grep-search.js.map +1 -0
- package/dist/tools/inspect-symbol.d.ts +27 -0
- package/dist/tools/inspect-symbol.d.ts.map +1 -0
- package/dist/tools/inspect-symbol.js +259 -0
- package/dist/tools/inspect-symbol.js.map +1 -0
- package/dist/tools/validation.d.ts +49 -0
- package/dist/tools/validation.d.ts.map +1 -0
- package/dist/tools/validation.js +125 -0
- package/dist/tools/validation.js.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/ui/components/App.d.ts +3 -0
- package/dist/ui/components/App.d.ts.map +1 -1
- package/dist/ui/components/App.js +173 -15
- package/dist/ui/components/App.js.map +1 -1
- package/dist/ui/components/ContextWindowIndicator.d.ts +8 -0
- package/dist/ui/components/ContextWindowIndicator.d.ts.map +1 -0
- package/dist/ui/components/ContextWindowIndicator.js +34 -0
- package/dist/ui/components/ContextWindowIndicator.js.map +1 -0
- package/dist/ui/components/InputBox.d.ts +2 -0
- package/dist/ui/components/InputBox.d.ts.map +1 -1
- package/dist/ui/components/InputBox.js +6 -2
- package/dist/ui/components/InputBox.js.map +1 -1
- package/dist/ui/components/MessageDisplay.d.ts.map +1 -1
- package/dist/ui/components/MessageDisplay.js +7 -0
- package/dist/ui/components/MessageDisplay.js.map +1 -1
- package/dist/ui/components/StreamingMessageDisplay.d.ts.map +1 -1
- package/dist/ui/components/StreamingMessageDisplay.js +9 -1
- package/dist/ui/components/StreamingMessageDisplay.js.map +1 -1
- package/dist/ui/components/ThinkingDisplay.d.ts +2 -3
- package/dist/ui/components/ThinkingDisplay.d.ts.map +1 -1
- package/dist/ui/components/ThinkingDisplay.js +19 -19
- package/dist/ui/components/ThinkingDisplay.js.map +1 -1
- package/dist/utils/markdown-parser.d.ts +4 -0
- package/dist/utils/markdown-parser.d.ts.map +1 -1
- package/dist/utils/markdown-parser.js +15 -1
- package/dist/utils/markdown-parser.js.map +1 -1
- package/package.json +2 -1
- package/AUTH_FLOW.md +0 -138
- package/CONFIG_GUIDE.md +0 -249
- package/README.md +0 -501
|
@@ -77,7 +77,15 @@ export const StreamingMessageDisplay = React.memo(({ message }) => {
|
|
|
77
77
|
timestamp && (React.createElement(Text, { color: "#666666", dimColor: true },
|
|
78
78
|
" ",
|
|
79
79
|
timestamp))),
|
|
80
|
+
message.thinkingDuration !== undefined && message.thinkingDuration >= 0 && (React.createElement(Box, { marginBottom: 1 },
|
|
81
|
+
React.createElement(Text, { dimColor: true },
|
|
82
|
+
"Thought for ",
|
|
83
|
+
message.thinkingDuration,
|
|
84
|
+
" second",
|
|
85
|
+
message.thinkingDuration !== 1 ? 's' : '',
|
|
86
|
+
" \u203A"))),
|
|
80
87
|
React.createElement(Box, { borderStyle: "single", borderColor: "#00ccff", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, paddingLeft: 1 },
|
|
81
|
-
React.createElement(MarkdownRenderer, { content: displayContent, maxWidth: 94 }))
|
|
88
|
+
React.createElement(MarkdownRenderer, { content: displayContent, maxWidth: 94 })),
|
|
89
|
+
message.thoughts && message.thoughts.length > 0 && (React.createElement(Box, { flexDirection: "column", marginTop: 1, paddingLeft: 1 }, message.thoughts.map((line, idx) => (React.createElement(Text, { key: idx, dimColor: true }, line)))))));
|
|
82
90
|
});
|
|
83
91
|
//# sourceMappingURL=StreamingMessageDisplay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StreamingMessageDisplay.js","sourceRoot":"","sources":["../../../src/ui/components/StreamingMessageDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,gBAAg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AAC,KAAK,EAAC,SAAS,EAAC,QAAQ;;gBAAG,SAAS,CAAQ,CACnD,CACG;QAGL,OAAO,CAAC,gBAAgB,KAAK,SAAS,IAAI,OAAO,CAAC,gBAAgB,IAAI,CAAC,IAAI,CAC1E,oBAAC,GAAG,IAAC,YAAY,EAAE,CAAC;YAClB,oBAAC,IAAI,IAAC,QAAQ;;gBAAc,OAAO,CAAC,gBAAgB;;gBAAS,OAAO,CAAC,gBAAgB,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;0BAAU,CAC5G,CACP;QAGD,oBAAC,GAAG,IACF,WAAW,EAAC,QAAQ,EACpB,WAAW,EAAC,SAAS,EACrB,UAAU,EAAE,IAAI,EAChB,WAAW,EAAE,KAAK,EAClB,SAAS,EAAE,KAAK,EAChB,YAAY,EAAE,KAAK,EACnB,WAAW,EAAE,CAAC;YAEd,oBAAC,gBAAgB,IAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,GAAI,CACvD;QAGL,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,CAClD,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,IACrD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,oBAAC,IAAI,IAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,UACrB,IAAI,CACA,CACR,CAAC,CACE,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -4,9 +4,8 @@ interface ThinkingDisplayProps {
|
|
|
4
4
|
isComplete?: boolean;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
-
* ThinkingDisplay - Shows model's thinking/reasoning in a
|
|
8
|
-
* Shows only the
|
|
9
|
-
* Shows duration summary when complete
|
|
7
|
+
* ThinkingDisplay - Shows model's thinking/reasoning in a scrolling container
|
|
8
|
+
* Shows only the first 2 lines in a scrolling container that disappears after 3 seconds when complete
|
|
10
9
|
*/
|
|
11
10
|
export declare const ThinkingDisplay: React.FC<ThinkingDisplayProps>;
|
|
12
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThinkingDisplay.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ThinkingDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED
|
|
1
|
+
{"version":3,"file":"ThinkingDisplay.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ThinkingDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4D1D,CAAC"}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { Box, Text } from 'ink';
|
|
3
3
|
/**
|
|
4
|
-
* ThinkingDisplay - Shows model's thinking/reasoning in a
|
|
5
|
-
* Shows only the
|
|
6
|
-
* Shows duration summary when complete
|
|
4
|
+
* ThinkingDisplay - Shows model's thinking/reasoning in a scrolling container
|
|
5
|
+
* Shows only the first 2 lines in a scrolling container that disappears after 3 seconds when complete
|
|
7
6
|
*/
|
|
8
7
|
export const ThinkingDisplay = ({ thinking, isComplete = false }) => {
|
|
9
8
|
const [startTime] = useState(Date.now());
|
|
10
9
|
const [duration, setDuration] = useState(0);
|
|
10
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
11
11
|
useEffect(() => {
|
|
12
12
|
if (isComplete && thinking) {
|
|
13
|
-
|
|
13
|
+
const elapsed = Math.round((Date.now() - startTime) / 1000);
|
|
14
|
+
setDuration(elapsed);
|
|
15
|
+
// Hide after 3 seconds when complete
|
|
16
|
+
const timer = setTimeout(() => {
|
|
17
|
+
setIsVisible(false);
|
|
18
|
+
}, 3000);
|
|
19
|
+
return () => clearTimeout(timer);
|
|
14
20
|
}
|
|
15
21
|
}, [isComplete, thinking, startTime]);
|
|
16
|
-
if (!thinking || thinking.trim().length === 0)
|
|
22
|
+
if (!thinking || thinking.trim().length === 0 || !isVisible)
|
|
17
23
|
return null;
|
|
18
24
|
// Split thinking into lines and filter out empty lines and "true" values
|
|
19
25
|
const lines = thinking
|
|
@@ -23,19 +29,13 @@ export const ThinkingDisplay = ({ thinking, isComplete = false }) => {
|
|
|
23
29
|
// If no valid lines, don't show anything
|
|
24
30
|
if (lines.length === 0)
|
|
25
31
|
return null;
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
// Show only last 3 lines while thinking (plain text, no formatting)
|
|
36
|
-
const displayLines = lines.slice(-3);
|
|
37
|
-
return (React.createElement(Box, { flexDirection: "column", marginBottom: 1, paddingLeft: 2 },
|
|
38
|
-
React.createElement(Text, { dimColor: true, color: "#444444" }, "\uD83D\uDCAD Thinking..."),
|
|
39
|
-
displayLines.map((line, index) => (React.createElement(Text, { key: `thinking-${index}-${line.substring(0, 20)}`, dimColor: true, color: "#555555" }, line.length > 100 ? line.substring(0, 97) + '...' : line)))));
|
|
32
|
+
// Show only first 2 lines in a compact scrolling container
|
|
33
|
+
const displayLines = lines.slice(0, 2);
|
|
34
|
+
return (React.createElement(Box, { flexDirection: "column", marginBottom: 1, paddingLeft: 1, paddingRight: 1, paddingY: 0, borderStyle: "single", borderColor: "#333333", height: 3, overflow: "hidden" },
|
|
35
|
+
displayLines.map((line, index) => (React.createElement(Text, { key: `thinking-${index}-${line.substring(0, 20)}`, dimColor: true, color: "#666666" }, line.length > 80 ? line.substring(0, 77) + '...' : line))),
|
|
36
|
+
isComplete && (React.createElement(Text, { dimColor: true, color: "#555555" },
|
|
37
|
+
"(",
|
|
38
|
+
duration,
|
|
39
|
+
"s)"))));
|
|
40
40
|
};
|
|
41
41
|
//# sourceMappingURL=ThinkingDisplay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThinkingDisplay.js","sourceRoot":"","sources":["../../../src/ui/components/ThinkingDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAOhC
|
|
1
|
+
{"version":3,"file":"ThinkingDisplay.js","sourceRoot":"","sources":["../../../src/ui/components/ThinkingDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAOhC;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,QAAQ,EACR,UAAU,GAAG,KAAK,EACnB,EAAE,EAAE;IACH,MAAM,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACzC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEjD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,UAAU,IAAI,QAAQ,EAAE,CAAC;YAC3B,MAAM,OAAO,G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,EAAC,QAAQ;QAEhB,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CACjC,oBAAC,IAAI,IAAC,GAAG,EAAE,YAAY,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,QAAQ,QAAC,KAAK,EAAC,SAAS,IAC9E,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CACnD,CACR,CAAC;QACD,UAAU,IAAI,CACb,oBAAC,IAAI,IAAC,QAAQ,QAAC,KAAK,EAAC,SAAS;;YAC1B,QAAQ;iBACL,CACR,CACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -12,6 +12,10 @@ export declare class MarkdownParser {
|
|
|
12
12
|
* Main parse function that processes markdown text into structured elements
|
|
13
13
|
*/
|
|
14
14
|
parse(markdown: string): ParsedElement[];
|
|
15
|
+
/**
|
|
16
|
+
* Strip thinking tags and tool call text from markdown
|
|
17
|
+
*/
|
|
18
|
+
private stripThinkingAndToolCalls;
|
|
15
19
|
/**
|
|
16
20
|
* Parse code block (```)
|
|
17
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-parser.d.ts","sourceRoot":"","sources":["../../src/utils/markdown-parser.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,YAAY,GAAG,iBAAiB,GAAG,YAAY,CAAC;IACrJ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAA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MAAM,EAAE,MAAM,GAAE,MAAU,GAAG,MAAM,EAAE,CAyBrF"}
|
|
@@ -3,7 +3,9 @@ export class MarkdownParser {
|
|
|
3
3
|
* Main parse function that processes markdown text into structured elements
|
|
4
4
|
*/
|
|
5
5
|
parse(markdown) {
|
|
6
|
-
|
|
6
|
+
// Strip thinking tags and tool call text before parsing
|
|
7
|
+
const cleanedMarkdown = this.stripThinkingAndToolCalls(markdown);
|
|
8
|
+
const lines = cleanedMarkdown.split('\n');
|
|
7
9
|
const elements = [];
|
|
8
10
|
let i = 0;
|
|
9
11
|
while (i < lines.length) {
|
|
@@ -63,6 +65,18 @@ export class MarkdownParser {
|
|
|
63
65
|
}
|
|
64
66
|
return this.mergeAdjacentText(elements);
|
|
65
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Strip thinking tags and tool call text from markdown
|
|
70
|
+
*/
|
|
71
|
+
stripThinkingAndToolCalls(markdown) {
|
|
72
|
+
// Remove <thinking>...</thinking> tags and their content
|
|
73
|
+
let cleaned = markdown.replace(/<thinking>[\s\S]*?<\/thinking>/gi, '');
|
|
74
|
+
// Remove [Tool: ...] text
|
|
75
|
+
cleaned = cleaned.replace(/\[Tool:\s*[^\]]+\]/g, '');
|
|
76
|
+
// Remove extra blank lines that may have been left behind
|
|
77
|
+
cleaned = cleaned.replace(/\n{3,}/g, '\n\n');
|
|
78
|
+
return cleaned.trim();
|
|
79
|
+
}
|
|
66
80
|
/**
|
|
67
81
|
* Parse code block (```)
|
|
68
82
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-parser.js","sourceRoot":"","sources":["../../src/utils/markdown-parser.ts"],"names":[],"mappings":"AAYA,MAAM,OAAO,cAAc;IACzB;;OAEG;IACH,KAAK,CAAC,QAAgB;QACpB,MAAM,
|
|
1
|
+
{"version":3,"file":"markdown-parser.js","sourceRoot":"","sources":["../../src/utils/markdown-parser.ts"],"names":[],"mappings":"AAYA,MAAM,OAAO,cAAc;IACzB;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GAAa,EAAE,CAAC;IAC3B,IAAI,WAAW,GAAG,EAAE,CAAC;IACrB,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEzC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QAE/D,IAAI,QAAQ,CAAC,MAAM,IAAI,cAAc,EAAE,CAAC;YACtC,WAAW,GAAG,QAAQ,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,IAAI,WAAW,EAAE,CAAC;gBAChB,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,CAAC;YACtC,CAAC;YACD,WAAW,GAAG,IAAI,CAAC;QACrB,CAAC;IACH,CAAC;IAED,IAAI,WAAW,EAAE,CAAC;QAChB,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAChD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "centaurus-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "A powerful command-line AI coding assistant with Google Gemini support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"commander": "^14.0.1",
|
|
54
54
|
"diff": "^8.0.2",
|
|
55
55
|
"dotenv": "^17.2.3",
|
|
56
|
+
"fast-glob": "^3.3.3",
|
|
56
57
|
"ink": "^4.4.1",
|
|
57
58
|
"ink-select-input": "^5.0.0",
|
|
58
59
|
"ink-spinner": "^5.0.0",
|
package/AUTH_FLOW.md
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
# Authentication Flow
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
The Centaurus CLI now features an improved authentication flow with a beautiful UI that guides users through the sign-in process.
|
|
6
|
-
|
|
7
|
-
## First-Time User Experience
|
|
8
|
-
|
|
9
|
-
When a user starts the CLI for the first time (without an existing session), they will see:
|
|
10
|
-
|
|
11
|
-
### 1. Welcome Banner
|
|
12
|
-
```
|
|
13
|
-
██████╗███████╗███╗ ██╗████████╗ █████╗ ██╗ ██╗██████╗ ██╗ ██╗███████╗
|
|
14
|
-
██╔════╝██╔════╝████╗ ██║╚══██╔══╝██╔══██╗██║ ██║██╔══██╗██║ ██║██╔════╝
|
|
15
|
-
██║ █████╗ ██╔██╗ ██║ ██║ ███████║██║ ██║██████╔╝██║ ██║███████╗
|
|
16
|
-
██║ ██╔══╝ ██║╚██╗██║ ██║ ██╔══██║██║ ██║██╔══██╗██║ ██║╚════██║
|
|
17
|
-
╚██████╗███████╗██║ ╚████║ ██║ ██║ ██║╚██████╔╝██║ ██║╚██████╔╝███████║
|
|
18
|
-
╚═════╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
|
19
|
-
|
|
20
|
-
██████╗██╗ ██╗
|
|
21
|
-
██╔════╝██║ ██║
|
|
22
|
-
██║ ██║ ██║
|
|
23
|
-
██║ ██║ ██║
|
|
24
|
-
╚██████╗███████╗██║
|
|
25
|
-
╚═════╝╚══════╝╚═╝
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### 2. Authentication Information
|
|
29
|
-
```
|
|
30
|
-
🔐 Authentication Required
|
|
31
|
-
|
|
32
|
-
To use Centaurus CLI, you need to sign in with Google.
|
|
33
|
-
|
|
34
|
-
Cloud Sync Features:
|
|
35
|
-
✅ Conversation history across devices
|
|
36
|
-
✅ Settings synchronization
|
|
37
|
-
✅ Encrypted API key storage
|
|
38
|
-
✅ Web search capabilities
|
|
39
|
-
|
|
40
|
-
Note: You can still use AI features offline, but web search requires authentication.
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### 3. Interactive Picker
|
|
44
|
-
```
|
|
45
|
-
┌─ What would you like to do? ─┐
|
|
46
|
-
│ > 🔑 Sign in with Google │
|
|
47
|
-
│ ❌ Exit │
|
|
48
|
-
└───────────────────────────────┘
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Users can navigate with arrow keys and press Enter to select.
|
|
52
|
-
|
|
53
|
-
## User Choices
|
|
54
|
-
|
|
55
|
-
### Option 1: Sign in with Google
|
|
56
|
-
1. User selects "🔑 Sign in with Google"
|
|
57
|
-
2. Screen clears and shows: "🔐 Opening browser for authentication..."
|
|
58
|
-
3. Browser opens with Google OAuth flow
|
|
59
|
-
4. User completes authentication in browser
|
|
60
|
-
5. CLI receives session token
|
|
61
|
-
6. Success message: "✅ You are now signed in and cloud sync is enabled!"
|
|
62
|
-
7. Main CLI interface loads
|
|
63
|
-
|
|
64
|
-
### Option 2: Exit
|
|
65
|
-
1. User selects "❌ Exit"
|
|
66
|
-
2. Screen clears
|
|
67
|
-
3. Shows: "👋 Goodbye!"
|
|
68
|
-
4. CLI exits gracefully
|
|
69
|
-
|
|
70
|
-
## Returning Users
|
|
71
|
-
|
|
72
|
-
When a user has an existing valid session:
|
|
73
|
-
- Authentication screen is skipped
|
|
74
|
-
- CLI loads directly to the main interface
|
|
75
|
-
- User can start chatting immediately
|
|
76
|
-
|
|
77
|
-
## Backend Unavailable
|
|
78
|
-
|
|
79
|
-
If the backend API is not reachable:
|
|
80
|
-
- Shows warning: "⚠️ Backend API is not reachable."
|
|
81
|
-
- Continues in offline mode
|
|
82
|
-
- User can still use AI features (except web search)
|
|
83
|
-
|
|
84
|
-
## Session Management
|
|
85
|
-
|
|
86
|
-
### Active Session
|
|
87
|
-
- Session token stored in `~/.centaurus/session.json`
|
|
88
|
-
- Valid for 30 days
|
|
89
|
-
- Automatically refreshed on use
|
|
90
|
-
|
|
91
|
-
### Logout
|
|
92
|
-
- User types `/logout` command
|
|
93
|
-
- Session cleared from local storage
|
|
94
|
-
- CLI exits
|
|
95
|
-
- Next start will show authentication screen again
|
|
96
|
-
|
|
97
|
-
## Technical Details
|
|
98
|
-
|
|
99
|
-
### Components Used
|
|
100
|
-
- `AuthWelcomeScreen.tsx` - Main authentication welcome screen
|
|
101
|
-
- `WelcomeBanner.tsx` - ASCII art banner
|
|
102
|
-
- `SelectPrompt.tsx` - Interactive picker component
|
|
103
|
-
|
|
104
|
-
### Authentication Flow
|
|
105
|
-
1. Check if `apiClient.isAuthenticated()` returns true
|
|
106
|
-
2. If not authenticated, check backend availability
|
|
107
|
-
3. Render `AuthWelcomeScreen` component
|
|
108
|
-
4. Wait for user selection
|
|
109
|
-
5. Handle sign-in or exit accordingly
|
|
110
|
-
|
|
111
|
-
### Error Handling
|
|
112
|
-
- Backend unreachable → Continue in offline mode
|
|
113
|
-
- Authentication failed → Exit with error message
|
|
114
|
-
- User cancels → Exit gracefully
|
|
115
|
-
|
|
116
|
-
## Benefits
|
|
117
|
-
|
|
118
|
-
### User Experience
|
|
119
|
-
- ✅ Beautiful, branded welcome screen
|
|
120
|
-
- ✅ Clear explanation of features
|
|
121
|
-
- ✅ Easy-to-use picker interface
|
|
122
|
-
- ✅ No confusing Y/N prompts
|
|
123
|
-
- ✅ Consistent with CLI UI theme
|
|
124
|
-
|
|
125
|
-
### Developer Experience
|
|
126
|
-
- ✅ Reusable components
|
|
127
|
-
- ✅ Clean separation of concerns
|
|
128
|
-
- ✅ Easy to modify or extend
|
|
129
|
-
- ✅ Proper error handling
|
|
130
|
-
|
|
131
|
-
## Future Enhancements
|
|
132
|
-
|
|
133
|
-
Potential improvements:
|
|
134
|
-
- Add "Learn More" option with detailed feature explanation
|
|
135
|
-
- Show backend status (online/offline) in real-time
|
|
136
|
-
- Add "Skip for now" option to continue in offline mode
|
|
137
|
-
- Remember user preference for future sessions
|
|
138
|
-
- Add animation to the banner
|
package/CONFIG_GUIDE.md
DELETED
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
# Centaurus CLI Configuration Guide
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
The Centaurus CLI stores configuration in two places:
|
|
6
|
-
1. **Environment variables** (`.env` file) - Backend API URL (required)
|
|
7
|
-
2. **User config file** (`~/.centaurus/config.json`) - Model preferences and settings
|
|
8
|
-
|
|
9
|
-
**Important:** API keys are no longer stored in the CLI. All AI model access is managed by the backend service for security and centralized control.
|
|
10
|
-
|
|
11
|
-
## Initial Setup
|
|
12
|
-
|
|
13
|
-
### 1. Backend API Configuration (Required)
|
|
14
|
-
|
|
15
|
-
Create or update `.env` file in the CLI directory:
|
|
16
|
-
|
|
17
|
-
```env
|
|
18
|
-
BACKEND_API_URL=http://localhost:3000/api
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
For production, update to your backend URL:
|
|
22
|
-
```env
|
|
23
|
-
BACKEND_API_URL=https://api.yourapp.com/api
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
**Important:** The backend URL is required for all AI features. The CLI cannot function without a connection to the backend service.
|
|
27
|
-
|
|
28
|
-
### 2. Authentication (Required)
|
|
29
|
-
|
|
30
|
-
When you first run the CLI, you'll be prompted to sign in with Google:
|
|
31
|
-
|
|
32
|
-
1. Start Centaurus: `centaurus`
|
|
33
|
-
2. Choose "Yes" when prompted to sign in
|
|
34
|
-
3. Complete the authentication flow in your browser
|
|
35
|
-
4. Return to the CLI and start chatting!
|
|
36
|
-
|
|
37
|
-
**Why Authentication?**
|
|
38
|
-
- Secures access to AI models
|
|
39
|
-
- Enables conversation history sync
|
|
40
|
-
- Prevents unauthorized usage
|
|
41
|
-
- No local API key management needed
|
|
42
|
-
|
|
43
|
-
## Configuration Commands
|
|
44
|
-
|
|
45
|
-
### View Current Configuration
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
/config
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Shows:
|
|
52
|
-
- Current model
|
|
53
|
-
- Theme settings
|
|
54
|
-
- Auto-accept preferences
|
|
55
|
-
- Plan mode status
|
|
56
|
-
|
|
57
|
-
### Change Model
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
/model
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Opens a picker to select from available Google Gemini models:
|
|
64
|
-
- **gemini-2.5-flash** - Fast and efficient (recommended)
|
|
65
|
-
- **gemini-2.5-pro** - Most capable, slower
|
|
66
|
-
- **gemini-2.0-flash-exp** - Experimental features
|
|
67
|
-
- **gemini-1.5-pro** - Previous generation, high quality
|
|
68
|
-
- **gemini-1.5-flash** - Previous generation, fast
|
|
69
|
-
|
|
70
|
-
Or set directly:
|
|
71
|
-
```bash
|
|
72
|
-
/model gemini-2.5-flash
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Your model preference is saved and persists across sessions.
|
|
76
|
-
|
|
77
|
-
## Authentication
|
|
78
|
-
|
|
79
|
-
### Sign In (Required)
|
|
80
|
-
|
|
81
|
-
Authentication is required to use Centaurus CLI. When you first run the CLI, you'll be prompted to sign in with Google:
|
|
82
|
-
|
|
83
|
-
**What You Get:**
|
|
84
|
-
- ✅ Secure access to AI models
|
|
85
|
-
- ✅ Conversation history across devices
|
|
86
|
-
- ✅ Settings synchronization
|
|
87
|
-
- ✅ Web search capabilities
|
|
88
|
-
- ✅ No local API key management
|
|
89
|
-
|
|
90
|
-
### Sign Out
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
/logout
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Clears your session and exits the CLI. You'll need to sign in again the next time you start the CLI.
|
|
97
|
-
|
|
98
|
-
## Configuration File Location
|
|
99
|
-
|
|
100
|
-
Your configuration is stored at:
|
|
101
|
-
- **Windows**: `C:\Users\YourName\.centaurus\config.json`
|
|
102
|
-
- **macOS/Linux**: `~/.centaurus/config.json`
|
|
103
|
-
|
|
104
|
-
### Config File Structure
|
|
105
|
-
|
|
106
|
-
```json
|
|
107
|
-
{
|
|
108
|
-
"model": "gemini-2.5-flash",
|
|
109
|
-
"theme": "default",
|
|
110
|
-
"autoAccept": false,
|
|
111
|
-
"planMode": false
|
|
112
|
-
}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
**Note:** API keys are no longer stored in the CLI configuration. They are managed by the backend service.
|
|
116
|
-
|
|
117
|
-
## Web Search
|
|
118
|
-
|
|
119
|
-
Web search is handled by the backend and requires:
|
|
120
|
-
1. Authentication (sign in with Google)
|
|
121
|
-
2. Backend server running with Serper API key configured
|
|
122
|
-
|
|
123
|
-
**No client-side configuration needed!**
|
|
124
|
-
|
|
125
|
-
The backend administrator manages the Serper API key server-side.
|
|
126
|
-
|
|
127
|
-
## Troubleshooting
|
|
128
|
-
|
|
129
|
-
### "Authentication required"
|
|
130
|
-
|
|
131
|
-
All AI features require authentication. To sign in:
|
|
132
|
-
1. Restart the CLI
|
|
133
|
-
2. Choose "Yes" when prompted to sign in
|
|
134
|
-
3. Complete the Google OAuth flow in your browser
|
|
135
|
-
4. Return to the CLI
|
|
136
|
-
|
|
137
|
-
### "Backend API is not reachable"
|
|
138
|
-
|
|
139
|
-
This error means the CLI cannot connect to the backend service.
|
|
140
|
-
|
|
141
|
-
**Check your `.env` file:**
|
|
142
|
-
```env
|
|
143
|
-
BACKEND_API_URL=http://localhost:3000/api
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
**Verify backend is running:**
|
|
147
|
-
```bash
|
|
148
|
-
cd backend
|
|
149
|
-
npm start
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
**Common causes:**
|
|
153
|
-
- Backend service is not running
|
|
154
|
-
- Incorrect backend URL in `.env`
|
|
155
|
-
- Network connectivity issues
|
|
156
|
-
- Firewall blocking the connection
|
|
157
|
-
- Backend is deployed but not accessible from your network
|
|
158
|
-
|
|
159
|
-
**For production deployments:**
|
|
160
|
-
Ensure the backend URL points to your deployed backend:
|
|
161
|
-
```env
|
|
162
|
-
BACKEND_API_URL=https://api.yourapp.com/api
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### "Rate limit exceeded"
|
|
166
|
-
|
|
167
|
-
The backend has exhausted its API quota with Google. This is managed by the backend administrator.
|
|
168
|
-
|
|
169
|
-
**What to do:**
|
|
170
|
-
- Wait a few moments and try again
|
|
171
|
-
- Contact your backend administrator if the issue persists
|
|
172
|
-
- The backend may need additional API keys configured for rotation
|
|
173
|
-
|
|
174
|
-
### "Invalid model"
|
|
175
|
-
|
|
176
|
-
The model you selected is not supported by the backend.
|
|
177
|
-
|
|
178
|
-
**Solution:**
|
|
179
|
-
```bash
|
|
180
|
-
/model
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Select a valid Google Gemini model from the list.
|
|
184
|
-
|
|
185
|
-
### Reset Configuration
|
|
186
|
-
|
|
187
|
-
To start fresh, delete the config file:
|
|
188
|
-
|
|
189
|
-
**Windows:**
|
|
190
|
-
```cmd
|
|
191
|
-
del %USERPROFILE%\.centaurus\config.json
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
**macOS/Linux:**
|
|
195
|
-
```bash
|
|
196
|
-
rm ~/.centaurus/config.json
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
Then restart the CLI. You'll need to sign in again and reconfigure your preferences.
|
|
200
|
-
|
|
201
|
-
## Security Best Practices
|
|
202
|
-
|
|
203
|
-
1. **Never commit `.env` files** - Add to `.gitignore`
|
|
204
|
-
2. **Use environment-specific URLs** - Different URLs for dev/prod
|
|
205
|
-
3. **Sign out on shared machines** - Use `/logout` command
|
|
206
|
-
4. **Keep your session secure** - Don't share authentication tokens
|
|
207
|
-
5. **Backend security** - API keys are managed server-side for enhanced security
|
|
208
|
-
|
|
209
|
-
## Advanced Configuration
|
|
210
|
-
|
|
211
|
-
### Custom Backend URL
|
|
212
|
-
|
|
213
|
-
For development or self-hosted backends:
|
|
214
|
-
|
|
215
|
-
```env
|
|
216
|
-
BACKEND_API_URL=http://localhost:3000/api
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
For production:
|
|
220
|
-
|
|
221
|
-
```env
|
|
222
|
-
BACKEND_API_URL=https://api.centaurus.app/api
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
**Backend Requirements:**
|
|
226
|
-
- Must be configured with Google API keys (managed by backend admin)
|
|
227
|
-
- Must support the `/api/ai/chat` endpoint for streaming
|
|
228
|
-
- Must handle authentication and session management
|
|
229
|
-
- Should implement API key rotation for rate limit handling
|
|
230
|
-
|
|
231
|
-
## Getting Help
|
|
232
|
-
|
|
233
|
-
```bash
|
|
234
|
-
/help
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
Shows all available commands and their usage.
|
|
238
|
-
|
|
239
|
-
## Next Steps
|
|
240
|
-
|
|
241
|
-
1. Ensure backend is running and accessible
|
|
242
|
-
2. Configure backend URL in `.env`
|
|
243
|
-
3. Sign in with Google (required)
|
|
244
|
-
4. Choose your preferred model
|
|
245
|
-
5. Start chatting with the AI!
|
|
246
|
-
|
|
247
|
-
For more information, see:
|
|
248
|
-
- [README.md](./README.md) - General CLI documentation
|
|
249
|
-
- [MIGRATION.md](./MIGRATION.md) - Upgrading from previous versions
|