Skip to content

Commit

Permalink
Fix initial context for chats
Browse files Browse the repository at this point in the history
  • Loading branch information
mkondratek committed Nov 6, 2024
1 parent 836693e commit 259d786
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vscode/src/chat/initialContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import * as vscode from 'vscode'
import { URI } from 'vscode-uri'
import { getSelectionOrFileContext } from '../commands/context/selection'
import { createRepositoryMention } from '../context/openctx/common/get-repository-mentions'
import { remoteReposForAllWorkspaceFolders } from '../repository/remoteRepos'
import { type RemoteRepo, remoteReposForAllWorkspaceFolders } from '../repository/remoteRepos'
import { ChatBuilder } from './chat-view/ChatBuilder'
import {
activeEditorContextForOpenCtxMentions,
Expand Down Expand Up @@ -196,7 +196,8 @@ export function getCorpusContextItemsForEditorState(): Observable<
// TODO(sqs): Make this consistent between self-serve (no remote search) and enterprise (has
// remote search). There should be a single internal thing in Cody that lets you monitor the
// user's current codebase.
if (authStatus.allowRemoteContext) {
const remoteRepos = (remoteReposForAllWorkspaceFolders as RemoteRepo[]) || []
if (authStatus.allowRemoteContext && remoteRepos.length > 0) {
if (remoteReposForAllWorkspaceFolders === pendingOperation) {
return pendingOperation
}
Expand Down

0 comments on commit 259d786

Please sign in to comment.