mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 17:27:54 +00:00
# 🚀 Sync Gemini CLI v0.2.1 - Major Feature Update (#483)
This commit is contained in:
@@ -124,18 +124,18 @@ describe('Color Utils', () => {
|
||||
|
||||
describe('CSS_NAME_TO_HEX_MAP', () => {
|
||||
it('should contain expected CSS color mappings', () => {
|
||||
expect(CSS_NAME_TO_HEX_MAP.darkkhaki).toBe('#bdb76b');
|
||||
expect(CSS_NAME_TO_HEX_MAP.coral).toBe('#ff7f50');
|
||||
expect(CSS_NAME_TO_HEX_MAP.teal).toBe('#008080');
|
||||
expect(CSS_NAME_TO_HEX_MAP.tomato).toBe('#ff6347');
|
||||
expect(CSS_NAME_TO_HEX_MAP.turquoise).toBe('#40e0d0');
|
||||
expect(CSS_NAME_TO_HEX_MAP['darkkhaki']).toBe('#bdb76b');
|
||||
expect(CSS_NAME_TO_HEX_MAP['coral']).toBe('#ff7f50');
|
||||
expect(CSS_NAME_TO_HEX_MAP['teal']).toBe('#008080');
|
||||
expect(CSS_NAME_TO_HEX_MAP['tomato']).toBe('#ff6347');
|
||||
expect(CSS_NAME_TO_HEX_MAP['turquoise']).toBe('#40e0d0');
|
||||
});
|
||||
|
||||
it('should not contain Ink-supported color names', () => {
|
||||
expect(CSS_NAME_TO_HEX_MAP.black).toBeUndefined();
|
||||
expect(CSS_NAME_TO_HEX_MAP.red).toBeUndefined();
|
||||
expect(CSS_NAME_TO_HEX_MAP.green).toBeUndefined();
|
||||
expect(CSS_NAME_TO_HEX_MAP.blue).toBeUndefined();
|
||||
expect(CSS_NAME_TO_HEX_MAP['black']).toBeUndefined();
|
||||
expect(CSS_NAME_TO_HEX_MAP['red']).toBeUndefined();
|
||||
expect(CSS_NAME_TO_HEX_MAP['green']).toBeUndefined();
|
||||
expect(CSS_NAME_TO_HEX_MAP['blue']).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
*/
|
||||
|
||||
// Patch: Unset NO_COLOR at the very top before any imports
|
||||
if (process.env.NO_COLOR !== undefined) {
|
||||
delete process.env.NO_COLOR;
|
||||
if (process.env['NO_COLOR'] !== undefined) {
|
||||
delete process.env['NO_COLOR'];
|
||||
}
|
||||
|
||||
import { describe, it, expect, beforeEach } from 'vitest';
|
||||
@@ -87,13 +87,13 @@ describe('ThemeManager', () => {
|
||||
});
|
||||
|
||||
it('should return NoColorTheme if NO_COLOR is set', () => {
|
||||
const original = process.env.NO_COLOR;
|
||||
process.env.NO_COLOR = '1';
|
||||
const original = process.env['NO_COLOR'];
|
||||
process.env['NO_COLOR'] = '1';
|
||||
expect(themeManager.getActiveTheme().name).toBe('NoColor');
|
||||
if (original === undefined) {
|
||||
delete process.env.NO_COLOR;
|
||||
delete process.env['NO_COLOR'];
|
||||
} else {
|
||||
process.env.NO_COLOR = original;
|
||||
process.env['NO_COLOR'] = original;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -129,7 +129,7 @@ class ThemeManager {
|
||||
* @returns The active theme.
|
||||
*/
|
||||
getActiveTheme(): Theme {
|
||||
if (process.env.NO_COLOR) {
|
||||
if (process.env['NO_COLOR']) {
|
||||
return NoColorTheme;
|
||||
}
|
||||
// Ensure the active theme is always valid (fall back to default if not)
|
||||
|
||||
Reference in New Issue
Block a user