forked from 1b-agent/fieldcraft-upstream
engine: a typed parameter schema per command (CommandSpec::form)
Field, Kind, Dim and Collection describe a command's JSON parameters: numbers with unit dimensions, choices, vectors, references to model items, groups, one-of variants and rows. prefill, switch_variant and problems serve forms; json_schema gives the same as JSON Schema. No command is described yet (form: None). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6a604c24b6
commit
5c5516aae0
16 files changed
+816
-10
No files matched your search
@@ -36,6 +36,7 @@ pub const UNDO: CommandSpec = CommandSpec {
|
||||
id: "edit.undo",
|
||||
label: "Undo",
|
||||
params: r#"{"count"?: 1} — takes back the last command that changed the model (it leaves the journal and can be redone); `count` takes back that many, as far as the history reaches"#,
|
||||
form: None,
|
||||
kind: CommandKind::Session,
|
||||
run: |s, p| repeat(s, p, Session::undo),
|
||||
};
|
||||
@@ -44,6 +45,7 @@ pub const REDO: CommandSpec = CommandSpec {
|
||||
id: "edit.redo",
|
||||
label: "Redo",
|
||||
params: r#"{"count"?: 1} — runs the last undone command's change again; `count` redoes that many, as far as there are undone commands"#,
|
||||
form: None,
|
||||
kind: CommandKind::Session,
|
||||
run: |s, p| repeat(s, p, Session::redo),
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user