• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kshard / thinker / 15084249817

17 May 2025 10:20AM UTC coverage: 54.037% (-4.2%) from 58.222%
15084249817

push

github

web-flow
establish agent taxonomy - prompter, manifold, automata (#20)

331 of 612 new or added lines in 28 files covered. (54.08%)

8 existing lines in 4 files now uncovered.

609 of 1127 relevant lines covered (54.04%)

0.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.59
/command/return.go
1
//
2
// Copyright (C) 2025 Dmitry Kolesnikov
3
//
4
// This file may be modified and distributed under the terms
5
// of the MIT license.  See the LICENSE file for details.
6
// https://github.com/kshard/thinker
7
//
8

9
package command
10

11
import (
12
        "encoding/json"
13

14
        "github.com/kshard/thinker"
15
)
16

17
// A unique name for return command
18
const RETURN = "return"
19

20
// Creates new return command, instructing LLM return results
21
func Return() thinker.Cmd {
1✔
22
        return thinker.Cmd{
1✔
23
                Cmd:   RETURN,
1✔
24
                About: "indicate that workflow is completed and returns the expected result.",
1✔
25
                Args: []thinker.Arg{
1✔
26
                        {
1✔
27
                                Name:  "value",
1✔
28
                                Type:  "string",
1✔
29
                                About: `value to return as the workflow completion`,
1✔
30
                        },
1✔
31
                },
1✔
32
                Run: func(in json.RawMessage) ([]byte, error) {
1✔
NEW
33
                        var reply replyReturn
×
NEW
34
                        if err := json.Unmarshal(in, &reply); err != nil {
×
NEW
35
                                return nil, err
×
NEW
36
                        }
×
37

NEW
38
                        return []byte(reply.Value), nil
×
39
                },
40
        }
41
}
42

43
type replyReturn struct {
44
        Value string `json:"value,omitempty"`
45
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc