Skip to content

Commit 2163129

Browse files
authored
Merge pull request #3523 from Kilo-Org/remove-gutter-animation
refactor: remove gutter animation feature
2 parents d5059dd + c22987f commit 2163129

File tree

12 files changed

+7
-150
lines changed

12 files changed

+7
-150
lines changed

.changeset/plain-coins-happen.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"kilo-code": patch
3+
---
4+
5+
Removed the gutter animation for autocomplete

packages/types/src/__tests__/kilocode.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ describe("ghostServiceSettingsSchema", () => {
1515
enableAutoTrigger: true,
1616
enableQuickInlineTaskKeybinding: false,
1717
enableSmartInlineTaskKeybinding: true,
18-
showGutterAnimation: false,
1918
})
2019
expect(result.success).toBe(true)
2120
})
@@ -25,7 +24,6 @@ describe("ghostServiceSettingsSchema", () => {
2524
enableAutoTrigger: true,
2625
enableQuickInlineTaskKeybinding: true,
2726
enableSmartInlineTaskKeybinding: true,
28-
showGutterAnimation: true,
2927
})
3028
expect(result.success).toBe(true)
3129
})

packages/types/src/kilocode/kilocode.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export const ghostServiceSettingsSchema = z
1212
enableAutoTrigger: z.boolean().optional(),
1313
enableQuickInlineTaskKeybinding: z.boolean().optional(),
1414
enableSmartInlineTaskKeybinding: z.boolean().optional(),
15-
showGutterAnimation: z.boolean().optional(),
1615
useNewAutocomplete: z.boolean().optional(),
1716
provider: z.string().optional(),
1817
model: z.string().optional(),
-525 KB
Binary file not shown.
-202 KB
Binary file not shown.

src/core/webview/ClineProvider.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,6 @@ ${prompt}
11681168
<link href="${codiconsUri}" rel="stylesheet" />
11691169
<script nonce="${nonce}">
11701170
window.IMAGES_BASE_URI = "${imagesUri}"
1171-
window.ICONS_BASE_URI = "${iconsUri}" // kilocode_change
11721171
window.AUDIO_BASE_URI = "${audioUri}"
11731172
window.MATERIAL_ICONS_BASE_URI = "${materialIconsUri}"
11741173
window.KILOCODE_BACKEND_BASE_URL = "${process.env.KILOCODE_BACKEND_BASE_URL ?? ""}"
@@ -1245,7 +1244,6 @@ ${prompt}
12451244
<link href="${codiconsUri}" rel="stylesheet" />
12461245
<script nonce="${nonce}">
12471246
window.IMAGES_BASE_URI = "${imagesUri}"
1248-
window.ICONS_BASE_URI = "${iconsUri}" // kilocode_change
12491247
window.AUDIO_BASE_URI = "${audioUri}"
12501248
window.MATERIAL_ICONS_BASE_URI = "${materialIconsUri}"
12511249
window.KILOCODE_BACKEND_BASE_URL = "${process.env.KILOCODE_BACKEND_BASE_URL ?? ""}"

src/services/ghost/GhostGutterAnimation.ts

Lines changed: 0 additions & 68 deletions
This file was deleted.

src/services/ghost/GhostServiceManager.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { ProviderSettingsManager } from "../../core/config/ProviderSettingsManag
1313
import { GhostContext } from "./GhostContext"
1414
import { TelemetryService } from "@roo-code/telemetry"
1515
import { ClineProvider } from "../../core/webview/ClineProvider"
16-
import { GhostGutterAnimation } from "./GhostGutterAnimation"
1716
import { RooIgnoreController } from "../../core/ignore/RooIgnoreController"
1817

