Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
abeatrix committed Oct 15, 2024
1 parent 22551a4 commit 0fb2233
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion vscode/src/chat/chat-view/ChatController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ describe('ChatController', () => {
guardrails: mockGuardrails,
contextRetriever: mockContextRetriever,
chatIntentAPIClient: null,
agenticToolsProvider: mockCodyToolProvider,
})
})

Expand Down
10 changes: 4 additions & 6 deletions vscode/src/chat/chat-view/ChatController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ import {
import { openExternalLinks } from '../../services/utils/workspace-action'
import { TestSupport } from '../../test-support'
import type { MessageErrorType } from '../MessageProvider'
import type { CodyToolProvider } from '../agentic/CodyTools'
import { CodyToolProvider } from '../agentic/CodyTools'
import { DeepCodyAgent } from '../agentic/DeepCody'
import { getMentionMenuData } from '../context/chatContext'
import type { ChatIntentAPIClient } from '../context/chatIntentAPIClient'
Expand Down Expand Up @@ -141,7 +141,6 @@ export interface ChatControllerOptions {

contextRetriever: Pick<ContextRetriever, 'retrieveContext'>
chatIntentAPIClient: ChatIntentAPIClient | null
agenticToolsProvider: CodyToolProvider

extensionClient: Pick<ExtensionClient, 'capabilities'>

Expand Down Expand Up @@ -188,7 +187,7 @@ export class ChatController implements vscode.Disposable, vscode.WebviewViewProv
private readonly chatClient: ChatControllerOptions['chatClient']

private readonly contextRetriever: ChatControllerOptions['contextRetriever']
private readonly agenticToolsProvider: CodyToolProvider
private readonly toolProvider: CodyToolProvider

private readonly editor: ChatControllerOptions['editor']
private readonly extensionClient: ChatControllerOptions['extensionClient']
Expand All @@ -214,14 +213,13 @@ export class ChatController implements vscode.Disposable, vscode.WebviewViewProv
chatIntentAPIClient,
contextRetriever,
extensionClient,
agenticToolsProvider,
}: ChatControllerOptions) {
this.extensionUri = extensionUri
this.chatClient = chatClient
this.editor = editor
this.extensionClient = extensionClient
this.contextRetriever = contextRetriever
this.agenticToolsProvider = agenticToolsProvider
this.toolProvider = CodyToolProvider.getInstance(this.contextRetriever)

this.chatBuilder = new ChatBuilder(undefined)

Expand Down Expand Up @@ -790,7 +788,7 @@ export class ChatController implements vscode.Disposable, vscode.WebviewViewProv
const agenticContext = await new DeepCodyAgent(
this.chatBuilder,
this.chatClient,
await this.agenticToolsProvider.getTools(),
await this.toolProvider.getTools(),
span,
corpusContext
).getContext(signal)
Expand Down
2 changes: 0 additions & 2 deletions vscode/src/chat/chat-view/ChatsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
handleCodeFromInsertAtCursor,
handleCodeFromSaveToNewFile,
} from '../../services/utils/codeblock-action-tracker'
import { CodyToolProvider } from '../agentic/CodyTools'
import type { ChatIntentAPIClient } from '../context/chatIntentAPIClient'
import type { SmartApplyResult } from '../protocol'
import {
Expand Down Expand Up @@ -477,7 +476,6 @@ export class ChatsController implements vscode.Disposable {
chatIntentAPIClient: this.chatIntentAPIClient,
contextRetriever: this.contextRetriever,
extensionClient: this.extensionClient,
agenticToolsProvider: CodyToolProvider.getInstance(this.contextRetriever),
})
}

Expand Down
2 changes: 1 addition & 1 deletion vscode/webviews/components/FileLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const IGNORE_WARNING = 'File ignored by an admin setting'

const hoverSourceLabels: Record<ContextItemSource, string | undefined> = {
// Shown in the format `Included ${label}`
agentic: 'requested by Deep Cody',
agentic: 'via Deep Cody',
unified: 'via remote repository search',
search: 'via local repository index (symf)',
editor: 'from workspace files',
Expand Down

0 comments on commit 0fb2233

Please sign in to comment.