Skip to content

Commit 2aa51a4

Browse files
committed
fix type issue and revert unnecessary file changes
1 parent 1a75593 commit 2aa51a4

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

packages/amazonq/src/lsp/chat/diffAnimation/streamingDiffController.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import * as vscode from 'vscode'
77
import * as path from 'path'
88
import { getLogger } from 'aws-core-vscode/shared'
9+
import { FsWriteParams } from './types'
910

1011
export const diffViewUriScheme = 'amazonq-diff'
1112

@@ -24,16 +25,7 @@ export class StreamingDiffController implements vscode.Disposable {
2425
activeLineController: DecorationController
2526
streamedLines: string[]
2627
disposed: boolean
27-
fsWriteParams?: {
28-
command?: string
29-
insertLine?: number
30-
oldStr?: string
31-
newStr?: string
32-
fileText?: string
33-
explanation?: string
34-
pairIndex?: number
35-
totalPairs?: number
36-
}
28+
fsWriteParams?: FsWriteParams
3729
}
3830
>()
3931

@@ -55,7 +47,7 @@ export class StreamingDiffController implements vscode.Disposable {
5547
vscode.workspace.registerTextDocumentContentProvider(diffViewUriScheme, this.contentProvider)
5648
}
5749

58-
updateFsWriteParams(toolUseId: string, fsWriteParams: any): void {
50+
updateFsWriteParams(toolUseId: string, fsWriteParams: FsWriteParams): void {
5951
const session = this.activeStreamingSessions.get(toolUseId)
6052
if (session) {
6153
session.fsWriteParams = fsWriteParams

packages/amazonq/src/lsp/chat/diffAnimation/types.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,14 @@ export interface ScanPlan {
5050
preAdded?: boolean
5151
}>
5252
}
53+
54+
export interface FsWriteParams {
55+
command?: string
56+
insertLine?: number
57+
oldStr?: string
58+
newStr?: string
59+
fileText?: string
60+
explanation?: string
61+
pairIndex?: number
62+
totalPairs?: number
63+
}

0 commit comments

Comments
 (0)