Package-level declarations

Types

Link copied to clipboard
@Immutable
data class CommitFile(val path: String, val change: FileChange = FileChange.MODIFIED, val additions: Int = 0, val deletions: Int = 0)

A changed file in a Commit with its line counts.

Link copied to clipboard
@Immutable
data class EnvironmentVariable(val name: String, val value: String, val secret: Boolean = true)

A variable in EnvironmentVariables; secret values stay masked until revealed.

Link copied to clipboard

How a file changed in a Commit.

Link copied to clipboard
@Immutable
data class FileNode(val name: String, val path: String = name, val children: List<FileNode>? = null, val badge: String? = null)

A file or folder. path identifies it (selection, expansion); badge is a short status such as M, A, +12.

Link copied to clipboard

The size of a dependency change in PackageInfo.

Link copied to clipboard
@Immutable
data class SandboxTab(val label: String, val content: @Composable () -> Unit)

One tab of a Sandbox.

Link copied to clipboard
@Immutable
data class SchemaParameter(val name: String, val type: String, val required: Boolean = false, val description: String? = null, val location: String? = null)

A parameter of an endpoint in SchemaDisplay; location is where it goes (path, query, header, body).

Link copied to clipboard

Where a command is in its life.

Link copied to clipboard
@Immutable
data class TestCaseResult(val name: String, val status: TestStatus, val durationMs: Long? = null, val error: String? = null)

One test; error is shown under failed tests.

Link copied to clipboard

Outcome of a test in TestResults.

Link copied to clipboard
@Immutable
data class TestSuiteResult(val name: String, val tests: List<TestCaseResult>)

A group of tests in TestResults.

Functions

Link copied to clipboard
@Composable
fun Artifact(title: String, modifier: Modifier = Modifier, description: String? = null, actions: @Composable RowScope.() -> Unit = {}, content: @Composable () -> Unit)

A generated artifact — a document, code file, chart… (AI Elements <Artifact>): a titled card with header actions and free-form content.

Link copied to clipboard
@Composable
fun Commit(hash: String, message: String, modifier: Modifier = Modifier, author: String? = null, timestampMs: Long? = null, files: List<CommitFile> = emptyList())

A git commit (AI Elements <Commit>): short hash (copyable), subject and body, author and time, then changed files with +/- counts.

Link copied to clipboard
@Composable
fun EnvironmentVariables(variables: List<EnvironmentVariable>, modifier: Modifier = Modifier, title: String = stringResource(R.string.ai_environment_variables))

Environment variables (AI Elements <EnvironmentVariables>): secret values stay masked until revealed one by one; each can be copied.

Link copied to clipboard
@Composable
fun FileTree(nodes: List<FileNode>, modifier: Modifier = Modifier, selectedPath: String? = null, expanded: Set<String> = nodes.filter { it.isFolder }.map { it.path }.toSet(), onSelect: (FileNode) -> Unit? = null)

A project tree (AI Elements <FileTree>): folders expand in place, files get type icons, the selectedPath is highlighted. expanded paths start open (default: top-level folders).

Link copied to clipboard
@Composable
fun PackageInfo(name: String, modifier: Modifier = Modifier, fromVersion: String? = null, toVersion: String? = null, change: PackageChange? = null, description: String? = null)

A dependency change (AI Elements <PackageInfo>): name, old → new version, how big the change is, and optionally what it does.

Link copied to clipboard
@Composable
fun Sandbox(title: String, tabs: List<SandboxTab>, modifier: Modifier = Modifier, subtitle: String? = null)

A run environment with tabs (AI Elements <Sandbox>) — e.g. Code, Preview, Console — sharing one card.

Link copied to clipboard
@Composable
fun SchemaDisplay(method: String, path: String, modifier: Modifier = Modifier, description: String? = null, parameters: List<SchemaParameter> = emptyList(), requestBody: String? = null, responseBody: String? = null)

An API endpoint (AI Elements <SchemaDisplay>): method and path, what it does, its parameters, and example request / response bodies.

Link copied to clipboard
@Composable
fun Snippet(text: String, modifier: Modifier = Modifier, prefix: String? = null)

A one-line command or value to copy (AI Elements <Snippet>), e.g. npm i ai. prefix (like $) is shown but not copied.

Link copied to clipboard
@Composable
fun StackTrace(trace: String, modifier: Modifier = Modifier, collapsedFrames: Int = 6)

A readable exception (AI Elements <StackTrace>): type and message up front, the app's own frames emphasised, library frames collapsed until asked for, with copy of the raw trace.

Link copied to clipboard
@Composable
fun Terminal(output: String, modifier: Modifier = Modifier, title: String = stringResource(R.string.ai_terminal), status: TerminalStatus? = null, exitCode: Int? = null, maxHeight: Dp = 320.dp, onClear: () -> Unit? = null, scrollback: Int)

Command output (AI Elements <Terminal>): a dark console that renders ANSI colors and bold, follows new output while status is running, with copy and an optional clear action.

Link copied to clipboard
@Composable
fun TestResults(suites: List<TestSuiteResult>, modifier: Modifier = Modifier, durationMs: Long? = null)

A test run (AI Elements <TestResults>): pass / fail / skip counts and a proportional bar, then suites that expand to their cases. Failed suites start open and show each failure's message.

Link copied to clipboard
@Composable
fun WebPreview(url: String, modifier: Modifier = Modifier, html: String? = null, height: Dp = 360.dp)

A live preview of a generated web page or URL (AI Elements <WebPreview>): navigation bar with back / reload / open-in-browser and a sandboxed WebView. Pass html to preview generated markup instead of loading url.