mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-08-02 21:21:09 -07:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| da258412df | |||
| a9532b3ac4 | |||
| dba383ef3c | |||
| 31819197dd | |||
| 1f07e5b9e3 | |||
| 73da95c6c7 | |||
| c8d422986f | |||
| b3ff5454ab | |||
| 8b5102e55e |
@@ -57,7 +57,7 @@ they appear in the UI.
|
|||||||
| Show Shortcuts Hint | `ui.showShortcutsHint` | Show the "? for shortcuts" hint above the input. | `true` |
|
| Show Shortcuts Hint | `ui.showShortcutsHint` | Show the "? for shortcuts" hint above the input. | `true` |
|
||||||
| Hide Banner | `ui.hideBanner` | Hide the application banner | `false` |
|
| Hide Banner | `ui.hideBanner` | Hide the application banner | `false` |
|
||||||
| Hide Context Summary | `ui.hideContextSummary` | Hide the context summary (GEMINI.md, MCP servers) above the input. | `false` |
|
| Hide Context Summary | `ui.hideContextSummary` | Hide the context summary (GEMINI.md, MCP servers) above the input. | `false` |
|
||||||
| Hide CWD | `ui.footer.hideCWD` | Hide the current working directory in the footer. | `false` |
|
| Hide Workspace Path | `ui.footer.hideCWD` | Hide the workspace path in the footer. | `false` |
|
||||||
| Hide Sandbox Status | `ui.footer.hideSandboxStatus` | Hide the sandbox status indicator in the footer. | `false` |
|
| Hide Sandbox Status | `ui.footer.hideSandboxStatus` | Hide the sandbox status indicator in the footer. | `false` |
|
||||||
| Hide Model Info | `ui.footer.hideModelInfo` | Hide the model name and context usage in the footer. | `false` |
|
| Hide Model Info | `ui.footer.hideModelInfo` | Hide the model name and context usage in the footer. | `false` |
|
||||||
| Hide Context Window Percentage | `ui.footer.hideContextPercentage` | Hides the context window usage percentage. | `true` |
|
| Hide Context Window Percentage | `ui.footer.hideContextPercentage` | Hides the context window usage percentage. | `true` |
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ Slash commands provide meta-level control over the CLI itself.
|
|||||||
- On macOS, it requires `pbcopy`, and on Windows, it requires `clip`. These
|
- On macOS, it requires `pbcopy`, and on Windows, it requires `clip`. These
|
||||||
tools are typically pre-installed on their respective systems.
|
tools are typically pre-installed on their respective systems.
|
||||||
|
|
||||||
### `/directory` (or `/dir`)
|
### `/workspace` (or `/directory`, `/dir`)
|
||||||
|
|
||||||
- **Description:** Manage workspace directories for multi-directory support.
|
- **Description:** Manage workspace directories for multi-directory support.
|
||||||
- **Sub-commands:**
|
- **Sub-commands:**
|
||||||
@@ -123,13 +123,13 @@ Slash commands provide meta-level control over the CLI itself.
|
|||||||
- **Description:** Add a directory to the workspace. The path can be
|
- **Description:** Add a directory to the workspace. The path can be
|
||||||
absolute or relative to the current working directory. Moreover, the
|
absolute or relative to the current working directory. Moreover, the
|
||||||
reference from home directory is supported as well.
|
reference from home directory is supported as well.
|
||||||
- **Usage:** `/directory add <path1>,<path2>`
|
- **Usage:** `/workspace add <path1>,<path2>`
|
||||||
- **Note:** Disabled in restrictive sandbox profiles. If you're using that,
|
- **Note:** Disabled in restrictive sandbox profiles. If you're using that,
|
||||||
use `--include-directories` when starting the session instead.
|
use `--include-directories` when starting the session instead.
|
||||||
- **`show`**:
|
- **`show`**:
|
||||||
- **Description:** Display all directories added by `/directory add` and
|
- **Description:** Display all directories added by `/workspace add` and
|
||||||
`--include-directories`.
|
`--include-directories`.
|
||||||
- **Usage:** `/directory show`
|
- **Usage:** `/workspace show`
|
||||||
|
|
||||||
### `/docs`
|
### `/docs`
|
||||||
|
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ their corresponding top-level category object in your `settings.json` file.
|
|||||||
- **Default:** `true`
|
- **Default:** `true`
|
||||||
|
|
||||||
- **`ui.footer.hideCWD`** (boolean):
|
- **`ui.footer.hideCWD`** (boolean):
|
||||||
- **Description:** Hide the current working directory in the footer.
|
- **Description:** Hide the workspace path in the footer.
|
||||||
- **Default:** `false`
|
- **Default:** `false`
|
||||||
|
|
||||||
- **`ui.footer.hideSandboxStatus`** (boolean):
|
- **`ui.footer.hideSandboxStatus`** (boolean):
|
||||||
|
|||||||
@@ -1011,7 +1011,7 @@ gemini mcp add [options] <name> <commandOrUrl> [args...]
|
|||||||
|
|
||||||
**Options (flags):**
|
**Options (flags):**
|
||||||
|
|
||||||
- `-s, --scope`: Configuration scope (user or project). [default: "project"]
|
- `-s, --scope`: Configuration scope (user or workspace). [default: "workspace"]
|
||||||
- `-t, --transport`: Transport type (stdio, sse, http). [default: "stdio"]
|
- `-t, --transport`: Transport type (stdio, sse, http). [default: "stdio"]
|
||||||
- `-e, --env`: Set environment variables (e.g. -e KEY=value).
|
- `-e, --env`: Set environment variables (e.g. -e KEY=value).
|
||||||
- `-H, --header`: Set HTTP headers for SSE and HTTP transports (e.g. -H
|
- `-H, --header`: Set HTTP headers for SSE and HTTP transports (e.g. -H
|
||||||
@@ -1122,7 +1122,7 @@ gemini mcp remove <name>
|
|||||||
|
|
||||||
**Options (flags):**
|
**Options (flags):**
|
||||||
|
|
||||||
- `-s, --scope`: Configuration scope (user or project). [default: "project"]
|
- `-s, --scope`: Configuration scope (user or workspace). [default: "workspace"]
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ describe('mcp add command', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should add a stdio server to project settings', async () => {
|
it('should add a stdio server to workspace settings', async () => {
|
||||||
await parser.parseAsync(
|
await parser.parseAsync(
|
||||||
'add -e FOO=bar my-server /path/to/server arg1 arg2',
|
'add -e FOO=bar my-server /path/to/server arg1 arg2',
|
||||||
);
|
);
|
||||||
@@ -121,7 +121,7 @@ describe('mcp add command', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should add an http server to project settings', async () => {
|
it('should add an http server to workspace settings', async () => {
|
||||||
await parser.parseAsync(
|
await parser.parseAsync(
|
||||||
'add --transport http -H "Authorization: Bearer your-token" http-server https://example.com/mcp',
|
'add --transport http -H "Authorization: Bearer your-token" http-server https://example.com/mcp',
|
||||||
);
|
);
|
||||||
@@ -219,12 +219,12 @@ describe('mcp add command', () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('when in a project directory', () => {
|
describe('when in a workspace directory', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
setupMocks('/path/to/project', '/path/to/project');
|
setupMocks('/path/to/project', '/path/to/project');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should use project scope by default', async () => {
|
it('should use workspace scope by default', async () => {
|
||||||
await parser.parseAsync(`add ${serverName} ${command}`);
|
await parser.parseAsync(`add ${serverName} ${command}`);
|
||||||
expect(mockSetValue).toHaveBeenCalledWith(
|
expect(mockSetValue).toHaveBeenCalledWith(
|
||||||
SettingScope.Workspace,
|
SettingScope.Workspace,
|
||||||
@@ -233,7 +233,7 @@ describe('mcp add command', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should use project scope when --scope=project is used', async () => {
|
it('should support --scope=project as a compatibility alias', async () => {
|
||||||
await parser.parseAsync(`add --scope project ${serverName} ${command}`);
|
await parser.parseAsync(`add --scope project ${serverName} ${command}`);
|
||||||
expect(mockSetValue).toHaveBeenCalledWith(
|
expect(mockSetValue).toHaveBeenCalledWith(
|
||||||
SettingScope.Workspace,
|
SettingScope.Workspace,
|
||||||
@@ -252,12 +252,12 @@ describe('mcp add command', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when in a subdirectory of a project', () => {
|
describe('when in a subdirectory of a workspace', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
setupMocks('/path/to/project/subdir', '/path/to/project');
|
setupMocks('/path/to/project/subdir', '/path/to/project');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should use project scope by default', async () => {
|
it('should use workspace scope by default', async () => {
|
||||||
await parser.parseAsync(`add ${serverName} ${command}`);
|
await parser.parseAsync(`add ${serverName} ${command}`);
|
||||||
expect(mockSetValue).toHaveBeenCalledWith(
|
expect(mockSetValue).toHaveBeenCalledWith(
|
||||||
SettingScope.Workspace,
|
SettingScope.Workspace,
|
||||||
@@ -290,7 +290,7 @@ describe('mcp add command', () => {
|
|||||||
expect(mockSetValue).not.toHaveBeenCalled();
|
expect(mockSetValue).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show an error when --scope=project is used explicitly', async () => {
|
it('should show an error when --scope=project is used as a compatibility alias', async () => {
|
||||||
const mockProcessExit = vi
|
const mockProcessExit = vi
|
||||||
.spyOn(process, 'exit')
|
.spyOn(process, 'exit')
|
||||||
.mockImplementation((() => {
|
.mockImplementation((() => {
|
||||||
@@ -319,12 +319,12 @@ describe('mcp add command', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when in a subdirectory of home (not a project)', () => {
|
describe('when in a subdirectory of home (not a workspace)', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
setupMocks('/home/user/some/dir', '/home/user/some/dir');
|
setupMocks('/home/user/some/dir', '/home/user/some/dir');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should use project scope by default', async () => {
|
it('should use workspace scope by default', async () => {
|
||||||
await parser.parseAsync(`add ${serverName} ${command}`);
|
await parser.parseAsync(`add ${serverName} ${command}`);
|
||||||
expect(mockSetValue).toHaveBeenCalledWith(
|
expect(mockSetValue).toHaveBeenCalledWith(
|
||||||
SettingScope.Workspace,
|
SettingScope.Workspace,
|
||||||
@@ -347,12 +347,12 @@ describe('mcp add command', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when outside of home (not a project)', () => {
|
describe('when outside of home (not a workspace)', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
setupMocks('/tmp/foo', '/tmp/foo');
|
setupMocks('/tmp/foo', '/tmp/foo');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should use project scope by default', async () => {
|
it('should use workspace scope by default', async () => {
|
||||||
await parser.parseAsync(`add ${serverName} ${command}`);
|
await parser.parseAsync(`add ${serverName} ${command}`);
|
||||||
expect(mockSetValue).toHaveBeenCalledWith(
|
expect(mockSetValue).toHaveBeenCalledWith(
|
||||||
SettingScope.Workspace,
|
SettingScope.Workspace,
|
||||||
@@ -386,7 +386,7 @@ describe('mcp add command', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should update the existing server in the project scope', async () => {
|
it('should update the existing server in the workspace scope', async () => {
|
||||||
await parser.parseAsync(
|
await parser.parseAsync(
|
||||||
`add ${serverName} ${updatedCommand} ${updatedArgs.join(' ')}`,
|
`add ${serverName} ${updatedCommand} ${updatedArgs.join(' ')}`,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -38,10 +38,12 @@ async function addMcpServer(
|
|||||||
excludeTools,
|
excludeTools,
|
||||||
} = options;
|
} = options;
|
||||||
|
|
||||||
|
const displayScope = scope === 'user' ? 'user' : 'workspace';
|
||||||
|
|
||||||
const settings = loadSettings(process.cwd());
|
const settings = loadSettings(process.cwd());
|
||||||
const inHome = settings.workspace.path === settings.user.path;
|
const inHome = settings.workspace.path === settings.user.path;
|
||||||
|
|
||||||
if (scope === 'project' && inHome) {
|
if (displayScope === 'workspace' && inHome) {
|
||||||
debugLogger.error(
|
debugLogger.error(
|
||||||
'Error: Please use --scope user to edit settings in the home directory.',
|
'Error: Please use --scope user to edit settings in the home directory.',
|
||||||
);
|
);
|
||||||
@@ -120,7 +122,7 @@ async function addMcpServer(
|
|||||||
const isExistingServer = !!mcpServers[name];
|
const isExistingServer = !!mcpServers[name];
|
||||||
if (isExistingServer) {
|
if (isExistingServer) {
|
||||||
debugLogger.log(
|
debugLogger.log(
|
||||||
`MCP server "${name}" is already configured within ${scope} settings.`,
|
`MCP server "${name}" is already configured within ${displayScope} settings.`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,10 +131,12 @@ async function addMcpServer(
|
|||||||
settings.setValue(settingsScope, 'mcpServers', mcpServers);
|
settings.setValue(settingsScope, 'mcpServers', mcpServers);
|
||||||
|
|
||||||
if (isExistingServer) {
|
if (isExistingServer) {
|
||||||
debugLogger.log(`MCP server "${name}" updated in ${scope} settings.`);
|
debugLogger.log(
|
||||||
|
`MCP server "${name}" updated in ${displayScope} settings.`,
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
debugLogger.log(
|
debugLogger.log(
|
||||||
`MCP server "${name}" added to ${scope} settings. (${transport})`,
|
`MCP server "${name}" added to ${displayScope} settings. (${transport})`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,10 +163,10 @@ export const addCommand: CommandModule = {
|
|||||||
})
|
})
|
||||||
.option('scope', {
|
.option('scope', {
|
||||||
alias: 's',
|
alias: 's',
|
||||||
describe: 'Configuration scope (user or project)',
|
describe: 'Configuration scope (user or workspace)',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: 'project',
|
default: 'workspace',
|
||||||
choices: ['user', 'project'],
|
choices: ['user', 'workspace', 'project'],
|
||||||
})
|
})
|
||||||
.option('transport', {
|
.option('transport', {
|
||||||
alias: ['t', 'type'],
|
alias: ['t', 'type'],
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ describe('mcp remove command', () => {
|
|||||||
parser = yargsInstance;
|
parser = yargsInstance;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should remove a server from project settings', async () => {
|
it('should remove a server from workspace settings', async () => {
|
||||||
await parser.parseAsync('remove test-server');
|
await parser.parseAsync('remove test-server');
|
||||||
|
|
||||||
expect(mockSetValue).toHaveBeenCalledWith(
|
expect(mockSetValue).toHaveBeenCalledWith(
|
||||||
@@ -99,7 +99,7 @@ describe('mcp remove command', () => {
|
|||||||
|
|
||||||
expect(mockSetValue).not.toHaveBeenCalled();
|
expect(mockSetValue).not.toHaveBeenCalled();
|
||||||
expect(debugLogSpy).toHaveBeenCalledWith(
|
expect(debugLogSpy).toHaveBeenCalledWith(
|
||||||
'Server "non-existent-server" not found in project settings.',
|
'Server "non-existent-server" not found in workspace settings.',
|
||||||
);
|
);
|
||||||
debugLogSpy.mockRestore();
|
debugLogSpy.mockRestore();
|
||||||
});
|
});
|
||||||
@@ -159,7 +159,7 @@ describe('mcp remove command', () => {
|
|||||||
expect(updatedContent).not.toContain('"server-to-remove"');
|
expect(updatedContent).not.toContain('"server-to-remove"');
|
||||||
|
|
||||||
expect(debugLogSpy).toHaveBeenCalledWith(
|
expect(debugLogSpy).toHaveBeenCalledWith(
|
||||||
'Server "server-to-remove" removed from project settings.',
|
'Server "server-to-remove" removed from workspace settings.',
|
||||||
);
|
);
|
||||||
|
|
||||||
debugLogSpy.mockRestore();
|
debugLogSpy.mockRestore();
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ async function removeMcpServer(
|
|||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const { scope } = options;
|
const { scope } = options;
|
||||||
|
const displayScope = scope === 'user' ? 'user' : 'workspace';
|
||||||
const settingsScope =
|
const settingsScope =
|
||||||
scope === 'user' ? SettingScope.User : SettingScope.Workspace;
|
scope === 'user' ? SettingScope.User : SettingScope.Workspace;
|
||||||
const settings = loadSettings();
|
const settings = loadSettings();
|
||||||
@@ -25,7 +26,7 @@ async function removeMcpServer(
|
|||||||
const mcpServers = existingSettings.mcpServers || {};
|
const mcpServers = existingSettings.mcpServers || {};
|
||||||
|
|
||||||
if (!mcpServers[name]) {
|
if (!mcpServers[name]) {
|
||||||
debugLogger.log(`Server "${name}" not found in ${scope} settings.`);
|
debugLogger.log(`Server "${name}" not found in ${displayScope} settings.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,7 +34,7 @@ async function removeMcpServer(
|
|||||||
|
|
||||||
settings.setValue(settingsScope, 'mcpServers', mcpServers);
|
settings.setValue(settingsScope, 'mcpServers', mcpServers);
|
||||||
|
|
||||||
debugLogger.log(`Server "${name}" removed from ${scope} settings.`);
|
debugLogger.log(`Server "${name}" removed from ${displayScope} settings.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const removeCommand: CommandModule = {
|
export const removeCommand: CommandModule = {
|
||||||
@@ -49,10 +50,10 @@ export const removeCommand: CommandModule = {
|
|||||||
})
|
})
|
||||||
.option('scope', {
|
.option('scope', {
|
||||||
alias: 's',
|
alias: 's',
|
||||||
describe: 'Configuration scope (user or project)',
|
describe: 'Configuration scope (user or workspace)',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: 'project',
|
default: 'workspace',
|
||||||
choices: ['user', 'project'],
|
choices: ['user', 'workspace', 'project'],
|
||||||
}),
|
}),
|
||||||
handler: async (argv) => {
|
handler: async (argv) => {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import type { MergedSettings } from './settings.js';
|
|||||||
export const ALL_ITEMS = [
|
export const ALL_ITEMS = [
|
||||||
{
|
{
|
||||||
id: 'workspace',
|
id: 'workspace',
|
||||||
header: 'workspace (/directory)',
|
header: 'workspace',
|
||||||
description: 'Current working directory',
|
description: 'Current workspace path',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'git-branch',
|
id: 'git-branch',
|
||||||
|
|||||||
@@ -588,11 +588,11 @@ const SETTINGS_SCHEMA = {
|
|||||||
},
|
},
|
||||||
hideCWD: {
|
hideCWD: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
label: 'Hide CWD',
|
label: 'Hide Workspace Path',
|
||||||
category: 'UI',
|
category: 'UI',
|
||||||
requiresRestart: false,
|
requiresRestart: false,
|
||||||
default: false,
|
default: false,
|
||||||
description: 'Hide the current working directory in the footer.',
|
description: 'Hide the workspace path in the footer.',
|
||||||
showInDialog: true,
|
showInDialog: true,
|
||||||
},
|
},
|
||||||
hideSandboxStatus: {
|
hideSandboxStatus: {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import { compressCommand } from '../ui/commands/compressCommand.js';
|
|||||||
import { copyCommand } from '../ui/commands/copyCommand.js';
|
import { copyCommand } from '../ui/commands/copyCommand.js';
|
||||||
import { corgiCommand } from '../ui/commands/corgiCommand.js';
|
import { corgiCommand } from '../ui/commands/corgiCommand.js';
|
||||||
import { docsCommand } from '../ui/commands/docsCommand.js';
|
import { docsCommand } from '../ui/commands/docsCommand.js';
|
||||||
import { directoryCommand } from '../ui/commands/directoryCommand.js';
|
import { workspaceCommand } from '../ui/commands/workspaceCommand.js';
|
||||||
import { editorCommand } from '../ui/commands/editorCommand.js';
|
import { editorCommand } from '../ui/commands/editorCommand.js';
|
||||||
import { extensionsCommand } from '../ui/commands/extensionsCommand.js';
|
import { extensionsCommand } from '../ui/commands/extensionsCommand.js';
|
||||||
import { footerCommand } from '../ui/commands/footerCommand.js';
|
import { footerCommand } from '../ui/commands/footerCommand.js';
|
||||||
@@ -131,7 +131,7 @@ export class BuiltinCommandLoader implements ICommandLoader {
|
|||||||
copyCommand,
|
copyCommand,
|
||||||
corgiCommand,
|
corgiCommand,
|
||||||
docsCommand,
|
docsCommand,
|
||||||
directoryCommand,
|
workspaceCommand,
|
||||||
editorCommand,
|
editorCommand,
|
||||||
...(this.config?.getExtensionsEnabled() === false
|
...(this.config?.getExtensionsEnabled() === false
|
||||||
? [
|
? [
|
||||||
|
|||||||
+8
-10
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
|
import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
|
||||||
import type { Mock } from 'vitest';
|
import type { Mock } from 'vitest';
|
||||||
import { directoryCommand } from './directoryCommand.js';
|
import { workspaceCommand } from './workspaceCommand.js';
|
||||||
import {
|
import {
|
||||||
expandHomeDir,
|
expandHomeDir,
|
||||||
getDirectorySuggestions,
|
getDirectorySuggestions,
|
||||||
@@ -38,14 +38,14 @@ vi.mock('../utils/directoryUtils.js', async (importOriginal) => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('directoryCommand', () => {
|
describe('workspaceCommand', () => {
|
||||||
let mockContext: CommandContext;
|
let mockContext: CommandContext;
|
||||||
let mockConfig: Config;
|
let mockConfig: Config;
|
||||||
let mockWorkspaceContext: WorkspaceContext;
|
let mockWorkspaceContext: WorkspaceContext;
|
||||||
const addCommand = directoryCommand.subCommands?.find(
|
const addCommand = workspaceCommand.subCommands?.find(
|
||||||
(c) => c.name === 'add',
|
(c) => c.name === 'add',
|
||||||
);
|
);
|
||||||
const showCommand = directoryCommand.subCommands?.find(
|
const showCommand = workspaceCommand.subCommands?.find(
|
||||||
(c) => c.name === 'show',
|
(c) => c.name === 'show',
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ describe('directoryCommand', () => {
|
|||||||
type: 'message',
|
type: 'message',
|
||||||
messageType: 'error',
|
messageType: 'error',
|
||||||
content:
|
content:
|
||||||
'The /directory add command is not supported in restrictive sandbox profiles. Please use --include-directories when starting the session instead.',
|
'The /workspace add command is not supported in restrictive sandbox profiles. Please use --include-directories when starting the session instead.',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -343,7 +343,6 @@ describe('directoryCommand', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
vi.spyOn(trustedFolders, 'isFolderTrustEnabled').mockReturnValue(true);
|
vi.spyOn(trustedFolders, 'isFolderTrustEnabled').mockReturnValue(true);
|
||||||
// isWorkspaceTrusted is no longer checked, so we don't need to mock it returning true
|
|
||||||
mockIsPathTrusted = vi.fn();
|
mockIsPathTrusted = vi.fn();
|
||||||
const mockLoadedFolders = {
|
const mockLoadedFolders = {
|
||||||
isPathTrusted: mockIsPathTrusted,
|
isPathTrusted: mockIsPathTrusted,
|
||||||
@@ -375,7 +374,7 @@ describe('directoryCommand', () => {
|
|||||||
|
|
||||||
it('should return a custom dialog for an explicitly untrusted directory (upgrade flow)', async () => {
|
it('should return a custom dialog for an explicitly untrusted directory (upgrade flow)', async () => {
|
||||||
if (!addCommand?.action) throw new Error('No action');
|
if (!addCommand?.action) throw new Error('No action');
|
||||||
mockIsPathTrusted.mockReturnValue(false); // DO_NOT_TRUST
|
mockIsPathTrusted.mockReturnValue(false);
|
||||||
const newPath = path.resolve('/home/user/untrusted-project');
|
const newPath = path.resolve('/home/user/untrusted-project');
|
||||||
|
|
||||||
const result = await addCommand.action(mockContext, newPath);
|
const result = await addCommand.action(mockContext, newPath);
|
||||||
@@ -384,7 +383,7 @@ describe('directoryCommand', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
type: 'custom_dialog',
|
type: 'custom_dialog',
|
||||||
component: expect.objectContaining({
|
component: expect.objectContaining({
|
||||||
type: expect.any(Function), // React component for MultiFolderTrustDialog
|
type: expect.any(Function),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@@ -407,7 +406,7 @@ describe('directoryCommand', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
type: 'custom_dialog',
|
type: 'custom_dialog',
|
||||||
component: expect.objectContaining({
|
component: expect.objectContaining({
|
||||||
type: expect.any(Function), // React component for MultiFolderTrustDialog
|
type: expect.any(Function),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@@ -421,7 +420,6 @@ describe('directoryCommand', () => {
|
|||||||
|
|
||||||
it('should prompt for directory even if workspace is untrusted', async () => {
|
it('should prompt for directory even if workspace is untrusted', async () => {
|
||||||
if (!addCommand?.action) throw new Error('No action');
|
if (!addCommand?.action) throw new Error('No action');
|
||||||
// Even if workspace is untrusted, we should still check directory trust
|
|
||||||
vi.spyOn(trustedFolders, 'isWorkspaceTrusted').mockReturnValue({
|
vi.spyOn(trustedFolders, 'isWorkspaceTrusted').mockReturnValue({
|
||||||
isTrusted: false,
|
isTrusted: false,
|
||||||
source: 'file',
|
source: 'file',
|
||||||
+4
-4
@@ -77,9 +77,9 @@ async function finishAddingDirectories(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const directoryCommand: SlashCommand = {
|
export const workspaceCommand: SlashCommand = {
|
||||||
name: 'directory',
|
name: 'workspace',
|
||||||
altNames: ['dir'],
|
altNames: ['directory', 'dir'],
|
||||||
description: 'Manage workspace directories',
|
description: 'Manage workspace directories',
|
||||||
kind: CommandKind.BUILT_IN,
|
kind: CommandKind.BUILT_IN,
|
||||||
subCommands: [
|
subCommands: [
|
||||||
@@ -156,7 +156,7 @@ export const directoryCommand: SlashCommand = {
|
|||||||
type: 'message' as const,
|
type: 'message' as const,
|
||||||
messageType: 'error' as const,
|
messageType: 'error' as const,
|
||||||
content:
|
content:
|
||||||
'The /directory add command is not supported in restrictive sandbox profiles. Please use --include-directories when starting the session instead.',
|
'The /workspace add command is not supported in restrictive sandbox profiles. Please use --include-directories when starting the session instead.',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -755,7 +755,7 @@ describe('<Footer />', () => {
|
|||||||
|
|
||||||
const output = lastFrame();
|
const output = lastFrame();
|
||||||
const modelIdx = output.indexOf('/model');
|
const modelIdx = output.indexOf('/model');
|
||||||
const cwdIdx = output.indexOf('workspace (/directory)');
|
const cwdIdx = output.indexOf('workspace');
|
||||||
expect(modelIdx).toBeLessThan(cwdIdx);
|
expect(modelIdx).toBeLessThan(cwdIdx);
|
||||||
unmount();
|
unmount();
|
||||||
});
|
});
|
||||||
@@ -786,7 +786,7 @@ describe('<Footer />', () => {
|
|||||||
const output = lastFrame();
|
const output = lastFrame();
|
||||||
expect(output).toBeDefined();
|
expect(output).toBeDefined();
|
||||||
// Headers should be present
|
// Headers should be present
|
||||||
expect(output).toContain('workspace (/directory)');
|
expect(output).toContain('workspace');
|
||||||
expect(output).toContain('branch');
|
expect(output).toContain('branch');
|
||||||
expect(output).toContain('sandbox');
|
expect(output).toContain('sandbox');
|
||||||
expect(output).toContain('/model');
|
expect(output).toContain('/model');
|
||||||
@@ -842,7 +842,7 @@ describe('<Footer />', () => {
|
|||||||
const output = lastFrame();
|
const output = lastFrame();
|
||||||
expect(output).toBeDefined();
|
expect(output).toBeDefined();
|
||||||
expect(output).not.toContain('branch');
|
expect(output).not.toContain('branch');
|
||||||
expect(output).toContain('workspace (/directory)');
|
expect(output).toContain('workspace');
|
||||||
expect(output).toContain('/model');
|
expect(output).toContain('/model');
|
||||||
unmount();
|
unmount();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ describe('<FooterConfigDialog />', () => {
|
|||||||
await waitUntilReady();
|
await waitUntilReady();
|
||||||
|
|
||||||
// By default labels are on
|
// By default labels are on
|
||||||
expect(lastFrame()).toContain('workspace (/directory)');
|
expect(lastFrame()).toContain('workspace');
|
||||||
expect(lastFrame()).toContain('sandbox');
|
expect(lastFrame()).toContain('sandbox');
|
||||||
expect(lastFrame()).toContain('/model');
|
expect(lastFrame()).toContain('/model');
|
||||||
|
|
||||||
@@ -248,12 +248,6 @@ describe('<FooterConfigDialog />', () => {
|
|||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(lastFrame()).toMatch(/> \[ \] Show footer labels/);
|
expect(lastFrame()).toMatch(/> \[ \] Show footer labels/);
|
||||||
// The headers should no longer be in the preview
|
|
||||||
expect(lastFrame()).not.toContain('workspace (/directory)');
|
|
||||||
expect(lastFrame()).not.toContain('/model');
|
|
||||||
|
|
||||||
// We can't strictly search for "sandbox" because the menu item also says "sandbox".
|
|
||||||
// Let's assert that the spacer dots are now present in the preview instead.
|
|
||||||
const previewLine =
|
const previewLine =
|
||||||
lastFrame()
|
lastFrame()
|
||||||
.split('\n')
|
.split('\n')
|
||||||
@@ -262,6 +256,9 @@ describe('<FooterConfigDialog />', () => {
|
|||||||
lastFrame().split('\n')[
|
lastFrame().split('\n')[
|
||||||
lastFrame().split('\n').indexOf(previewLine) + 1
|
lastFrame().split('\n').indexOf(previewLine) + 1
|
||||||
] || '';
|
] || '';
|
||||||
|
|
||||||
|
// The preview should render values only when labels are hidden.
|
||||||
|
expect(nextLine).not.toContain('/model');
|
||||||
expect(nextLine).toContain('·');
|
expect(nextLine).toContain('·');
|
||||||
expect(nextLine).toContain('~/project/path');
|
expect(nextLine).toContain('~/project/path');
|
||||||
expect(nextLine).toContain('docker');
|
expect(nextLine).toContain('docker');
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||||
|
|
||||||
exports[`<Footer /> > displays "Limit reached" message when remaining is 0 1`] = `
|
exports[`<Footer /> > displays "Limit reached" message when remaining is 0 1`] = `
|
||||||
" workspace (/directory) sandbox /model /stats
|
" workspace sandbox /model /stats
|
||||||
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro limit reached
|
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro limit reached
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`<Footer /> > displays the usage indicator when usage is low 1`] = `
|
exports[`<Footer /> > displays the usage indicator when usage is low 1`] = `
|
||||||
" workspace (/directory) sandbox /model /stats
|
" workspace sandbox /model /stats
|
||||||
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 85%
|
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 85%
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders complete footer in narrow terminal (baseline narrow) > complete-footer-narrow 1`] = `
|
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders complete footer in narrow terminal (baseline narrow) > complete-footer-narrow 1`] = `
|
||||||
" workspace (/directory) sandbox /model context
|
" workspace sandbox /model context
|
||||||
...me/more/directories/to/make/it/long no sandbox gemini-pro 14%
|
...me/more/directories/to/make/it/long no sandbox gemini-pro 14%
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders complete footer with all sections visible (baseline) > complete-footer-wide 1`] = `
|
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders complete footer with all sections visible (baseline) > complete-footer-wide 1`] = `
|
||||||
" workspace (/directory) sandbox /model context
|
" workspace sandbox /model context
|
||||||
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 14% used
|
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 14% used
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
@@ -33,13 +33,13 @@ exports[`<Footer /> > footer configuration filtering (golden snapshots) > render
|
|||||||
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with all optional sections hidden (minimal footer) > footer-minimal 1`] = `""`;
|
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with all optional sections hidden (minimal footer) > footer-minimal 1`] = `""`;
|
||||||
|
|
||||||
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with only model info hidden (partial filtering) > footer-no-model 1`] = `
|
exports[`<Footer /> > footer configuration filtering (golden snapshots) > renders footer with only model info hidden (partial filtering) > footer-no-model 1`] = `
|
||||||
" workspace (/directory) sandbox
|
" workspace sandbox
|
||||||
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox
|
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`<Footer /> > hides the usage indicator when usage is not near limit 1`] = `
|
exports[`<Footer /> > hides the usage indicator when usage is not near limit 1`] = `
|
||||||
" workspace (/directory) sandbox /model /stats
|
" workspace sandbox /model /stats
|
||||||
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 15%
|
~/project/foo/bar/and/some/more/directories/to/make/it/long no sandbox gemini-pro 15%
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|||||||
+10
-10
@@ -22,7 +22,7 @@
|
|||||||
<text x="72" y="104" fill="#ffffff" textLength="90" lengthAdjust="spacingAndGlyphs"> workspace</text>
|
<text x="72" y="104" fill="#ffffff" textLength="90" lengthAdjust="spacingAndGlyphs"> workspace</text>
|
||||||
<text x="891" y="104" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="891" y="104" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="0" y="121" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="0" y="121" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="45" y="121" fill="#afafaf" textLength="234" lengthAdjust="spacingAndGlyphs"> Current working directory</text>
|
<text x="45" y="121" fill="#afafaf" textLength="207" lengthAdjust="spacingAndGlyphs"> Current workspace path</text>
|
||||||
<text x="891" y="121" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="891" y="121" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="0" y="138" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="0" y="138" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="45" y="138" fill="#d7ffd7" textLength="27" lengthAdjust="spacingAndGlyphs">[✓]</text>
|
<text x="45" y="138" fill="#d7ffd7" textLength="27" lengthAdjust="spacingAndGlyphs">[✓]</text>
|
||||||
@@ -124,11 +124,11 @@
|
|||||||
<text x="891" y="580" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="891" y="580" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="0" y="597" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="0" y="597" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="27" y="597" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="27" y="597" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="45" y="597" fill="#afafaf" textLength="198" lengthAdjust="spacingAndGlyphs">workspace (/directory)</text>
|
<text x="45" y="597" fill="#afafaf" textLength="81" lengthAdjust="spacingAndGlyphs">workspace</text>
|
||||||
<text x="297" y="597" fill="#afafaf" textLength="54" lengthAdjust="spacingAndGlyphs">branch</text>
|
<text x="234" y="597" fill="#afafaf" textLength="54" lengthAdjust="spacingAndGlyphs">branch</text>
|
||||||
<text x="405" y="597" fill="#afafaf" textLength="63" lengthAdjust="spacingAndGlyphs">sandbox</text>
|
<text x="360" y="597" fill="#afafaf" textLength="63" lengthAdjust="spacingAndGlyphs">sandbox</text>
|
||||||
<text x="513" y="597" fill="#afafaf" textLength="54" lengthAdjust="spacingAndGlyphs">/model</text>
|
<text x="486" y="597" fill="#afafaf" textLength="54" lengthAdjust="spacingAndGlyphs">/model</text>
|
||||||
<text x="693" y="597" fill="#afafaf" textLength="54" lengthAdjust="spacingAndGlyphs">/stats</text>
|
<text x="684" y="597" fill="#afafaf" textLength="54" lengthAdjust="spacingAndGlyphs">/stats</text>
|
||||||
<rect x="801" y="595" width="36" height="17" fill="#001a00" />
|
<rect x="801" y="595" width="36" height="17" fill="#001a00" />
|
||||||
<text x="801" y="597" fill="#ffffff" textLength="36" lengthAdjust="spacingAndGlyphs">diff</text>
|
<text x="801" y="597" fill="#ffffff" textLength="36" lengthAdjust="spacingAndGlyphs">diff</text>
|
||||||
<rect x="837" y="595" width="18" height="17" fill="#001a00" />
|
<rect x="837" y="595" width="18" height="17" fill="#001a00" />
|
||||||
@@ -137,10 +137,10 @@
|
|||||||
<text x="0" y="614" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="0" y="614" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="27" y="614" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="27" y="614" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="45" y="614" fill="#ffffff" textLength="126" lengthAdjust="spacingAndGlyphs">~/project/path</text>
|
<text x="45" y="614" fill="#ffffff" textLength="126" lengthAdjust="spacingAndGlyphs">~/project/path</text>
|
||||||
<text x="297" y="614" fill="#ffffff" textLength="36" lengthAdjust="spacingAndGlyphs">main</text>
|
<text x="234" y="614" fill="#ffffff" textLength="36" lengthAdjust="spacingAndGlyphs">main</text>
|
||||||
<text x="405" y="614" fill="#00cd00" textLength="54" lengthAdjust="spacingAndGlyphs">docker</text>
|
<text x="360" y="614" fill="#00cd00" textLength="54" lengthAdjust="spacingAndGlyphs">docker</text>
|
||||||
<text x="513" y="614" fill="#ffffff" textLength="126" lengthAdjust="spacingAndGlyphs">gemini-2.5-pro</text>
|
<text x="486" y="614" fill="#ffffff" textLength="126" lengthAdjust="spacingAndGlyphs">gemini-2.5-pro</text>
|
||||||
<text x="693" y="614" fill="#ffffff" textLength="27" lengthAdjust="spacingAndGlyphs">97%</text>
|
<text x="684" y="614" fill="#ffffff" textLength="27" lengthAdjust="spacingAndGlyphs">97%</text>
|
||||||
<rect x="801" y="612" width="27" height="17" fill="#001a00" />
|
<rect x="801" y="612" width="27" height="17" fill="#001a00" />
|
||||||
<text x="801" y="614" fill="#d7ffd7" textLength="27" lengthAdjust="spacingAndGlyphs">+12</text>
|
<text x="801" y="614" fill="#d7ffd7" textLength="27" lengthAdjust="spacingAndGlyphs">+12</text>
|
||||||
<rect x="828" y="612" width="9" height="17" fill="#001a00" />
|
<rect x="828" y="612" width="9" height="17" fill="#001a00" />
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
+12
-12
@@ -29,9 +29,9 @@
|
|||||||
<text x="891" y="104" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="891" y="104" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="0" y="121" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="0" y="121" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<rect x="27" y="119" width="18" height="17" fill="#001a00" />
|
<rect x="27" y="119" width="18" height="17" fill="#001a00" />
|
||||||
<rect x="45" y="119" width="234" height="17" fill="#001a00" />
|
<rect x="45" y="119" width="207" height="17" fill="#001a00" />
|
||||||
<text x="45" y="121" fill="#afafaf" textLength="234" lengthAdjust="spacingAndGlyphs"> Current working directory</text>
|
<text x="45" y="121" fill="#afafaf" textLength="207" lengthAdjust="spacingAndGlyphs"> Current workspace path</text>
|
||||||
<rect x="279" y="119" width="594" height="17" fill="#001a00" />
|
<rect x="252" y="119" width="621" height="17" fill="#001a00" />
|
||||||
<text x="891" y="121" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="891" y="121" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="0" y="138" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="0" y="138" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="45" y="138" fill="#d7ffd7" textLength="27" lengthAdjust="spacingAndGlyphs">[✓]</text>
|
<text x="45" y="138" fill="#d7ffd7" textLength="27" lengthAdjust="spacingAndGlyphs">[✓]</text>
|
||||||
@@ -124,11 +124,12 @@
|
|||||||
<text x="891" y="580" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="891" y="580" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="0" y="597" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="0" y="597" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="27" y="597" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="27" y="597" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<rect x="45" y="595" width="198" height="17" fill="#001a00" />
|
<rect x="45" y="595" width="81" height="17" fill="#001a00" />
|
||||||
<text x="45" y="597" fill="#ffffff" textLength="198" lengthAdjust="spacingAndGlyphs">workspace (/directory)</text>
|
<text x="45" y="597" fill="#ffffff" textLength="81" lengthAdjust="spacingAndGlyphs">workspace</text>
|
||||||
<text x="324" y="597" fill="#afafaf" textLength="54" lengthAdjust="spacingAndGlyphs">branch</text>
|
<rect x="126" y="595" width="45" height="17" fill="#001a00" />
|
||||||
<text x="459" y="597" fill="#afafaf" textLength="63" lengthAdjust="spacingAndGlyphs">sandbox</text>
|
<text x="270" y="597" fill="#afafaf" textLength="54" lengthAdjust="spacingAndGlyphs">branch</text>
|
||||||
<text x="594" y="597" fill="#afafaf" textLength="54" lengthAdjust="spacingAndGlyphs">/model</text>
|
<text x="423" y="597" fill="#afafaf" textLength="63" lengthAdjust="spacingAndGlyphs">sandbox</text>
|
||||||
|
<text x="576" y="597" fill="#afafaf" textLength="54" lengthAdjust="spacingAndGlyphs">/model</text>
|
||||||
<text x="801" y="597" fill="#afafaf" textLength="54" lengthAdjust="spacingAndGlyphs">/stats</text>
|
<text x="801" y="597" fill="#afafaf" textLength="54" lengthAdjust="spacingAndGlyphs">/stats</text>
|
||||||
<text x="864" y="597" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="864" y="597" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="891" y="597" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="891" y="597" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
@@ -136,10 +137,9 @@
|
|||||||
<text x="27" y="614" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="27" y="614" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<rect x="45" y="612" width="126" height="17" fill="#001a00" />
|
<rect x="45" y="612" width="126" height="17" fill="#001a00" />
|
||||||
<text x="45" y="614" fill="#ffffff" textLength="126" lengthAdjust="spacingAndGlyphs">~/project/path</text>
|
<text x="45" y="614" fill="#ffffff" textLength="126" lengthAdjust="spacingAndGlyphs">~/project/path</text>
|
||||||
<rect x="171" y="612" width="72" height="17" fill="#001a00" />
|
<text x="270" y="614" fill="#ffffff" textLength="36" lengthAdjust="spacingAndGlyphs">main</text>
|
||||||
<text x="324" y="614" fill="#ffffff" textLength="36" lengthAdjust="spacingAndGlyphs">main</text>
|
<text x="423" y="614" fill="#00cd00" textLength="54" lengthAdjust="spacingAndGlyphs">docker</text>
|
||||||
<text x="459" y="614" fill="#00cd00" textLength="54" lengthAdjust="spacingAndGlyphs">docker</text>
|
<text x="576" y="614" fill="#ffffff" textLength="126" lengthAdjust="spacingAndGlyphs">gemini-2.5-pro</text>
|
||||||
<text x="594" y="614" fill="#ffffff" textLength="126" lengthAdjust="spacingAndGlyphs">gemini-2.5-pro</text>
|
|
||||||
<text x="801" y="614" fill="#ffffff" textLength="27" lengthAdjust="spacingAndGlyphs">97%</text>
|
<text x="801" y="614" fill="#ffffff" textLength="27" lengthAdjust="spacingAndGlyphs">97%</text>
|
||||||
<text x="864" y="614" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="864" y="614" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="891" y="614" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="891" y="614" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
+1
-1
@@ -22,7 +22,7 @@
|
|||||||
<text x="72" y="104" fill="#ffffff" textLength="90" lengthAdjust="spacingAndGlyphs"> workspace</text>
|
<text x="72" y="104" fill="#ffffff" textLength="90" lengthAdjust="spacingAndGlyphs"> workspace</text>
|
||||||
<text x="891" y="104" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="891" y="104" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="0" y="121" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="0" y="121" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="45" y="121" fill="#afafaf" textLength="234" lengthAdjust="spacingAndGlyphs"> Current working directory</text>
|
<text x="45" y="121" fill="#afafaf" textLength="207" lengthAdjust="spacingAndGlyphs"> Current workspace path</text>
|
||||||
<text x="891" y="121" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="891" y="121" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="0" y="138" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
<text x="0" y="138" fill="#333333" textLength="9" lengthAdjust="spacingAndGlyphs">│</text>
|
||||||
<text x="45" y="138" fill="#d7ffd7" textLength="27" lengthAdjust="spacingAndGlyphs">[✓]</text>
|
<text x="45" y="138" fill="#d7ffd7" textLength="27" lengthAdjust="spacingAndGlyphs">[✓]</text>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -8,7 +8,7 @@ exports[`<FooterConfigDialog /> > highlights the active item in the preview 1`]
|
|||||||
│ Select which items to display in the footer. │
|
│ Select which items to display in the footer. │
|
||||||
│ │
|
│ │
|
||||||
│ [✓] workspace │
|
│ [✓] workspace │
|
||||||
│ Current working directory │
|
│ Current workspace path │
|
||||||
│ [✓] git-branch │
|
│ [✓] git-branch │
|
||||||
│ Current git branch name (not shown when unavailable) │
|
│ Current git branch name (not shown when unavailable) │
|
||||||
│ [✓] sandbox │
|
│ [✓] sandbox │
|
||||||
@@ -36,8 +36,8 @@ exports[`<FooterConfigDialog /> > highlights the active item in the preview 1`]
|
|||||||
│ │
|
│ │
|
||||||
│ ┌────────────────────────────────────────────────────────────────────────────────────────────┐ │
|
│ ┌────────────────────────────────────────────────────────────────────────────────────────────┐ │
|
||||||
│ │ Preview: │ │
|
│ │ Preview: │ │
|
||||||
│ │ workspace (/directory) branch sandbox /model /stats diff │ │
|
│ │ workspace branch sandbox /model /stats diff │ │
|
||||||
│ │ ~/project/path main docker gemini-2.5-pro 97% +12 -4 │ │
|
│ │ ~/project/path main docker gemini-2.5-pro 97% +12 -4 │ │
|
||||||
│ └────────────────────────────────────────────────────────────────────────────────────────────┘ │
|
│ └────────────────────────────────────────────────────────────────────────────────────────────┘ │
|
||||||
│ │
|
│ │
|
||||||
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||||
@@ -51,7 +51,7 @@ exports[`<FooterConfigDialog /> > renders correctly with default settings 1`] =
|
|||||||
│ Select which items to display in the footer. │
|
│ Select which items to display in the footer. │
|
||||||
│ │
|
│ │
|
||||||
│ > [✓] workspace │
|
│ > [✓] workspace │
|
||||||
│ Current working directory │
|
│ Current workspace path │
|
||||||
│ [✓] git-branch │
|
│ [✓] git-branch │
|
||||||
│ Current git branch name (not shown when unavailable) │
|
│ Current git branch name (not shown when unavailable) │
|
||||||
│ [✓] sandbox │
|
│ [✓] sandbox │
|
||||||
@@ -79,8 +79,8 @@ exports[`<FooterConfigDialog /> > renders correctly with default settings 1`] =
|
|||||||
│ │
|
│ │
|
||||||
│ ┌────────────────────────────────────────────────────────────────────────────────────────────┐ │
|
│ ┌────────────────────────────────────────────────────────────────────────────────────────────┐ │
|
||||||
│ │ Preview: │ │
|
│ │ Preview: │ │
|
||||||
│ │ workspace (/directory) branch sandbox /model /stats │ │
|
│ │ workspace branch sandbox /model /stats │ │
|
||||||
│ │ ~/project/path main docker gemini-2.5-pro 97% │ │
|
│ │ ~/project/path main docker gemini-2.5-pro 97% │ │
|
||||||
│ └────────────────────────────────────────────────────────────────────────────────────────────┘ │
|
│ └────────────────────────────────────────────────────────────────────────────────────────────┘ │
|
||||||
│ │
|
│ │
|
||||||
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
@@ -95,7 +95,7 @@ exports[`<FooterConfigDialog /> > renders correctly with default settings 2`] =
|
|||||||
│ Select which items to display in the footer. │
|
│ Select which items to display in the footer. │
|
||||||
│ │
|
│ │
|
||||||
│ > [✓] workspace │
|
│ > [✓] workspace │
|
||||||
│ Current working directory │
|
│ Current workspace path │
|
||||||
│ [✓] git-branch │
|
│ [✓] git-branch │
|
||||||
│ Current git branch name (not shown when unavailable) │
|
│ Current git branch name (not shown when unavailable) │
|
||||||
│ [✓] sandbox │
|
│ [✓] sandbox │
|
||||||
@@ -123,8 +123,8 @@ exports[`<FooterConfigDialog /> > renders correctly with default settings 2`] =
|
|||||||
│ │
|
│ │
|
||||||
│ ┌────────────────────────────────────────────────────────────────────────────────────────────┐ │
|
│ ┌────────────────────────────────────────────────────────────────────────────────────────────┐ │
|
||||||
│ │ Preview: │ │
|
│ │ Preview: │ │
|
||||||
│ │ workspace (/directory) branch sandbox /model /stats │ │
|
│ │ workspace branch sandbox /model /stats │ │
|
||||||
│ │ ~/project/path main docker gemini-2.5-pro 97% │ │
|
│ │ ~/project/path main docker gemini-2.5-pro 97% │ │
|
||||||
│ └────────────────────────────────────────────────────────────────────────────────────────────┘ │
|
│ └────────────────────────────────────────────────────────────────────────────────────────────┘ │
|
||||||
│ │
|
│ │
|
||||||
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||||
@@ -138,7 +138,7 @@ exports[`<FooterConfigDialog /> > updates the preview when Show footer labels is
|
|||||||
│ Select which items to display in the footer. │
|
│ Select which items to display in the footer. │
|
||||||
│ │
|
│ │
|
||||||
│ [✓] workspace │
|
│ [✓] workspace │
|
||||||
│ Current working directory │
|
│ Current workspace path │
|
||||||
│ [✓] git-branch │
|
│ [✓] git-branch │
|
||||||
│ Current git branch name (not shown when unavailable) │
|
│ Current git branch name (not shown when unavailable) │
|
||||||
│ [✓] sandbox │
|
│ [✓] sandbox │
|
||||||
|
|||||||
@@ -131,9 +131,9 @@ export const INFORMATIVE_TIPS = [
|
|||||||
'Save tokens by summarizing the context with /compress…',
|
'Save tokens by summarizing the context with /compress…',
|
||||||
'Copy the last response to your clipboard with /copy…',
|
'Copy the last response to your clipboard with /copy…',
|
||||||
'Open the full documentation in your browser with /docs…',
|
'Open the full documentation in your browser with /docs…',
|
||||||
'Add directories to your workspace with /directory add <path>…',
|
'Add directories to your workspace with /workspace add <path>…',
|
||||||
'Show all directories in your workspace with /directory show…',
|
'Show all directories in your workspace with /workspace show…',
|
||||||
'Use /dir as a shortcut for /directory…',
|
'Use /dir or /directory as a shortcut for /workspace…',
|
||||||
'Set your preferred external editor with /editor…',
|
'Set your preferred external editor with /editor…',
|
||||||
'List all active extensions with /extensions list…',
|
'List all active extensions with /extensions list…',
|
||||||
'Update all or specific extensions with /extensions update…',
|
'Update all or specific extensions with /extensions update…',
|
||||||
|
|||||||
@@ -338,9 +338,9 @@
|
|||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"hideCWD": {
|
"hideCWD": {
|
||||||
"title": "Hide CWD",
|
"title": "Hide Workspace Path",
|
||||||
"description": "Hide the current working directory in the footer.",
|
"description": "Hide the workspace path in the footer.",
|
||||||
"markdownDescription": "Hide the current working directory in the footer.\n\n- Category: `UI`\n- Requires restart: `no`\n- Default: `false`",
|
"markdownDescription": "Hide the workspace path in the footer.\n\n- Category: `UI`\n- Requires restart: `no`\n- Default: `false`",
|
||||||
"default": false,
|
"default": false,
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user