Default per-user main.py; invite-only by default

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-10 01:45:20 +12:00
parent 6fc651ad72
commit 687a8347f8
7 changed files with 97 additions and 14 deletions

View File

@@ -89,7 +89,11 @@ class TextEditor {
this.updateWorkspaceBanner();
this.prewarmPyWorker();
this.fetchViewerRole()
.finally(() => this.loadInitialDirectoryState().then(() => this.restoreSessionTabs()));
.finally(() =>
this.loadInitialDirectoryState().then(() =>
this.restoreSessionTabs().then(() => this.ensureDefaultMainOpen())
)
);
}
async fetchViewerRole() {
@@ -308,6 +312,13 @@ class TextEditor {
this.saveSessionState();
}
async ensureDefaultMainOpen() {
if (this.openTabs.length > 0) {
return;
}
await this.openFile('code/main.py');
}
async restoreExplorerState(session) {
const expanded = Array.isArray(session.expandedDirs)
? session.expandedDirs.filter((path) => typeof path === 'string')