openpaean 0.2.0 → 0.3.2
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/agent/chat.ink.d.ts +5 -0
- package/dist/agent/chat.ink.d.ts.map +1 -1
- package/dist/agent/chat.ink.js +9 -0
- package/dist/agent/chat.ink.js.map +1 -1
- package/dist/cli.js +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +6 -5
- package/dist/commands/agent.js.map +1 -1
- package/dist/ui/terminal/ErrorDisplay.d.ts +63 -0
- package/dist/ui/terminal/ErrorDisplay.d.ts.map +1 -0
- package/dist/ui/terminal/ErrorDisplay.js +113 -0
- package/dist/ui/terminal/ErrorDisplay.js.map +1 -0
- package/dist/ui/terminal/HelpDisplay.d.ts +21 -0
- package/dist/ui/terminal/HelpDisplay.d.ts.map +1 -0
- package/dist/ui/terminal/HelpDisplay.js +89 -0
- package/dist/ui/terminal/HelpDisplay.js.map +1 -0
- package/dist/ui/terminal/Spinner.d.ts +65 -0
- package/dist/ui/terminal/Spinner.d.ts.map +1 -0
- package/dist/ui/terminal/Spinner.js +130 -0
- package/dist/ui/terminal/Spinner.js.map +1 -0
- package/dist/ui/terminal/StatusBar.d.ts +27 -0
- package/dist/ui/terminal/StatusBar.d.ts.map +1 -0
- package/dist/ui/terminal/StatusBar.js +79 -0
- package/dist/ui/terminal/StatusBar.js.map +1 -0
- package/dist/ui/terminal/TerminalApp.d.ts +138 -0
- package/dist/ui/terminal/TerminalApp.d.ts.map +1 -0
- package/dist/ui/terminal/TerminalApp.js +476 -0
- package/dist/ui/terminal/TerminalApp.js.map +1 -0
- package/dist/ui/terminal/output.d.ts +91 -0
- package/dist/ui/terminal/output.d.ts.map +1 -0
- package/dist/ui/terminal/output.js +138 -0
- package/dist/ui/terminal/output.js.map +1 -0
- package/dist/ui/theme/branding.d.ts +19 -0
- package/dist/ui/theme/branding.d.ts.map +1 -0
- package/dist/ui/theme/branding.js +42 -0
- package/dist/ui/theme/branding.js.map +1 -0
- package/dist/ui/theme/index.d.ts +42 -0
- package/dist/ui/theme/index.d.ts.map +1 -0
- package/dist/ui/theme/index.js +53 -0
- package/dist/ui/theme/index.js.map +1 -0
- package/dist/utils/inputHistory.d.ts +88 -0
- package/dist/utils/inputHistory.d.ts.map +1 -0
- package/dist/utils/inputHistory.js +206 -0
- package/dist/utils/inputHistory.js.map +1 -0
- package/package.json +3 -3
package/dist/agent/chat.ink.d.ts
CHANGED
|
@@ -20,6 +20,11 @@ export declare function startChat(options?: ChatOptions): Promise<void>;
|
|
|
20
20
|
* Start the interactive chat loop in fullscreen mode
|
|
21
21
|
*/
|
|
22
22
|
export declare function startFullscreenChat(options?: ChatOptions): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Start the chat in scrolling mode (new default - Claude Code style)
|
|
25
|
+
* Messages scroll naturally, input fixed at bottom, no alternate screen
|
|
26
|
+
*/
|
|
27
|
+
export declare function startScrollingChat(options?: ChatOptions): Promise<void>;
|
|
23
28
|
/**
|
|
24
29
|
* Send a single message (non-interactive mode)
|
|
25
30
|
* This is kept for programmatic usage
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.ink.d.ts","sourceRoot":"","sources":["../../src/agent/chat.ink.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,aAAa,CAAC,EAAE,CACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAkBD;;GAEG;AACH,wBAAsB,SAAS,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAcxE;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBlF;AAED;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"chat.ink.d.ts","sourceRoot":"","sources":["../../src/agent/chat.ink.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,aAAa,CAAC,EAAE,CACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAkBD;;GAEG;AACH,wBAAsB,SAAS,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAcxE;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBlF;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAKjF;AAED;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/agent/chat.ink.js
CHANGED
|
@@ -49,6 +49,15 @@ export async function startFullscreenChat(options = {}) {
|
|
|
49
49
|
exitAlternateScreen();
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Start the chat in scrolling mode (new default - Claude Code style)
|
|
54
|
+
* Messages scroll naturally, input fixed at bottom, no alternate screen
|
|
55
|
+
*/
|
|
56
|
+
export async function startScrollingChat(options = {}) {
|
|
57
|
+
const { TerminalApp } = await import('../ui/terminal/TerminalApp.js');
|
|
58
|
+
const app = new TerminalApp(options);
|
|
59
|
+
await app.start();
|
|
60
|
+
}
|
|
52
61
|
/**
|
|
53
62
|
* Send a single message (non-interactive mode)
|
|
54
63
|
* This is kept for programmatic usage
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.ink.js","sourceRoot":"","sources":["../../src/agent/chat.ink.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAiBvD;;GAEG;AACH,SAAS,oBAAoB;IACzB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,yBAAyB;IAC9D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAM,0BAA0B;IAC/D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAK,eAAe;AACxD,CAAC;AAED;;GAEG;AACH,SAAS,mBAAmB;IACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,wBAAwB;AACjE,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,UAAuB,EAAE;IACrD,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAEnD,6BAA6B;IAC7B,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAC5B,KAAC,GAAG,IACA,QAAQ,EAAE,QAAQ,EAClB,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;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -22,11 +22,11 @@ const packageJson = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'
|
|
|
22
22
|
const program = new Command();
|
|
23
23
|
program
|
|
24
24
|
.name('openpaean')
|
|
25
|
-
.description('OpenPaean - Open source AI agent with
|
|
25
|
+
.description('OpenPaean - Open source AI agent with scrolling TUI (Claude Code style) and MCP integration')
|
|
26
26
|
.version(packageJson.version)
|
|
27
27
|
.option('--config', 'Show config file path')
|
|
28
28
|
.option('--no-mcp', 'Disable local MCP server integration')
|
|
29
|
-
.option('--
|
|
29
|
+
.option('--fullscreen', 'Enable fullscreen mode (default: scrolling mode)')
|
|
30
30
|
.option('-d, --debug', 'Enable debug logging')
|
|
31
31
|
.option('-m, --message <message>', 'Send a single message to agent')
|
|
32
32
|
.action(async (options) => {
|
|
@@ -37,7 +37,7 @@ program
|
|
|
37
37
|
// Default action: start agent mode
|
|
38
38
|
await runAgentMode({
|
|
39
39
|
mcp: options.mcp !== false,
|
|
40
|
-
fullscreen: options.fullscreen
|
|
40
|
+
fullscreen: options.fullscreen === true,
|
|
41
41
|
debug: options.debug,
|
|
42
42
|
message: options.message,
|
|
43
43
|
});
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;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,CAAC,OAAO;KACzB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEL,oBAAoB;AACpB,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AACjC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AACjC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AACjC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;AACnC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AACjC,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;AAEpC,kBAAkB;AAClB,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/commands/agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,eAAO,MAAM,YAAY,SAmBnB,CAAC;AAEP;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE;IACxC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/commands/agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,eAAO,MAAM,YAAY,SAmBnB,CAAC;AAEP;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE;IACxC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgHhB"}
|
package/dist/commands/agent.js
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import { Command } from 'commander';
|
|
6
6
|
import chalk from 'chalk';
|
|
7
7
|
import { isAuthenticated } from '../utils/config.js';
|
|
8
|
-
import {
|
|
8
|
+
import { startScrollingChat, startFullscreenChat } from '../agent/chat.ink.js';
|
|
9
9
|
import { McpClient } from '../mcp/client.js';
|
|
10
10
|
export const agentCommand = new Command('agent')
|
|
11
11
|
.description('Start interactive AI agent mode (default)')
|
|
12
12
|
.option('--no-mcp', 'Disable local MCP server integration')
|
|
13
|
-
.option('--
|
|
13
|
+
.option('--fullscreen', 'Enable fullscreen mode (default: scrolling mode)')
|
|
14
14
|
.option('-d, --debug', 'Enable debug logging')
|
|
15
15
|
.option('-m, --message <message>', 'Send a single message and exit')
|
|
16
16
|
.action(async (options) => {
|
|
@@ -21,7 +21,7 @@ export const agentCommand = new Command('agent')
|
|
|
21
21
|
}
|
|
22
22
|
await runAgentMode({
|
|
23
23
|
mcp: options.mcp !== false,
|
|
24
|
-
fullscreen: options.fullscreen
|
|
24
|
+
fullscreen: options.fullscreen === true, // Changed: fullscreen is opt-in
|
|
25
25
|
debug: options.debug ?? false,
|
|
26
26
|
message: options.message,
|
|
27
27
|
});
|
|
@@ -107,7 +107,7 @@ export async function runAgentMode(options) {
|
|
|
107
107
|
}
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
// Start interactive chat (fullscreen
|
|
110
|
+
// Start interactive chat (scrolling mode by default, fullscreen if requested)
|
|
111
111
|
try {
|
|
112
112
|
if (enableFullscreen) {
|
|
113
113
|
await startFullscreenChat({
|
|
@@ -117,7 +117,8 @@ export async function runAgentMode(options) {
|
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
else {
|
|
120
|
-
|
|
120
|
+
// New default: scrolling mode (Claude Code style)
|
|
121
|
+
await startScrollingChat({
|
|
121
122
|
mcpState,
|
|
122
123
|
onMcpToolCall,
|
|
123
124
|
debug,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/commands/agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/commands/agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;KAC3C,WAAW,CAAC,2CAA2C,CAAC;KACxD,MAAM,CAAC,UAAU,EAAE,sCAAsC,CAAC;KAC1D,MAAM,CAAC,cAAc,EAAE,kDAAkD,CAAC;KAC1E,MAAM,CAAC,aAAa,EAAE,sBAAsB,CAAC;KAC7C,MAAM,CAAC,yBAAyB,EAAE,gCAAgC,CAAC;KACnE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACtB,uBAAuB;IACvB,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC;QACrB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,mDAAmD,CAAC,CAAC,CAAC;QAC/E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,MAA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estions
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Error detail structure
|
|
7
|
+
*/
|
|
8
|
+
export interface ErrorDetail {
|
|
9
|
+
message: string;
|
|
10
|
+
cause?: string;
|
|
11
|
+
suggestion?: string;
|
|
12
|
+
code?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Format an error for display
|
|
16
|
+
*/
|
|
17
|
+
export declare function formatError(detail: ErrorDetail): string;
|
|
18
|
+
/**
|
|
19
|
+
* Display an error and return the formatted string
|
|
20
|
+
*/
|
|
21
|
+
export declare function displayError(detail: ErrorDetail): string;
|
|
22
|
+
/**
|
|
23
|
+
* Common error templates
|
|
24
|
+
*/
|
|
25
|
+
export declare const Errors: {
|
|
26
|
+
/**
|
|
27
|
+
* Network error
|
|
28
|
+
*/
|
|
29
|
+
network: (cause?: string) => ErrorDetail;
|
|
30
|
+
/**
|
|
31
|
+
* Authentication error
|
|
32
|
+
*/
|
|
33
|
+
auth: () => ErrorDetail;
|
|
34
|
+
/**
|
|
35
|
+
* MCP connection error
|
|
36
|
+
*/
|
|
37
|
+
mcpConnection: (serverName: string, cause?: string) => ErrorDetail;
|
|
38
|
+
/**
|
|
39
|
+
* MCP tool error
|
|
40
|
+
*/
|
|
41
|
+
mcpTool: (toolName: string, cause?: string) => ErrorDetail;
|
|
42
|
+
/**
|
|
43
|
+
* File not found
|
|
44
|
+
*/
|
|
45
|
+
fileNotFound: (path: string) => ErrorDetail;
|
|
46
|
+
/**
|
|
47
|
+
* Invalid input
|
|
48
|
+
*/
|
|
49
|
+
invalidInput: (field?: string) => ErrorDetail;
|
|
50
|
+
/**
|
|
51
|
+
* Generic error
|
|
52
|
+
*/
|
|
53
|
+
generic: (message: string, suggestion?: string) => ErrorDetail;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Parse an Error object into ErrorDetail
|
|
57
|
+
*/
|
|
58
|
+
export declare function parseError(err: unknown): ErrorDetail;
|
|
59
|
+
/**
|
|
60
|
+
* Display error from caught exception
|
|
61
|
+
*/
|
|
62
|
+
export declare function showError(err: unknown): string;
|
|
63
|
+
//# sourceMappingURL=ErrorDisplay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorDisplay.d.ts","sourceRoot":"","sources":["../../../src/ui/terminal/ErrorDisplay.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAsBvD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAExD;AAED;;GAEG;AACH,eAAO,MAAM,MAAM;IACf;;OAEG;sBACe,MAAM,KAAG,WAAW;IAMtC;;OAEG;gBACO,WAAW;IAMrB;;OAEG;gCACyB,MAAM,UAAU,MAAM,KAAG,WAAW;IAMhE;;OAEG;wBACiB,MAAM,UAAU,MAAM,KAAG,WAAW;IAMxD;;OAEG;yBACkB,MAAM,KAAG,WAAW;IAKzC;;OAEG;2BACoB,MAAM,KAAG,WAAW;IAK3C;;OAEG;uBACgB,MAAM,eAAe,MAAM,KAAG,WAAW;CAI/D,CAAC;AAEF;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,CAapD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAG9C"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Display
|
|
3
|
+
* Structured error messages with cause and suggestions
|
|
4
|
+
*/
|
|
5
|
+
import { styledMessage, warning, info, muted } from '../theme/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Format an error for display
|
|
8
|
+
*/
|
|
9
|
+
export function formatError(detail) {
|
|
10
|
+
let output = '';
|
|
11
|
+
// Main error message
|
|
12
|
+
output += styledMessage('error', detail.message) + '\n';
|
|
13
|
+
// Error code if present
|
|
14
|
+
if (detail.code) {
|
|
15
|
+
output += muted(` Code: ${detail.code}\n`);
|
|
16
|
+
}
|
|
17
|
+
// Cause
|
|
18
|
+
if (detail.cause) {
|
|
19
|
+
output += ` ${warning('Cause:')} ${detail.cause}\n`;
|
|
20
|
+
}
|
|
21
|
+
// Suggestion
|
|
22
|
+
if (detail.suggestion) {
|
|
23
|
+
output += ` ${info('Suggestion:')} ${detail.suggestion}\n`;
|
|
24
|
+
}
|
|
25
|
+
return output;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Display an error and return the formatted string
|
|
29
|
+
*/
|
|
30
|
+
export function displayError(detail) {
|
|
31
|
+
return formatError(detail);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Common error templates
|
|
35
|
+
*/
|
|
36
|
+
export const Errors = {
|
|
37
|
+
/**
|
|
38
|
+
* Network error
|
|
39
|
+
*/
|
|
40
|
+
network: (cause) => ({
|
|
41
|
+
message: 'Network connection failed',
|
|
42
|
+
cause: cause || 'Could not reach the server',
|
|
43
|
+
suggestion: 'Check your internet connection and try again',
|
|
44
|
+
}),
|
|
45
|
+
/**
|
|
46
|
+
* Authentication error
|
|
47
|
+
*/
|
|
48
|
+
auth: () => ({
|
|
49
|
+
message: 'Authentication failed',
|
|
50
|
+
cause: 'Your session may have expired',
|
|
51
|
+
suggestion: 'Run `openpaean login` to re-authenticate',
|
|
52
|
+
}),
|
|
53
|
+
/**
|
|
54
|
+
* MCP connection error
|
|
55
|
+
*/
|
|
56
|
+
mcpConnection: (serverName, cause) => ({
|
|
57
|
+
message: `Failed to connect to MCP server "${serverName}"`,
|
|
58
|
+
cause: cause || 'Server may be unavailable or already in use',
|
|
59
|
+
suggestion: 'Check if the server is running and not used by another client',
|
|
60
|
+
}),
|
|
61
|
+
/**
|
|
62
|
+
* MCP tool error
|
|
63
|
+
*/
|
|
64
|
+
mcpTool: (toolName, cause) => ({
|
|
65
|
+
message: `MCP tool "${toolName}" failed`,
|
|
66
|
+
cause: cause || 'Tool execution returned an error',
|
|
67
|
+
suggestion: 'Check the tool configuration and try again',
|
|
68
|
+
}),
|
|
69
|
+
/**
|
|
70
|
+
* File not found
|
|
71
|
+
*/
|
|
72
|
+
fileNotFound: (path) => ({
|
|
73
|
+
message: `File not found: ${path}`,
|
|
74
|
+
suggestion: 'Check the file path and try again',
|
|
75
|
+
}),
|
|
76
|
+
/**
|
|
77
|
+
* Invalid input
|
|
78
|
+
*/
|
|
79
|
+
invalidInput: (field) => ({
|
|
80
|
+
message: field ? `Invalid ${field}` : 'Invalid input',
|
|
81
|
+
suggestion: 'Please check your input and try again',
|
|
82
|
+
}),
|
|
83
|
+
/**
|
|
84
|
+
* Generic error
|
|
85
|
+
*/
|
|
86
|
+
generic: (message, suggestion) => ({
|
|
87
|
+
message,
|
|
88
|
+
suggestion,
|
|
89
|
+
}),
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Parse an Error object into ErrorDetail
|
|
93
|
+
*/
|
|
94
|
+
export function parseError(err) {
|
|
95
|
+
if (err instanceof Error) {
|
|
96
|
+
return {
|
|
97
|
+
message: err.message,
|
|
98
|
+
cause: err.cause,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
if (typeof err === 'string') {
|
|
102
|
+
return { message: err };
|
|
103
|
+
}
|
|
104
|
+
return { message: 'An unknown error occurred' };
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Display error from caught exception
|
|
108
|
+
*/
|
|
109
|
+
export function showError(err) {
|
|
110
|
+
const detail = parseError(err);
|
|
111
|
+
return displayError(detail);
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=ErrorDisplay.js.map
|
|
@@ -0,0 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E,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,GAAY;IAClC,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IAC/B,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Help Display
|
|
3
|
+
* Centralized help content for the CLI
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Get full help text
|
|
7
|
+
*/
|
|
8
|
+
export declare function getFullHelp(): string;
|
|
9
|
+
/**
|
|
10
|
+
* Get quick help (one-line hints)
|
|
11
|
+
*/
|
|
12
|
+
export declare function getQuickHelp(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Get command-specific help
|
|
15
|
+
*/
|
|
16
|
+
export declare function getCommandHelp(command: string): string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Get keybinding help table
|
|
19
|
+
*/
|
|
20
|
+
export declare function getKeyBindings(): string;
|
|
21
|
+
//# sourceMappingURL=HelpDisplay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpDisplay.d.ts","sourceRoot":"","sources":["../../../src/ui/terminal/HelpDisplay.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAqCpC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAc7D;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAgBvC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Help Display
|
|
3
|
+
* Centralized help content for the CLI
|
|
4
|
+
*/
|
|
5
|
+
import { success, info, warning, primary, muted } from '../theme/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Get full help text
|
|
8
|
+
*/
|
|
9
|
+
export function getFullHelp() {
|
|
10
|
+
return `
|
|
11
|
+
${info('Available Commands:')}
|
|
12
|
+
|
|
13
|
+
${success('/exit, /quit, /q')} Exit the chat session
|
|
14
|
+
${success('/clear, /cls')} Clear the screen
|
|
15
|
+
${success('/help, /h, /?')} Show this help message
|
|
16
|
+
${success('/debug')} Toggle debug mode
|
|
17
|
+
${success('/raw')} Toggle raw output mode (no markdown)
|
|
18
|
+
${success('/mcp')} Show MCP connection status
|
|
19
|
+
|
|
20
|
+
${info('Keyboard Shortcuts:')}
|
|
21
|
+
|
|
22
|
+
${warning('Ctrl+C')} Exit or abort current operation
|
|
23
|
+
${warning('Ctrl+D')} Exit (alternative)
|
|
24
|
+
${warning('Tab')} Command completion
|
|
25
|
+
${warning('↑/↓')} Navigate command history
|
|
26
|
+
${warning('Ctrl+L')} Clear screen
|
|
27
|
+
|
|
28
|
+
${info('Chat Features:')}
|
|
29
|
+
|
|
30
|
+
${primary('MCP Tools')} Local tool calling via Model Context Protocol
|
|
31
|
+
${primary('Streaming')} Real-time response streaming
|
|
32
|
+
${primary('Markdown')} Rich formatted responses (unless in raw mode)
|
|
33
|
+
|
|
34
|
+
${info('Modes:')}
|
|
35
|
+
|
|
36
|
+
${success('Raw Mode')} Disable markdown formatting for plain text output
|
|
37
|
+
${success('Debug Mode')} Show detailed logging for troubleshooting
|
|
38
|
+
|
|
39
|
+
${info('Terminal:')}
|
|
40
|
+
|
|
41
|
+
Use your terminal's scroll to view message history.
|
|
42
|
+
All messages remain visible after exit.
|
|
43
|
+
|
|
44
|
+
${muted('For more information, visit: https://github.com/paean-ai/openpaean')}
|
|
45
|
+
`;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Get quick help (one-line hints)
|
|
49
|
+
*/
|
|
50
|
+
export function getQuickHelp() {
|
|
51
|
+
return `${primary('[/]')} Commands ${primary('[?]')} Help ${primary('[Tab]')} Complete ${primary('[Ctrl+C]')} Exit`;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get command-specific help
|
|
55
|
+
*/
|
|
56
|
+
export function getCommandHelp(command) {
|
|
57
|
+
const commands = {
|
|
58
|
+
'/exit': 'Exit the chat session',
|
|
59
|
+
'/quit': 'Exit the chat session (alias for /exit)',
|
|
60
|
+
'/q': 'Exit the chat session (short alias)',
|
|
61
|
+
'/clear': 'Clear the screen',
|
|
62
|
+
'/cls': 'Clear the screen (alias)',
|
|
63
|
+
'/help': 'Show this help message',
|
|
64
|
+
'/debug': 'Toggle debug mode for detailed logging',
|
|
65
|
+
'/raw': 'Toggle raw mode (plain text output, no markdown)',
|
|
66
|
+
'/mcp': 'Show MCP server connection status and available tools',
|
|
67
|
+
};
|
|
68
|
+
return commands[command.toLowerCase()] || null;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Get keybinding help table
|
|
72
|
+
*/
|
|
73
|
+
export function getKeyBindings() {
|
|
74
|
+
const bindings = [
|
|
75
|
+
{ key: 'Ctrl+C', action: 'Exit / Abort' },
|
|
76
|
+
{ key: 'Ctrl+D', action: 'Exit' },
|
|
77
|
+
{ key: 'Ctrl+L', action: 'Clear screen' },
|
|
78
|
+
{ key: 'Tab', action: 'Complete command' },
|
|
79
|
+
{ key: '↑ / ↓', action: 'History navigation' },
|
|
80
|
+
{ key: 'Enter', action: 'Send message' },
|
|
81
|
+
{ key: '?', action: 'Show keybindings' },
|
|
82
|
+
];
|
|
83
|
+
let output = '\n' + info('Keybindings:') + '\n\n';
|
|
84
|
+
for (const binding of bindings) {
|
|
85
|
+
output += ` ${warning(binding.key.padEnd(12))} ${binding.action}\n`;
|
|
86
|
+
}
|
|
87
|
+
return output;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=HelpDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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icators for different operation types
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Spinner frames for different animation types
|
|
7
|
+
*/
|
|
8
|
+
declare const SPINNER_FRAMES: {
|
|
9
|
+
dots: string[];
|
|
10
|
+
arrows: string[];
|
|
11
|
+
pipe: string[];
|
|
12
|
+
bounce: string[];
|
|
13
|
+
mcp: string[];
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Spinner class
|
|
17
|
+
*/
|
|
18
|
+
export declare class Spinner {
|
|
19
|
+
private state;
|
|
20
|
+
/**
|
|
21
|
+
* Start a spinner
|
|
22
|
+
*/
|
|
23
|
+
start(label: string, type?: keyof typeof SPINNER_FRAMES): void;
|
|
24
|
+
/**
|
|
25
|
+
* Stop the spinner with success or failure message
|
|
26
|
+
*/
|
|
27
|
+
stop(message?: string, success?: boolean): void;
|
|
28
|
+
/**
|
|
29
|
+
* Update the spinner label
|
|
30
|
+
*/
|
|
31
|
+
update(label: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Render current frame
|
|
34
|
+
*/
|
|
35
|
+
private render;
|
|
36
|
+
/**
|
|
37
|
+
* Check if spinner is active
|
|
38
|
+
*/
|
|
39
|
+
get isActive(): boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Pre-configured spinner functions
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* Thinking spinner (default for AI processing)
|
|
46
|
+
*/
|
|
47
|
+
export declare function thinking(label?: string): Spinner;
|
|
48
|
+
/**
|
|
49
|
+
* Working spinner (for general operations)
|
|
50
|
+
*/
|
|
51
|
+
export declare function working(label?: string): Spinner;
|
|
52
|
+
/**
|
|
53
|
+
* Loading spinner (for data loading)
|
|
54
|
+
*/
|
|
55
|
+
export declare function loading(label?: string): Spinner;
|
|
56
|
+
/**
|
|
57
|
+
* MCP tool spinner
|
|
58
|
+
*/
|
|
59
|
+
export declare function mcpSpinner(label?: string): Spinner;
|
|
60
|
+
/**
|
|
61
|
+
* Simple inline text that doesn't animate
|
|
62
|
+
*/
|
|
63
|
+
export declare function staticIndicator(text: string, symbol?: string): void;
|
|
64
|
+
export {};
|
|
65
|
+
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/ui/terminal/Spinner.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,QAAA,MAAM,cAAc;;;;;;CAMnB,CAAC;AAaF;;GAEG;AACH,qBAAa,OAAO;IAChB,OAAO,CAAC,KAAK,CAMX;IAEF;;OAEG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,OAAO,cAAuB,GAAG,IAAI;IAoBtE;;OAEG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,UAAO,GAAG,IAAI;IAqB5C;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK3B;;OAEG;IACH,OAAO,CAAC,MAAM;IAOd;;OAEG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;CACJ;AAED;;GAEG;AAEH;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,SAAgB,GAAG,OAAO,CAIvD;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,SAAe,GAAG,OAAO,CAIrD;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,SAAe,GAAG,OAAO,CAIrD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,SAAgB,GAAG,OAAO,CAIzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,MAAyB,GAAG,IAAI,CAErF"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spinner Component
|
|
3
|
+
* Loading indicators for different operation types
|
|
4
|
+
*/
|
|
5
|
+
import { thinkingSymbol } from '../theme/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Spinner frames for different animation types
|
|
8
|
+
*/
|
|
9
|
+
const SPINNER_FRAMES = {
|
|
10
|
+
dots: ['⋯', '⋯', '⋰', '⋱'],
|
|
11
|
+
arrows: ['←', '↑', '→', '↓'],
|
|
12
|
+
pipe: ['|', '/', '-', '\\'],
|
|
13
|
+
bounce: ['⠁', '⠂', '⠄', '⡀', '⢀', '⠠', '⠐', '⠈'],
|
|
14
|
+
mcp: ['[⚙]', '[⚙⚙]', '[⚙⚙⚙]'],
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Spinner class
|
|
18
|
+
*/
|
|
19
|
+
export class Spinner {
|
|
20
|
+
state = {
|
|
21
|
+
label: '',
|
|
22
|
+
type: 'dots',
|
|
23
|
+
frame: 0,
|
|
24
|
+
interval: null,
|
|
25
|
+
active: false,
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Start a spinner
|
|
29
|
+
*/
|
|
30
|
+
start(label, type = 'dots') {
|
|
31
|
+
this.stop(); // Stop any existing spinner
|
|
32
|
+
this.state.label = label;
|
|
33
|
+
this.state.type = type;
|
|
34
|
+
this.state.frame = 0;
|
|
35
|
+
this.state.active = true;
|
|
36
|
+
// Show initial frame
|
|
37
|
+
this.render();
|
|
38
|
+
// Start animation
|
|
39
|
+
this.state.interval = setInterval(() => {
|
|
40
|
+
if (this.state.active) {
|
|
41
|
+
this.state.frame = (this.state.frame + 1) % SPINNER_FRAMES[this.state.type].length;
|
|
42
|
+
this.render();
|
|
43
|
+
}
|
|
44
|
+
}, 100);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Stop the spinner with success or failure message
|
|
48
|
+
*/
|
|
49
|
+
stop(message, success = true) {
|
|
50
|
+
if (!this.state.active)
|
|
51
|
+
return;
|
|
52
|
+
if (this.state.interval) {
|
|
53
|
+
clearInterval(this.state.interval);
|
|
54
|
+
this.state.interval = null;
|
|
55
|
+
}
|
|
56
|
+
this.state.active = false;
|
|
57
|
+
// Clear the spinner line
|
|
58
|
+
process.stdout.write('\r\x1b[2K'); // Move to start, clear line
|
|
59
|
+
// Show final message
|
|
60
|
+
if (message) {
|
|
61
|
+
const symbol = success ? '✓' : '✗';
|
|
62
|
+
const color = success ? '\x1b[92m' : '\x1b[91m'; // green or red
|
|
63
|
+
process.stdout.write(`${color}${symbol}\x1b[0m ${message}\n`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Update the spinner label
|
|
68
|
+
*/
|
|
69
|
+
update(label) {
|
|
70
|
+
this.state.label = label;
|
|
71
|
+
this.render();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Render current frame
|
|
75
|
+
*/
|
|
76
|
+
render() {
|
|
77
|
+
if (!this.state.active)
|
|
78
|
+
return;
|
|
79
|
+
const frame = SPINNER_FRAMES[this.state.type][this.state.frame];
|
|
80
|
+
process.stdout.write(`\r\x1b[2K${frame} ${this.state.label}`);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Check if spinner is active
|
|
84
|
+
*/
|
|
85
|
+
get isActive() {
|
|
86
|
+
return this.state.active;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Pre-configured spinner functions
|
|
91
|
+
*/
|
|
92
|
+
/**
|
|
93
|
+
* Thinking spinner (default for AI processing)
|
|
94
|
+
*/
|
|
95
|
+
export function thinking(label = 'Thinking...') {
|
|
96
|
+
const spinner = new Spinner();
|
|
97
|
+
spinner.start(label, 'dots');
|
|
98
|
+
return spinner;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Working spinner (for general operations)
|
|
102
|
+
*/
|
|
103
|
+
export function working(label = 'Working...') {
|
|
104
|
+
const spinner = new Spinner();
|
|
105
|
+
spinner.start(label, 'arrows');
|
|
106
|
+
return spinner;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Loading spinner (for data loading)
|
|
110
|
+
*/
|
|
111
|
+
export function loading(label = 'Loading...') {
|
|
112
|
+
const spinner = new Spinner();
|
|
113
|
+
spinner.start(label, 'bounce');
|
|
114
|
+
return spinner;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* MCP tool spinner
|
|
118
|
+
*/
|
|
119
|
+
export function mcpSpinner(label = 'MCP Tool...') {
|
|
120
|
+
const spinner = new Spinner();
|
|
121
|
+
spinner.start(label, 'mcp');
|
|
122
|
+
return spinner;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Simple inline text that doesn't animate
|
|
126
|
+
*/
|
|
127
|
+
export function staticIndicator(text, symbol = thinkingSymbol()) {
|
|
128
|
+
process.stdout.write(`\r${symbol} ${text}`);
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=Spinner.js.map
|