Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ import { Registry } from '../../../../platform/registry/common/platform.js';

Registry.as<IConfigurationRegistry>(Extensions.Configuration).registerDefaultConfigurations([{
overrides: {
'chat.agentsControl.enabled': true,
'chat.agent.maxRequests': 1000,
'chat.customizationsMenu.userStoragePath': '~/.copilot',
'chat.restoreLastPanelSession': true,
'chat.unifiedAgentsBar.enabled': true,
'chat.viewSessions.enabled': false,
'chat.implicitContext.suggestedContext': false,

'breadcrumbs.enabled': false,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { AgentSessionProviders } from '../../../../workbench/contrib/chat/browse
import { INewSession, LocalNewSession, RemoteNewSession } from '../../chat/browser/newSession.js';
import { IUriIdentityService } from '../../../../platform/uriIdentity/common/uriIdentity.js';
import { ILanguageModelsService } from '../../../../workbench/contrib/chat/common/languageModels.js';
import { GITHUB_REMOTE_FILE_SCHEME } from '../../fileTreeView/browser/githubFileSystemProvider.js';

export const IsNewChatSessionContext = new RawContextKey<boolean>('isNewChatSession', true);

Expand Down Expand Up @@ -186,11 +187,16 @@ export class SessionsManagementService extends Disposable implements ISessionsMa
}
}

private getRepositoryFromMetadata(metadata: { readonly [key: string]: unknown } | undefined): [URI | undefined, URI | undefined] {
private getRepositoryFromMetadata(session: IAgentSession): [URI | undefined, URI | undefined] {
const metadata = session.metadata;
if (!metadata) {
return [undefined, undefined];
}

if (session.providerType === AgentSessionProviders.Cloud) {
return [URI.parse(`${GITHUB_REMOTE_FILE_SCHEME}://github/${metadata.owner}/${metadata.name}`), undefined];
}

const repositoryPath = metadata?.repositoryPath as string | undefined;
const repositoryPathUri = typeof repositoryPath === 'string' ? URI.file(repositoryPath) : undefined;

Expand Down Expand Up @@ -404,7 +410,7 @@ export class SessionsManagementService extends Disposable implements ISessionsMa
if (session) {
if (isAgentSession(session)) {
this.lastSelectedSession = session.resource;
const [repository, worktree] = this.getRepositoryFromMetadata(session.metadata);
const [repository, worktree] = this.getRepositoryFromMetadata(session);
activeSessionItem = {
isUntitled: this.chatService.getSession(session.resource)?.contributedChatSession?.isUntitled ?? true,
label: session.label,
Expand Down
Loading