Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/server/src/settings

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, next. Source: ui/server/src/settings.mjs.

Functions#

getBrowseRoots()#

getBrowseRoots(): any[]

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

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:239

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:260

Returns#

object

availableProviders

availableProviders: string[]

availableProvidersByCapability

availableProvidersByCapability: object

Index Signature

[k: string]: string[]

browseRoots

browseRoots: any[]

fellBackFrom

fellBackFrom: any

lastProject

lastProject: string

llmModels

llmModels: any

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:116

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:106

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


settingsFilePath()#

settingsFilePath(login): any

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

The settings file for login ('' = no session keeps the shared settings.json), mirroring lastProjectFilePath's per-login naming and the same safe-segment validation.

Parameters#

login

any

Returns#

any


updateSettings()#

updateSettings(__namedParameters?): object

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

Parameters#

__namedParameters?

Returns#

object

availableProviders

availableProviders: string[]

availableProvidersByCapability

availableProvidersByCapability: object

Index Signature

[k: string]: string[]

browseRoots

browseRoots: any[]

fellBackFrom

fellBackFrom: any

lastProject

lastProject: string

llmModels

llmModels: any

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 or model.