Skip to content

Commit 724c88a

Browse files
committed
fix test for pseudo
1 parent 0cc8986 commit 724c88a

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

command/golang.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func Golang(gopath string) thinker.Cmd {
2727
return thinker.Cmd{
2828
Cmd: GOLANG,
2929
Short: "Use golang to execute scripts (package main) that help you complete your task. Enclose the golang code in <codeblock> tags.",
30-
Syntax: `go <codeblock>source code</codeblock>`,
30+
Syntax: `go <codeblock>source code</codeblock>`,
3131
Run: golang(gopath),
3232
}
3333
}

command/pseudo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func Return() thinker.Cmd {
2727
Run: func(t chatter.Reply) (float64, thinker.CmdOut, error) {
2828
code, err := CodeBlock(RETURN, t.Text)
2929
if err != nil {
30-
return 0.00, thinker.CmdOut{Cmd: GOLANG}, err
30+
return 0.00, thinker.CmdOut{Cmd: RETURN}, err
3131
}
3232
return 1.0, thinker.CmdOut{Cmd: RETURN, Output: code}, nil
3333
},

command/python.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func Python(dir string) thinker.Cmd {
2727
return thinker.Cmd{
2828
Cmd: PYTHON,
2929
Short: "Use python to execute scripts that help you complete your task. Enclose the python code in <codeblock> tags.",
30-
Syntax: `python <codeblock>source code</codeblock>`,
30+
Syntax: `python <codeblock>source code</codeblock>`,
3131
Run: python(dir),
3232
}
3333
}

command/registry_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ func TestRegistry(t *testing.T) {
5151
})
5252

5353
t.Run("FMap", func(t *testing.T) {
54-
conf, out, err := r.Decode(chatter.Reply{Text: "TOOL:return hello world\n"})
54+
conf, out, err := r.Decode(
55+
chatter.Reply{Text: "TOOL:return <codeblock>hello world</codeblock>\n"},
56+
)
5557

5658
it.Then(t).Should(
5759
it.Nil(err),

0 commit comments

Comments
 (0)