1918
export class GhostServiceManager {
@@ -25,7 +24,6 @@ export class GhostServiceManager {
2524
private providerSettingsManager: ProviderSettingsManager
2625
private settings: GhostServiceSettings | null = null
2726
private ghostContext: GhostContext
28-
private cursorAnimation: GhostGutterAnimation
2927

3028
private taskId: string | null = null
3129
private isProcessing: boolean = false
@@ -52,15 +50,13 @@ export class GhostServiceManager {
5250
this.providerSettingsManager = new ProviderSettingsManager(context)
5351
this.model = new GhostModel()
5452
this.ghostContext = new GhostContext(this.documentStore)
55-
this.cursorAnimation = new GhostGutterAnimation(context)
5653

5754
// Register the providers
5855
this.codeActionProvider = new GhostCodeActionProvider()
5956
this.inlineCompletionProvider = new GhostInlineCompletionProvider(
6057
this.model,
6158
this.updateCostTracking.bind(this),
6259
this.ghostContext,
63-
this.cursorAnimation,
6460
() => this.settings,
6561
)
6662

@@ -73,9 +69,6 @@ export class GhostServiceManager {
7369
vscode.window.onDidChangeActiveTextEditor(this.onDidChangeActiveTextEditor, this, context.subscriptions)
7470

7571
void this.load()
76-
77-
// Initialize cursor animation with settings after load
78-
this.cursorAnimation.updateSettings(this.settings || undefined)
7972
}
8073

8174
// Singleton Management
@@ -116,7 +109,6 @@ export class GhostServiceManager {
116109
public async load() {
117110
this.settings = this.loadSettings()
118111
await this.model.reload(this.providerSettingsManager)
119-
this.cursorAnimation.updateSettings(this.settings || undefined)
120112
await this.updateGlobalContext()
121113
this.updateStatusBar()
122114
await this.updateInlineCompletionProviderRegistration()
@@ -164,7 +156,6 @@ export class GhostServiceManager {
164156
enableAutoTrigger: false,
165157
enableSmartInlineTaskKeybinding: false,
166158
enableQuickInlineTaskKeybinding: false,
167-
showGutterAnimation: true,
168159
}
169160
await this.saveSettings()
170161
await this.load()
@@ -176,7 +167,6 @@ export class GhostServiceManager {
176167
enableAutoTrigger: true,
177168
enableSmartInlineTaskKeybinding: true,
178169
enableQuickInlineTaskKeybinding: true,
179-
showGutterAnimation: true,
180170
}
181171
await this.saveSettings()
182172
await this.load()
@@ -261,7 +251,7 @@ export class GhostServiceManager {
261251
}
262252

263253
private async onDidChangeTextEditorSelection(event: vscode.TextEditorSelectionChangeEvent): Promise<void> {
264-
this.cursorAnimation.update()
254+
// No longer needed - gutter animation removed
265255
}
266256

267257
private async onDidChangeActiveTextEditor(editor: vscode.TextEditor | undefined) {
@@ -438,7 +428,6 @@ export class GhostServiceManager {
438428
}
439429

440430
private stopProcessing() {
441-
this.cursorAnimation.hide()
442431
this.isProcessing = false
443432
this.updateGlobalContext()
444433
}
@@ -461,7 +450,6 @@ export class GhostServiceManager {
461450
this.cancelRequest()
462451

463452
this.statusBar?.dispose()
464-
this.cursorAnimation.dispose()
465453

466454
// Dispose inline completion provider registration
467455
if (this.inlineCompletionProviderDisposable) {

src/services/ghost/classic-auto-complete/GhostInlineCompletionProvider.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { AutoTriggerStrategy } from "./AutoTriggerStrategy"
66
import { GhostModel } from "../GhostModel"
77
import { GhostContext } from "../GhostContext"
88
import { ApiStreamChunk } from "../../../api/transform/stream"
9-
import { GhostGutterAnimation } from "../GhostGutterAnimation"
109
import type { GhostServiceSettings } from "@roo-code/types"
1110

1211
const MAX_SUGGESTIONS_HISTORY = 20
@@ -77,20 +76,17 @@ export class GhostInlineCompletionProvider implements vscode.InlineCompletionIte
7776
private model: GhostModel
7877
private costTrackingCallback: CostTrackingCallback
7978
private ghostContext: GhostContext
80-
private cursorAnimation: GhostGutterAnimation
8179
private getSettings: () => GhostServiceSettings | null
8280

8381
constructor(
8482
model: GhostModel,
8583
costTrackingCallback: CostTrackingCallback,
8684
ghostContext: GhostContext,
87-
cursorAnimation: GhostGutterAnimation,
8885
getSettings: () => GhostServiceSettings | null,
8986
) {
9087
this.model = model
9188
this.costTrackingCallback = costTrackingCallback
9289
this.ghostContext = ghostContext
93-
this.cursorAnimation = cursorAnimation
9490
this.getSettings = getSettings
9591
this.autoTriggerStrategy = new AutoTriggerStrategy()
9692
}
@@ -257,9 +253,6 @@ export class GhostInlineCompletionProvider implements vscode.InlineCompletionIte
257253

258254
// No cached suggestion available - invoke LLM
259255
if (this.model && this.ghostContext) {
260-
// Show cursor animation while generating
261-
this.cursorAnimation.active()
262-
263256
const context: GhostSuggestionContext = {
264257
document,
265258
range: new vscode.Range(position, position),
@@ -269,9 +262,6 @@ export class GhostInlineCompletionProvider implements vscode.InlineCompletionIte
269262
try {
270263
const result = await this.getFromLLM(fullContext, this.model)
271264

272-
// Hide cursor animation after generation
273-
this.cursorAnimation.hide()
274-
275265
if (this.costTrackingCallback && result.cost > 0) {
276266
this.costTrackingCallback(
277267
result.cost,
@@ -296,7 +286,6 @@ export class GhostInlineCompletionProvider implements vscode.InlineCompletionIte
296286
return []
297287
}
298288
} catch (error) {
299-
this.cursorAnimation.hide()
300289
console.error("Error getting inline completion from LLM:", error)
301290
return []
302291
}

src/services/ghost/classic-auto-complete/__tests__/GhostInlineCompletionProvider.test.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { FillInAtCursorSuggestion } from "../GhostSuggestions"
88
import { MockTextDocument } from "../../../mocking/MockTextDocument"
99
import { GhostModel } from "../../GhostModel"
1010
import { GhostContext } from "../../GhostContext"
11-
import { GhostGutterAnimation } from "../../GhostGutterAnimation"
1211

1312
// Mock vscode InlineCompletionTriggerKind enum
1413
vi.mock("vscode", async () => {
@@ -288,7 +287,6 @@ describe("GhostInlineCompletionProvider", () => {
288287
let mockModel: GhostModel
289288
let mockCostTrackingCallback: CostTrackingCallback
290289
let mockGhostContext: GhostContext
291-
let mockCursorAnimation: GhostGutterAnimation
292290
let mockSettings: { enableAutoTrigger: boolean } | null
293291

294292
beforeEach(() => {
@@ -319,19 +317,11 @@ describe("GhostInlineCompletionProvider", () => {
319317
range: ctx.range,
320318
})),
321319
} as unknown as GhostContext
322-
mockCursorAnimation = {
323-
active: vi.fn(),
324-
hide: vi.fn(),
325-
update: vi.fn(),
326-
dispose: vi.fn(),
327-
updateSettings: vi.fn(),
328-
} as unknown as GhostGutterAnimation
329320

330321
provider = new GhostInlineCompletionProvider(
331322
mockModel,
332323
mockCostTrackingCallback,
333324
mockGhostContext,
334-
mockCursorAnimation,
335325
() => mockSettings,
336326
)
337327
})

0 commit comments

Comments
 (0)