Help us shape the future of Go! Take the 2026 Go Developer Survey

crush

package
v0.0.204 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractSSEData

func ExtractSSEData(line string) string

func FindAgentPath

func FindAgentPath(env *exec.Env) (string, error)

func UnwrapEvent

func UnwrapEvent(data []byte) (*crush_types.Event, error)

Types

type CrushAgent

type CrushAgent struct {
	AgentPath     string
	SettingsPath  string
	Workspace     string
	Env           *exec.Env
	LastSessionID string
	ServerClient  *CrushServerClient
}

func (*CrushAgent) Ask

func (a *CrushAgent) Ask(ctx context.Context, question string, opts *registry.AskOptions, onDelta registry.DeltaCallback) (string, error)

func (*CrushAgent) ListModels

func (a *CrushAgent) ListModels(ctx context.Context) ([]registry.ModelInfo, error)

type CrushServerClient

type CrushServerClient struct {
	// contains filtered or unexported fields
}

func NewCrushServerClient

func NewCrushServerClient() (*CrushServerClient, error)

func (*CrushServerClient) CreateSession

func (c *CrushServerClient) CreateSession(ctx context.Context, workspaceID string, title string) (string, error)

func (*CrushServerClient) CreateWorkspace

func (c *CrushServerClient) CreateWorkspace(ctx context.Context, cwd string) (string, error)

func (*CrushServerClient) EnsureServer

func (c *CrushServerClient) EnsureServer(ctx context.Context) error

func (*CrushServerClient) HealthCheck

func (c *CrushServerClient) HealthCheck(ctx context.Context) (int, error)

func (*CrushServerClient) InitAgent

func (c *CrushServerClient) InitAgent(ctx context.Context, workspaceID string) error

func (*CrushServerClient) KillExistingServer

func (c *CrushServerClient) KillExistingServer()

func (*CrushServerClient) SendMessage

func (c *CrushServerClient) SendMessage(ctx context.Context, workspaceID, prompt, sessionID string) error

func (*CrushServerClient) ServerPID

func (c *CrushServerClient) ServerPID() int

func (*CrushServerClient) ServerStarted

func (c *CrushServerClient) ServerStarted() bool

func (*CrushServerClient) SubscribeEvents

func (c *CrushServerClient) SubscribeEvents(ctx context.Context, workspaceID string) (<-chan string, error)

Jump to

Keyboard shortcuts

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