Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/coding-agent/src/core/extensions/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ export interface ExtensionUIDialogOptions {
* drift is visible because no output follows the dialog to fill the gap back in.
*/
overlay?: boolean;
/**
* Ask about one action and forget the answer.
*
* A host grants standing permissions by tool name ("allow for this session").
* A dialog that manages a durable object — a scheduled task, say — must not
* join that grant: one approval would otherwise silently cover every later
* change of the same kind.
*/
once?: boolean;
/**
* Reference lines for an input dialog, rendered under the title and above the
* editable row. Use them to show the accepted spellings of an answer that has
Expand Down
19 changes: 19 additions & 0 deletions packages/coding-agent/src/core/session-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,25 @@ export class SessionManager {
return this.persist;
}

/**
* Persist a newly created session before its first turn. Host-created task
* sessions need a file that can be reopened after a restart.
*/
persistNewSessionHeader(): string | undefined {
if (!this.persist || !this.sessionFile || this.flushed) return this.sessionFile;
const fd = openSync(this.sessionFile, "wx");
try {
for (const entry of this.fileEntries) {
writeFileSync(fd, `${JSON.stringify(entry)}\n`);
}
} finally {
closeSync(fd);
}
this.flushed = true;
this._notifyFilePersisted(this.sessionFile, "create");
return this.sessionFile;
}

getCwd(): string {
return this.cwd;
}
Expand Down
Loading
Loading