app

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright 2026 Teradata

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package app provides app types compatible with Crush's interface. This is a facade that wraps the adapter.LoomApp.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Sessions         session.Service
	Messages         message.Service
	History          history.Service
	Permissions      permission.Service
	AgentCoordinator agent.Coordinator
	LSPClients       *LSPClientMap // Stub for LSP clients
	// contains filtered or unexported fields
}

App represents the application. In Loom, this is a facade over the adapter.LoomApp.

func NewFromClient

func NewFromClient(c *client.Client, events chan tea.Msg) *App

NewFromClient creates a new App from a gRPC client. This is the main factory function for creating an App in Loom.

func (*App) Client

func (a *App) Client() *client.Client

Client returns the underlying gRPC client.

func (*App) Config

func (a *App) Config() *Config

Config returns the application configuration.

func (*App) InitCoderAgent

func (a *App) InitCoderAgent() error

InitCoderAgent initializes the coder agent.

func (*App) SetAgentID

func (a *App) SetAgentID(agentID string)

SetAgentID sets the current agent/thread ID on the coordinator and sessions.

func (*App) Shutdown

func (a *App) Shutdown()

Shutdown performs graceful shutdown.

func (*App) Subscribe

func (a *App) Subscribe(program *tea.Program)

Subscribe sends events to the TUI.

func (*App) UpdateAgentModel

func (a *App) UpdateAgentModel(ctx context.Context) error

UpdateAgentModel updates the agent model.

type CompletionOptions

type CompletionOptions struct {
	Depth int
	Limit int
}

CompletionOptions holds completion settings.

func (CompletionOptions) Limits

func (c CompletionOptions) Limits() (int, int)

Limits returns the depth and limit for completions.

type Config

type Config struct {
	Options ConfigOptions
	// contains filtered or unexported fields
}

Config represents application configuration.

func (*Config) SetWorkingDir

func (c *Config) SetWorkingDir(dir string)

SetWorkingDir sets the working directory.

func (*Config) WorkingDir

func (c *Config) WorkingDir() string

WorkingDir returns the working directory.

type ConfigOptions

type ConfigOptions struct {
	Editor       string
	InitializeAs string
	TUI          TUIOptions
}

ConfigOptions represents configuration options.

type LSPClientMap

type LSPClientMap struct{}

LSPClientMap is a stub for LSP clients map.

func (*LSPClientMap) Len

func (m *LSPClientMap) Len() int

Len returns the number of clients.

func (*LSPClientMap) Seq

func (m *LSPClientMap) Seq(fn func(string, interface{}) bool)

Seq returns an iterator over LSP clients (empty).

func (*LSPClientMap) Values

func (m *LSPClientMap) Values() func(yield func(interface{}) bool)

Values returns an iterator over values.

type TUIOptions

type TUIOptions struct {
	DiffMode    string
	Completions CompletionOptions
}

TUIOptions represents TUI-specific options.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL