Skip to content

Commit 4fcfb68

Browse files
QianrenLiiamhyc
authored andcommitted
fix: overleaf synccode
1 parent 09ee617 commit 4fcfb68

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/api/base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,9 +705,9 @@ export class BaseAPI {
705705
});
706706
}
707707

708-
async proxySyncCode(identity:Identity, projectId:string, file:string, line:number, column:number) {
708+
async proxySyncCode(identity:Identity, projectId:string, file:string, line:number, column:number, buildId:string) {
709709
this.setIdentity(identity);
710-
return this.request('GET', `project/${projectId}/sync/code?file=${file}&line=${line}&column=${column}`,
710+
return this.request('GET', `project/${projectId}/sync/code?file=${file}&line=${line}&column=${column}&editorId=${uuidv4()}&buildId=${buildId}`,
711711
undefined, (res) => {
712712
const syncCode = (JSON.parse(res!) as any).pdf as SyncCodeResponseSchema;
713713
return {syncCode};

src/core/remoteFileSystemProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ export class VirtualFileSystem extends vscode.Disposable {
947947

948948
async syncCode(filePath: string, line:number, column:number) {
949949
const identity = await GlobalStateManager.authenticate(this.context, this.serverName);
950-
const res = await this.api.proxySyncCode(identity, this.projectId, filePath, line, column);
950+
const res = await this.api.proxySyncCode(identity, this.projectId, filePath, line, column, this.outputBuildId ?? '');
951951
if (res.type==='success') {
952952
return res.syncCode;
953953
} else {

0 commit comments

Comments
 (0)