Linting
This commit is contained in:
parent
8eae770621
commit
8b7be48522
13 changed files with 37 additions and 28 deletions
|
|
@ -192,6 +192,10 @@ export class DeterministicAgent extends debugging.InMemoryFileSystem {
|
|||
const isNew = !this.files.has(path);
|
||||
await super.write(path, content);
|
||||
|
||||
if (!this.isSyncEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isNew) {
|
||||
this.enqueueSync(async () => {
|
||||
this.client.syncLocallyCreatedFile(path);
|
||||
|
|
@ -208,9 +212,11 @@ export class DeterministicAgent extends debugging.InMemoryFileSystem {
|
|||
updater: (current: TextWithCursors) => TextWithCursors
|
||||
): Promise<string> {
|
||||
const result = await super.atomicUpdateText(path, updater);
|
||||
this.enqueueSync(async () => {
|
||||
this.client.syncLocallyUpdatedFile({ relativePath: path });
|
||||
});
|
||||
if (this.isSyncEnabled) {
|
||||
this.enqueueSync(async () => {
|
||||
this.client.syncLocallyUpdatedFile({ relativePath: path });
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -228,12 +234,14 @@ export class DeterministicAgent extends debugging.InMemoryFileSystem {
|
|||
newPath: RelativePath
|
||||
): Promise<void> {
|
||||
await super.rename(oldPath, newPath);
|
||||
this.enqueueSync(async () => {
|
||||
this.client.syncLocallyUpdatedFile({
|
||||
oldPath,
|
||||
relativePath: newPath
|
||||
if (this.isSyncEnabled) {
|
||||
this.enqueueSync(async () => {
|
||||
this.client.syncLocallyUpdatedFile({
|
||||
oldPath,
|
||||
relativePath: newPath
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private async waitForWebSocket(): Promise<void> {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export function parseConcurrency(): number {
|
|||
i + 1 < args.length
|
||||
) {
|
||||
const n = parseInt(args[i + 1], 10);
|
||||
if (!isNaN(n) && n > 0) return n;
|
||||
if (!isNaN(n) && n > 0) {return n;}
|
||||
}
|
||||
}
|
||||
return os.cpus().length;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export class ServerManager {
|
|||
}
|
||||
|
||||
public async stopAll(): Promise<void> {
|
||||
if (this.isShuttingDown) return;
|
||||
if (this.isShuttingDown) {return;}
|
||||
this.isShuttingDown = true;
|
||||
|
||||
const servers = Array.from(this.activeServers);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue