Minor UX updates for IDE mode (#4311)

This commit is contained in:
Shreya Keshive
2025-07-16 17:33:56 -04:00
committed by GitHub
parent f6ee0d182b
commit 69a8ae6a89
5 changed files with 99 additions and 2 deletions

View File

@@ -68,6 +68,14 @@ export function createIdeContextStore() {
notifySubscribers();
}
/**
* Clears the active file context and notifies all registered subscribers of the change.
*/
function clearActiveFileContext(): void {
activeFileContext = undefined;
notifySubscribers();
}
/**
* Retrieves the current active file context.
* @returns The `ActiveFile` object if a file is active, otherwise `undefined`.
@@ -96,6 +104,7 @@ export function createIdeContextStore() {
setActiveFileContext,
getActiveFileContext,
subscribeToActiveFile,
clearActiveFileContext,
};
}