import { Event, URI } from "../../../../../../sessions/sessions.web.main.internal.js"; export declare const IAgentHostNewSessionFolderService: import("../../../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; /** * Per-window store of the working directory a user picked for a not-yet-started * agent-host session, keyed by the chat session resource it was picked against * (including the untitled compose resource). An agent-host session's working * directory is an argument to session creation and is immutable afterwards, so * in a multi-root window the Folder picker chip records the choice here and the * working-directory resolution sites consult it before falling back to the * first workspace folder. Keying by the compose resource lets the choice * survive the untitled-to-real rebind that happens when the session is created. */ export interface IAgentHostNewSessionFolderService { readonly _serviceBrand: undefined; /** * Fires with the session resource whose chosen folder changed. */ readonly onDidChangeFolder: Event; /** * The folder chosen for the given session resource, or `undefined` if the * user has not made an explicit choice. */ getFolder(sessionResource: URI): URI | undefined; /** * Record the folder chosen for the given session resource. Fires * {@link onDidChangeFolder} when the value actually changes. */ setFolder(sessionResource: URI, folder: URI): void; /** * Forget any choice recorded for the given session resource. */ clear(sessionResource: URI): void; /** * The most recently chosen folder in this window (across all sessions), * provided it is still a current workspace folder, or `undefined` if the * user has never made an explicit choice (or it is no longer in the * workspace). Unlike {@link getFolder} this is a window-level "sticky" * default that survives session disposal, so a new chat defaults to the * folder the user last picked instead of resetting to the first folder. */ getDefaultFolder(): URI | undefined; /** * The folder a *new* (not-yet-started) session should use, resolved with the * same precedence a freshly created chat would apply: a still-valid explicit * per-session choice, else the still-valid sticky {@link getDefaultFolder}, * else the first current workspace folder, else `undefined` (no folders). * * Used to reselect a draft's primary when the folder it pointed at is removed * from the workspace. Every candidate is validated against the *current* * workspace folders, so the removed folder is never returned regardless of the * order in which workspace-change listeners run. */ resolveNewSessionPrimary(sessionResource: URI): URI | undefined; }