Skip to content

Commit 1bb2330

Browse files
authored
Merge pull request #7344 from continuedev/nate-4
fix: CLI UI Improvements
2 parents 3d5c517 + 6823cbf commit 1bb2330

File tree

6 files changed

+29
-14
lines changed

6 files changed

+29
-14
lines changed

core/package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/cli/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
"test:e2e": "vitest run --config vitest.e2e.config.ts",
1616
"test:smoke": "node smoke-test.mjs",
1717
"build:tsc": "tsc -p tsconfig.build.json",
18-
"build:local-deps": "cd ../../packages/config-types && npm run build && cd ../config-yaml && npm run build && cd ../openai-adapters && npm run build",
18+
"build:local-deps": "cd ../../packages/config-types && npm i && npm run build && cd ../fetch && npm i && npm run build && cd ../llm-info && npm i && npm run build && cd ../config-yaml && npm i && npm run build && cd ../openai-adapters && npm i && npm run build && cd ../../core && npm i && cd ../extensions/cli && npm i",
1919
"build:validate": "node validate-aliases.mjs",
2020
"build:bundle": "node build.mjs",
21-
"build": "npm run build:local-deps && npm run build:validate && npm run build:bundle",
22-
"start": "node dist/index.js",
21+
"build": "npm run build:validate && npm run build:bundle",
22+
"start": "node dist/cn.js",
2323
"dev": "tsx src/index.ts",
2424
"repomix:sdk": "npx repomix node_modules/@continuedev/sdk --ignore **/api,cli-repomix.xml -o sdk-repomix.xml",
2525
"repomix:cli": "npx repomix --ignore sdk-repomix.xml -o cli-repomix.xml",

extensions/cli/src/asciiArt.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,27 @@ describe("asciiArt", () => {
2727
expect(result).toBe(CONTINUE_ASCII_ART);
2828
});
2929

30-
it("should return simple text version when terminal is too narrow", () => {
30+
it("should return CN ASCII art version when terminal is too narrow", () => {
3131
// Set process.stdout.columns to simulate narrow terminal
3232
process.stdout.columns = 60;
3333

3434
const result = getDisplayableAsciiArt();
3535

36-
expect(result).toContain("CONTINUE");
37-
// expect(result).toContain("v0.0.0-dev");
36+
expect(result).toContain("██████╗");
37+
expect(result).toContain("(alpha)");
3838
expect(result).not.toBe(CONTINUE_ASCII_ART);
3939
// Should be much shorter than the full ASCII art
4040
expect(result.length).toBeLessThan(CONTINUE_ASCII_ART.length / 2);
4141
});
4242

43-
it("should return simple text version when terminal is below threshold", () => {
43+
it("should return CN ASCII art version when terminal is below threshold", () => {
4444
// Test the edge case at exactly 74 columns (below our threshold of 75)
4545
process.stdout.columns = 74;
4646

4747
const result = getDisplayableAsciiArt();
4848

49-
expect(result).toContain("CONTINUE");
49+
expect(result).toContain("██████╗");
50+
expect(result).toContain("(alpha)");
5051
expect(result).not.toBe(CONTINUE_ASCII_ART);
5152
});
5253

extensions/cli/src/asciiArt.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@ ${mind.multiline(` ██████╗ ██████╗ ███╗
1212
██║ ██║ ██║██║╚██╗██║ ██║ ██║██║╚██╗██║██║ ██║██╔══╝
1313
╚██████╗╚██████╔╝██║ ╚████║ ██║ ██║██║ ╚████║╚██████╔╝███████╗
1414
╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝`)}
15-
${d("v" + getVersion())}`;
15+
${d("v" + getVersion() + " (alpha)")}`;
16+
17+
// ASCII art for just "CN" (first two letters)
18+
const CN_ASCII_ART = `
19+
${mind.multiline(` ██████╗███╗ ██╗
20+
██╔════╝████╗ ██║
21+
██║ ██╔██╗ ██║
22+
██║ ██║╚██╗██║
23+
╚██████╗██║ ╚████║
24+
╚═════╝╚═╝ ╚═══╝`)}
25+
${d("v" + getVersion() + " (alpha)")}`;
1626

1727
// Minimum terminal width required to display ASCII art properly
1828
const MIN_WIDTH_FOR_ASCII_ART = 75;
@@ -28,8 +38,8 @@ export function getDisplayableAsciiArt(): string {
2838
return CONTINUE_ASCII_ART;
2939
}
3040

31-
// If terminal is too narrow, just show a simple version
32-
return `\n${chalk.bold.blue("CONTINUE")} ${d("v" + getVersion())}\n`;
41+
// If terminal is too narrow, show just "CN" ASCII art
42+
return CN_ASCII_ART;
3343
}
3444

3545
export const CONTINUE_LOGO_ASCII_ART = `

extensions/cli/src/ui/components/MemoizedMessage.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ export const MemoizedMessage = memo<MemoizedMessageProps>(
2020
case "tool-start":
2121
return (
2222
<Box key={index} marginLeft={1} marginBottom={1}>
23-
<Text color="white">{message.content}</Text>
23+
{/* TODO: Change back to empty circle (○) with white color once we want to differentiate in-progress vs completed tool calls */}
24+
<Text color="green">
25+
<Text color="white"> {message.content}</Text>
26+
</Text>
2427
</Box>
2528
);
2629

@@ -87,7 +90,7 @@ export const MemoizedMessage = memo<MemoizedMessageProps>(
8790

8891
return (
8992
<Box key={index} marginLeft={1} marginBottom={1}>
90-
<Text color={isUser ? "green" : "magenta"}></Text>
93+
<Text color={isUser ? "green" : "white"}></Text>
9194
<Text> </Text>
9295
{isUser ? (
9396
<Text color="gray">{message.content}</Text>

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)