@@ -24,6 +24,7 @@ import { entries } from '../shared/utilities/tsUtils'
2424import { getEnvironmentSpecificMemento } from '../shared/utilities/mementos'
2525import { setContext } from '../shared'
2626import { telemetry } from '../shared/telemetry'
27+ import { getSessionId } from '../shared/telemetry/util'
2728
2829interface MenuOption {
2930 readonly label : string
@@ -108,7 +109,7 @@ const menuOptions: Record<DevFunction, MenuOption> = {
108109 } ,
109110 forceIdeCrash : {
110111 label : 'Crash: Force IDE ExtHost Crash' ,
111- detail : `Will SIGKILL ExtHost with pid, ${ process . pid } , but IDE will not crash itself .` ,
112+ detail : `Will SIGKILL ExtHost, { pid: ${ process . pid } , sessionId: ' ${ getSessionId ( ) . slice ( 0 , 8 ) } -...' }, but the IDE itself will not crash.` ,
112113 executor : forceQuitIde ,
113114 } ,
114115}
@@ -222,6 +223,7 @@ function isSecrets(obj: vscode.Memento | vscode.SecretStorage): obj is vscode.Se
222223
223224class VirtualObjectFile implements FileProvider {
224225 private mTime = 0
226+ private size = 0
225227 private readonly onDidChangeEmitter = new vscode . EventEmitter < void > ( )
226228 public readonly onDidChange = this . onDidChangeEmitter . event
227229
@@ -233,22 +235,24 @@ class VirtualObjectFile implements FileProvider {
233235 /** Emits an event indicating this file's content has changed */
234236 public refresh ( ) {
235237 /**
236- * Per {@link vscode.FileSystemProvider.onDidChangeFile}, if the mTime does not change, new file content may
237- * not be retrieved. Without this, when we emit a change the text editor did not update.
238+ * Per {@link vscode.FileSystemProvider.onDidChangeFile}, if the mTime and/or size does not change, new file content may
239+ * not be retrieved due to optimizations . Without this, when we emit a change the text editor did not update.
238240 */
239241 this . mTime ++
240242 this . onDidChangeEmitter . fire ( )
241243 }
242244
243245 public stat ( ) : { ctime : number ; mtime : number ; size : number } {
244246 // This would need to be filled out to track conflicts
245- return { ctime : 0 , mtime : this . mTime , size : 0 }
247+ return { ctime : 0 , mtime : this . mTime , size : this . size }
246248 }
247249
248250 public async read ( ) : Promise < Uint8Array > {
249251 const encoder = new TextEncoder ( )
250252
251- return encoder . encode ( await this . readStore ( this . key ) )
253+ const data = encoder . encode ( await this . readStore ( this . key ) )
254+ this . size = data . length
255+ return data
252256 }
253257
254258 public async write ( content : Uint8Array ) : Promise < void > {
0 commit comments