deploy draft
Change-Id: Ied7209985584e121e8874c1562344d6cdd14ab49
diff --git a/dodo_tools/dodo.go b/dodo_tools/dodo.go
index fdb7c8f..2eccd45 100644
--- a/dodo_tools/dodo.go
+++ b/dodo_tools/dodo.go
@@ -134,20 +134,6 @@
projectId string
}
-const (
- deployProjectSchemaInputSchema = `
-{
- "type": "object",
- "properties": {
- "config": {
- "type": "string",
- "description": "Serialized dodo-app configuration to deploy"
- }
- }
-}
-`
-)
-
func NewDeployProjectTool(apiBaseAddress string, projectId string) *llm.Tool {
tool := &DeployProjectTool{
apiBaseAddress: apiBaseAddress,
@@ -157,33 +143,19 @@
return &llm.Tool{
Name: "dodo_deploy_project",
Description: "A tool for deploying the dodo-app configuration",
- InputSchema: llm.MustSchema(deployProjectSchemaInputSchema),
+ InputSchema: llm.EmptySchema(),
Run: tool.Run,
EndsTurn: true,
}
}
-type DeployProjectInput struct {
- Config string `json:"config"`
-}
-
-type DeployProjectOutput struct {
- Success bool `json:"success"`
- Errors any `json:"errors,omitempty"`
-}
-
type deployProjectReq struct {
- Config map[string]any `json:"config"`
+ Type string `json:"type"`
}
func (d *DeployProjectTool) Run(ctx context.Context, m json.RawMessage) ([]llm.Content, error) {
- var input DeployProjectInput
- if err := json.Unmarshal(m, &input); err != nil {
- return nil, err
- }
- req := deployProjectReq{}
- if err := json.Unmarshal([]byte(input.Config), &req.Config); err != nil {
- return nil, err
+ req := deployProjectReq{
+ Type: "draft",
}
jsonReq, err := json.Marshal(req)
if err != nil {
@@ -216,10 +188,6 @@
{
"type": "object",
"properties": {
- "config": {
- "type": "string",
- "description": "Serialized dodo-app configuration to save"
- }
}
}
`
@@ -244,11 +212,6 @@
Config string `json:"config"`
}
-type SaveProjectOutput struct {
- Success bool `json:"success"`
- Errors any `json:"errors,omitempty"`
-}
-
type saveProjectReq struct {
Type string `json:"type"`
Config map[string]any `json:"config"`
@@ -288,7 +251,7 @@
return []*llm.Tool{
NewGetProjectConfigTool(apiBaseAddress, projectId),
NewValidateConfigTool(apiBaseAddress),
- NewDeployProjectTool(apiBaseAddress, projectId),
NewSaveProjectTool(apiBaseAddress, projectId),
+ NewDeployProjectTool(apiBaseAddress, projectId),
}
}