2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,9 @@ import (
9
9
)
10
10
11
11
var rootCmd = & cobra.Command {
12
- Use : "gh-debug-cli" ,
13
12
Short : "A CLI tool for debugging" ,
14
13
Long : `This CLI tool allows you to debug your agent by chatting with it locally.` ,
15
14
Run : func (cmd * cobra.Command , args []string ) {
16
- fmt .Println ("Use 'gh-debug-cli --help' to see available commands" )
17
15
},
18
16
}
19
17
Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ const (
15
15
16
16
// streamCmd represents the new command for streaming functionality
17
17
var streamCmd = & cobra.Command {
18
- Use : "stream [ file]" ,
19
- Short : "Stream data to your agent" ,
20
- Long : `The stream command allows you to initiate a data stream to your agent.` ,
18
+ Use : "stream -- file [filename ]" ,
19
+ Short : "Parse stream data from agent" ,
20
+ Long : `Allows you to parse a data stream to your agent response .` ,
21
21
Run : agentStream ,
22
22
}
23
23
@@ -28,7 +28,11 @@ func init() {
28
28
func agentStream (cmd * cobra.Command , args []string ) {
29
29
fmt .Println ("stream command executed successfully" )
30
30
31
- file := args [0 ]
31
+ file , _ := cmd .Flags ().GetString (streamCmdFileFlag )
32
+ if file == "" {
33
+ fmt .Fprintln (os .Stderr , "Error: --file [file] is required" )
34
+ os .Exit (1 )
35
+ }
32
36
33
37
result , err := stream .ParseFile (file )
34
38
if err != nil {
0 commit comments