Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
umpox committed Jan 2, 2025
1 parent 96d283f commit d124507
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions vscode/src/autoedits/autoedits-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ContextMixer } from '../completions/context/context-mixer'
import { DefaultContextStrategyFactory } from '../completions/context/context-strategy'
import { getCurrentDocContext } from '../completions/get-current-doc-context'

import { FixupController } from '../non-stop/FixupController'
import type { FixupController } from '../non-stop/FixupController'
import type { AutoeditsModelAdapter, AutoeditsPrompt } from './adapters/base'
import { createAutoeditsModelAdapter } from './adapters/create-adapter'
import { getTimeNowInMillis } from './analytics-logger'
Expand Down Expand Up @@ -89,9 +89,13 @@ export class AutoeditsProvider implements vscode.InlineCompletionItemProvider, v

this.rendererManager =
enabledRenderer === 'inline'
? new AutoEditsInlineRendererManager(editor => new InlineDiffDecorator(editor))
? new AutoEditsInlineRendererManager(
editor => new InlineDiffDecorator(editor),
fixupController
)
: new AutoEditsDefaultRendererManager(
(editor: vscode.TextEditor) => new DefaultDecorator(editor)
(editor: vscode.TextEditor) => new DefaultDecorator(editor),
fixupController
)

this.onSelectionChangeDebounced = debounce(
Expand Down
2 changes: 1 addition & 1 deletion vscode/src/commands/GhostHintDecorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { telemetryRecorder } from '@sourcegraph/cody-shared'
import { type DebouncedFunc, throttle } from 'lodash'
import * as vscode from 'vscode'
import type { SyntaxNode } from 'web-tree-sitter'
import { FixupController } from '../non-stop/FixupController'
import type { FixupController } from '../non-stop/FixupController'
import { CodyTaskState } from '../non-stop/state'
import { execQueryWrapper } from '../tree-sitter/query-sdk'

Expand Down
4 changes: 2 additions & 2 deletions vscode/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ async function tryRegisterTutorial(

function registerAutoEdits(
chatClient: ChatClient,
fixupController,
fixupController: FixupController,
disposables: vscode.Disposable[]
): void {
disposables.push(
Expand All @@ -731,7 +731,7 @@ function registerAutoEdits(
.pipe(
map(([config, authStatus, autoeditEnabled]) => {
if (shouldEnableExperimentalAutoedits(config, autoeditEnabled, authStatus)) {
const provider = new AutoeditsProvider(chatClient)
const provider = new AutoeditsProvider(chatClient, fixupController)
const completionRegistration =
vscode.languages.registerInlineCompletionItemProvider(
[{ scheme: 'file', language: '*' }, { notebookType: '*' }],
Expand Down

0 comments on commit d124507

Please sign in to comment.