Line

ui/server/src/settings

In-memory settings for the UI server: which LLM provider each distinct LLM-touching capability should use, and which Construct project directory every command targets.

Cockpit server, v0.9. Source: ui/server/src/settings.mjs.

Functions#

getBrowseRoots()#

getBrowseRoots(): any[]

Defined in: ui/server/src/settings.mjs:83

The only root the directory picker may browse: the workspace. Not configurable by a client.

Returns#

any[]


getProjectDir()#

getProjectDir(): string

Defined in: ui/server/src/settings.mjs:134

The open project directory, or null. Re-verified against the workspace on EVERY call (realpath), so a directory that was replaced by a symlink out of the workspace, or removed, stops being served at once.

Returns#

string


getSettings()#

getSettings(): object

Defined in: ui/server/src/settings.mjs:148

Returns#

object

availableProviders

availableProviders: string[]

availableProvidersByCapability

availableProvidersByCapability: object

Index Signature

[k: string]: string[]

browseRoots

browseRoots: any[]

lastProject

lastProject: string

llmProvider

llmProvider: any = llmProviders.importFill

llmProviders

llmProviders: any

projectDir

projectDir: string

projectRelative

projectRelative: any

workspaceRoot

workspaceRoot: any


lastProjectFilePath()#

lastProjectFilePath(login): any

Defined in: ui/server/src/settings.mjs:99

The state file for login ('' = no session keeps the original last-project.json). The login is validated as one safe path segment (normalizeLogin) before it can name a file, so it can never select another path.

Parameters#

login

any

Returns#

any


preloadProject()#

preloadProject(dir): void

Defined in: ui/server/src/settings.mjs:89

Harness-only preload. An e2e config may name a project to open at start; it goes through the same containment as any client choice, and index.mjs refuses it on a non-loopback host.

Parameters#

dir

any

Returns#

void


updateSettings()#

updateSettings(__namedParameters?): object

Defined in: ui/server/src/settings.mjs:188

Parameters#

__namedParameters?

Returns#

object

availableProviders

availableProviders: string[]

availableProvidersByCapability

availableProvidersByCapability: object

Index Signature

[k: string]: string[]

browseRoots

browseRoots: any[]

lastProject

lastProject: string

llmProvider

llmProvider: any = llmProviders.importFill

llmProviders

llmProviders: any

projectDir

projectDir: string

projectRelative

projectRelative: any

workspaceRoot

workspaceRoot: any

Throws#

for a projectDir outside the workspace / missing / not a directory; Error for a bad provider.