Skip to content

Commit

Permalink
fix(vscode): fix position type convert.
Browse files Browse the repository at this point in the history
  • Loading branch information
icycodes committed May 27, 2024
1 parent 76cb653 commit c99bd1e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions clients/tabby-agent/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default defineConfig(async () => {
outDir: "dist/browser",
platform: "browser",
format: "esm",
treeshake: "smallest", // Required for browser to cleanup fs related libs
sourcemap: true,
banner: {
js: banner,
Expand Down
5 changes: 4 additions & 1 deletion clients/vscode/src/InlineCompletionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ export class InlineCompletionProvider extends EventEmitter implements InlineComp
textDocument: {
uri: document.uri.toString(),
},
position,
position: {
line: position.line,
character: position.character,
},
};
let request: Promise<InlineCompletionList | null> | undefined = undefined;
try {
Expand Down
2 changes: 0 additions & 2 deletions clients/vscode/src/chat/ChatViewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ export class ChatViewProvider implements WebviewViewProvider {
enableScripts: true,
localResourceRoots: [extensionUri],
};
console.log("resolveWebviewView", { config: this.config.server });
webviewView.webview.html = this._getWebviewContent(this.config.server);
this.config.on("updatedServerConfig", () => {
console.log("updatedServerConfig", { config: this.config.server });
webviewView.webview.html = this._getWebviewContent(this.config.server);
});

Expand Down
2 changes: 1 addition & 1 deletion clients/vscode/src/lsp/WorkspaceFileSystemFeature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class WorkspaceFileSystemFeature implements StaticFeature {

initialize(): void {
this.disposables.push(
this.client.onRequest(ReadFileRequest.method, async (params: ReadFileParams) => {
this.client.onRequest(ReadFileRequest.type, async (params: ReadFileParams) => {
if (params.format !== "text") {
return null;
}
Expand Down

0 comments on commit c99bd1e

Please sign in to comment.