mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 00:09:30 +01:00
Merge branch 'main' into eli/chat-export-import-icon
This commit is contained in:
@@ -61,8 +61,8 @@ export class AuxiliaryBarPart extends AbstractPaneCompositePart {
|
||||
private readonly _runScriptMenu = this._register(new MutableDisposable<IMenu>());
|
||||
private readonly _runScriptMenuListener = this._register(new MutableDisposable<IDisposable>());
|
||||
|
||||
// Use the side bar dimensions
|
||||
override readonly minimumWidth: number = 170;
|
||||
// Sessions-specific auxiliary bar dimensions (intentionally not tied to the sessions SidebarPart values)
|
||||
override readonly minimumWidth: number = 270;
|
||||
override readonly maximumWidth: number = Number.POSITIVE_INFINITY;
|
||||
override readonly minimumHeight: number = 0;
|
||||
override readonly maximumHeight: number = Number.POSITIVE_INFINITY;
|
||||
|
||||
@@ -87,8 +87,8 @@
|
||||
font-size: 11px;
|
||||
padding: 2px 0;
|
||||
border-radius: 4px;
|
||||
background-color: var(--vscode-badge-background);
|
||||
color: var(--vscode-badge-foreground);
|
||||
background-color: color-mix(in srgb, var(--vscode-foreground) 10%, transparent);
|
||||
color: var(--vscode-descriptionForeground);
|
||||
line-height: 1;
|
||||
font-weight: 600;
|
||||
min-width: 16px;
|
||||
@@ -179,7 +179,7 @@
|
||||
}
|
||||
|
||||
.changes-view-body .chat-editing-session-actions.outside-card .monaco-button.secondary.monaco-text-button.codicon {
|
||||
padding: 4px 8px;
|
||||
padding: 4px 6px;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Repository/folder label */
|
||||
|
||||
@@ -25,6 +25,7 @@ import { SessionsWelcomeVisibleContext } from '../../../common/contextkeys.js';
|
||||
import { IViewsService } from '../../../../workbench/services/views/common/viewsService.js';
|
||||
import { TERMINAL_VIEW_ID } from '../../../../workbench/contrib/terminal/common/terminal.js';
|
||||
import { IWorkbenchLayoutService, Parts } from '../../../../workbench/services/layout/browser/layoutService.js';
|
||||
import { AGENT_HOST_SCHEME } from '../../../../platform/agentHost/common/agentHostUri.js';
|
||||
|
||||
const SessionsTerminalViewVisibleContext = new RawContextKey<boolean>('sessionsTerminalViewVisible', false);
|
||||
|
||||
@@ -38,7 +39,11 @@ function getSessionCwd(session: ISession | undefined): URI | undefined {
|
||||
return undefined;
|
||||
}
|
||||
const repo = session.workspace.get()?.repositories[0];
|
||||
return repo?.workingDirectory ?? repo?.uri;
|
||||
const cwd = repo?.workingDirectory ?? repo?.uri;
|
||||
if (cwd?.scheme === AGENT_HOST_SCHEME) {
|
||||
return undefined;
|
||||
}
|
||||
return cwd;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,6 +14,7 @@ import { TestInstantiationService } from '../../../../../platform/instantiation/
|
||||
import { NullLogService, ILogService } from '../../../../../platform/log/common/log.js';
|
||||
import { ITerminalInstance, ITerminalService } from '../../../../../workbench/contrib/terminal/browser/terminal.js';
|
||||
import { ITerminalCapabilityStore, ICommandDetectionCapability, TerminalCapability } from '../../../../../platform/terminal/common/capabilities/capabilities.js';
|
||||
import { toAgentHostUri } from '../../../../../platform/agentHost/common/agentHostUri.js';
|
||||
import { AgentSessionProviders } from '../../../../../workbench/contrib/chat/browser/agentSessions/agentSessions.js';
|
||||
import { ISessionsChangeEvent, ISessionsManagementService } from '../../../sessions/browser/sessionsManagementService.js';
|
||||
import { IChat, ISession } from '../../../sessions/common/sessionData.js';
|
||||
@@ -665,6 +666,18 @@ suite('SessionsTerminalContribution', () => {
|
||||
// No setActiveInstance calls from visibility update since no commands were run
|
||||
assert.strictEqual(activeInstanceSet.length, activeCountBefore, 'should not call setActiveInstance when no command history exists');
|
||||
});
|
||||
|
||||
// --- Remote agent host sessions ---
|
||||
|
||||
test('falls back to home directory for a background session with a remote agent host repository', async () => {
|
||||
const remoteRepoUri = toAgentHostUri(URI.file('/Users/user/repo'), 'my-server');
|
||||
const session = makeAgentSession({ repository: remoteRepoUri, providerType: AgentSessionProviders.Background });
|
||||
activeSessionObs.set(session, undefined);
|
||||
await tick();
|
||||
|
||||
assert.strictEqual(createdTerminals.length, 1, 'should create a terminal at the home directory');
|
||||
assert.strictEqual(createdTerminals[0].cwd.fsPath, HOME_DIR.fsPath);
|
||||
});
|
||||
});
|
||||
|
||||
function tick(): Promise<void> {
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
import assert from 'assert';
|
||||
import { CancellationToken } from '../../../../../../base/common/cancellation.js';
|
||||
import { Codicon } from '../../../../../../base/common/codicons.js';
|
||||
import { Emitter, Event } from '../../../../../../base/common/event.js';
|
||||
import { DisposableStore } from '../../../../../../base/common/lifecycle.js';
|
||||
import { observableValue } from '../../../../../../base/common/observable.js';
|
||||
import { URI } from '../../../../../../base/common/uri.js';
|
||||
import { runWithFakedTimers } from '../../../../../../base/test/common/timeTravelScheduler.js';
|
||||
import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../../../base/test/common/utils.js';
|
||||
import { TestInstantiationService } from '../../../../../../platform/instantiation/test/common/instantiationServiceMock.js';
|
||||
import { workbenchInstantiationService } from '../../../../../test/browser/workbenchTestServices.js';
|
||||
import { LocalAgentsSessionsController } from '../../../browser/agentSessions/localAgentSessionsController.js';
|
||||
@@ -22,7 +22,6 @@ import { IChatChangedRequestEvent, IChatChangeEvent, IChatModel, IChatRequestMod
|
||||
import { LocalChatSessionUri } from '../../../common/model/chatUri.js';
|
||||
import { MockChatService } from '../../common/chatService/mockChatService.js';
|
||||
import { MockChatSessionsService } from '../../common/mockChatSessionsService.js';
|
||||
import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../../../base/test/common/utils.js';
|
||||
|
||||
function createTestTiming(options?: {
|
||||
created?: number;
|
||||
@@ -567,35 +566,6 @@ suite('LocalAgentsSessionsController', () => {
|
||||
});
|
||||
});
|
||||
|
||||
suite('Session Icon', () => {
|
||||
test('should use Codicon.chatSparkle as icon', async () => {
|
||||
return runWithFakedTimers({}, async () => {
|
||||
const controller = createController();
|
||||
|
||||
const sessionResource = LocalChatSessionUri.forSession('icon-session');
|
||||
const mockModel = createMockChatModel({
|
||||
sessionResource,
|
||||
hasRequests: true
|
||||
});
|
||||
|
||||
mockChatService.addSession(mockModel);
|
||||
mockChatService.setLiveSessionItems([{
|
||||
sessionResource,
|
||||
title: 'Icon Session',
|
||||
lastMessageDate: Date.now(),
|
||||
isActive: true,
|
||||
lastResponseState: ResponseModelState.Complete,
|
||||
timing: createTestTiming()
|
||||
}]);
|
||||
|
||||
await controller.refresh(CancellationToken.None);
|
||||
const sessions = controller.items;
|
||||
assert.strictEqual(sessions.length, 1);
|
||||
assert.strictEqual(sessions[0].iconPath, Codicon.chatSparkle);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('Events', () => {
|
||||
test('should fire onDidChangeChatSessionItems when model progress changes', async () => {
|
||||
return runWithFakedTimers({}, async () => {
|
||||
|
||||
@@ -897,6 +897,16 @@
|
||||
margin-right: 9px;
|
||||
}
|
||||
|
||||
/* Don't show focus outline on mouse click. Instead only show outline on keyboard focus. */
|
||||
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlideDetails .getting-started-step .codicon:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlideDetails .getting-started-step .codicon:focus-visible {
|
||||
outline: 1px solid var(--vscode-focusBorder);
|
||||
outline-offset: 0;
|
||||
}
|
||||
|
||||
|
||||
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlide .getting-started-checkbox.codicon:not(.checked)::before {
|
||||
opacity: 0;
|
||||
|
||||
Reference in New Issue
Block a user