ci-platforms / darwin amd64 smoke (push) Skipped
ci-platforms / windows amd64 smoke (push) Skipped
ci-platforms / darwin arm64 smoke (push) Skipped
ci / checks (push) Successful in 9m10s
ci / build (amd64, linux, ubuntu-24.04) (push) Successful in 12m25s
ci / release (push) Failing after 4m59s
asset.pixels: pixel art as a character grid and a palette; frames of one size become an atlas with a sprite per frame and a flipbook clip; a preview image in the answer.
asset.svg: an SVG subset drawn by an in-tree rasterizer (format/svg) for tiles, UI and icons.
art module: project.aego art { palette pixelsPerUnit }, the default palette and scale for drawings; Project Health HLT009 for pixel art outside the palette.
The agent prompts say to draw instead of building sprites from rectangles.
Agent runs open the asset index shared without a warning; prefab.create on a scene open in the editor goes through the prefab service, so unsaved scenes work.
scene_run with shot names xvfb when there is no display; local make ci lists untracked files outside .gitignore.
54 lines
1.6 KiB
Go
54 lines
1.6 KiB
Go
package edit
|
|
|
|
import (
|
|
"aego/app/edit/agentbridge"
|
|
"aego/editor/core/agentui"
|
|
"aego/engine/docs"
|
|
)
|
|
|
|
// AgentConfig is how the Agent panel starts its bridge in this editor (D341, D342).
|
|
func (s *Session) AgentConfig() agentbridge.Config {
|
|
return agentbridge.Config{
|
|
Ctx: s.App.Context(),
|
|
Modules: s.Modules,
|
|
OnMain: s.Engine.Jobs().OnMain,
|
|
Bindings: s.Bindings,
|
|
Command: s.App.AgentCommand(),
|
|
ProjectChanged: s.App.ProjectChanged,
|
|
Docs: func() (*docs.Registry, error) { return s.Docs, nil },
|
|
Run: agentRun,
|
|
ProxyConfirm: s.App.ProxyConfirm,
|
|
OnExternal: s.App.ExternalCall,
|
|
Prefabs: s.App.Prefabs(),
|
|
}
|
|
}
|
|
|
|
// agentBridge is the editor's one bridge: the Agent panel's agent and the proxy share its proposals and Undo steps.
|
|
func (s *Session) agentBridge() (*agentbridge.Bridge, error) {
|
|
if s.bridge == nil {
|
|
b, err := agentbridge.Start(s.AgentConfig())
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
s.bridge = b
|
|
}
|
|
return s.bridge, nil
|
|
}
|
|
|
|
// startProxy serves the CLI and outside agents through the bridge while the editor is open (11b6).
|
|
func (s *Session) startProxy() (string, string, error) {
|
|
b, err := s.agentBridge()
|
|
if err != nil {
|
|
return "", "", err
|
|
}
|
|
return b.StartProxy()
|
|
}
|
|
|
|
// agentHost is the Agent panel's host, nil in a headless editor without a backend.
|
|
func (s *Session) agentHost(cfg Config) agentui.Host {
|
|
if cfg.Headless && cfg.AgentBackend == nil {
|
|
return nil
|
|
}
|
|
return newAgentHost(cfg.AgentBackend, s.agentBridge, func() string { return s.App.AgentCommand() }, func(c string) { s.App.SetAgentCommand(c) })
|
|
}
|