docs(ax): add remaining usage examples
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
398f59f461
commit
6c246a7165
4 changed files with 23 additions and 1 deletions
|
|
@ -19,6 +19,8 @@ import (
|
|||
)
|
||||
|
||||
// AgentOptions configures the agentic service.
|
||||
//
|
||||
// opts := agentic.AgentOptions{}
|
||||
type AgentOptions struct{}
|
||||
|
||||
// PrepSubsystem provides agentic MCP tools for workspace orchestration.
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@ package agentic
|
|||
|
||||
import core "dappco.re/go/core"
|
||||
|
||||
func ExampleAgentOptions() {
|
||||
opts := AgentOptions{}
|
||||
core.Println(opts == AgentOptions{})
|
||||
// Output: true
|
||||
}
|
||||
|
||||
func ExamplePrepInput() {
|
||||
input := PrepInput{Repo: "go-io", Issue: 42}
|
||||
core.Println(input.Repo, input.Issue)
|
||||
|
|
|
|||
|
|
@ -197,6 +197,10 @@ func Persona(path string) core.Result {
|
|||
// --- Workspace Templates ---
|
||||
|
||||
// WorkspaceData is the data passed to workspace templates.
|
||||
//
|
||||
// data := &lib.WorkspaceData{
|
||||
// Repo: "go-io", Task: "fix tests", Agent: "codex", BuildCmd: "go build ./...",
|
||||
// }
|
||||
type WorkspaceData struct {
|
||||
Repo string
|
||||
Branch string
|
||||
|
|
@ -288,7 +292,6 @@ func ListPersonas() []string {
|
|||
return a.AsSlice()
|
||||
}
|
||||
|
||||
|
||||
// listNamesRecursive walks an embed tree via Data.ListNames.
|
||||
// Directories are recursed into. Files are added as slugs (extension stripped by ListNames).
|
||||
// A name can be both a file AND a directory (e.g. code/review.md + code/review/).
|
||||
|
|
|
|||
|
|
@ -82,6 +82,17 @@ func ExampleTaskBundle() {
|
|||
// true
|
||||
}
|
||||
|
||||
func ExampleWorkspaceData() {
|
||||
data := &WorkspaceData{
|
||||
Repo: "go-io",
|
||||
Task: "fix tests",
|
||||
Agent: "codex",
|
||||
BuildCmd: "go build ./...",
|
||||
}
|
||||
core.Println(data.Repo, data.Agent, data.BuildCmd)
|
||||
// Output: go-io codex go build ./...
|
||||
}
|
||||
|
||||
func ExampleExtractWorkspace() {
|
||||
dir := (&core.Fs{}).NewUnrestricted().TempDir("example-ws")
|
||||
defer (&core.Fs{}).NewUnrestricted().DeleteAll(dir)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue