You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: internal/agent/runtime_tools.go
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,15 @@ func (a *Agent) SetProjectRuntime(m *coderuntime.Manager) {
29
29
func (a*Agent) registerProjectRuntimeTools() {
30
30
reg:=a.registry
31
31
32
+
// Surface the registered templates so the model can pick one by name
33
+
// (and knows the default). Built at registration time — the manager has
34
+
// every RegisterTemplate applied before SetProjectRuntime runs.
35
+
tmplDesc:="Template ref to scaffold from on first boot (e.g. \"shipany-tanstack\"). Optional once a runtime already exists; the deployment's default is used when omitted."
tmplDesc=fmt.Sprintf("Template ref to scaffold from on first boot. Available: %s — the first is the default, used when omitted. Optional once a runtime already exists.",
38
+
strings.Join(refs, ", "))
39
+
}
40
+
32
41
reg.Register(
33
42
"start_app_preview",
34
43
"PRIMARY tool for building a web app / website / landing page / dashboard — INCLUDING requests like 'use template X to make Y' or '用某模板做个…'. "+
@@ -40,7 +49,7 @@ func (a *Agent) registerProjectRuntimeTools() {
40
49
"properties": map[string]any{
41
50
"template": map[string]any{
42
51
"type": "string",
43
-
"description": "Template ref to scaffold from on first boot (e.g. \"shipany-tanstack\"). Optional once a runtime already exists; the deployment's default is used when omitted.",
0 commit comments