File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,9 @@ import (
99)
1010
1111var rootCmd = & cobra.Command {
12- Use : "gh-debug-cli" ,
1312 Short : "A CLI tool for debugging" ,
1413 Long : `This CLI tool allows you to debug your agent by chatting with it locally.` ,
1514 Run : func (cmd * cobra.Command , args []string ) {
16- fmt .Println ("Use 'gh-debug-cli --help' to see available commands" )
1715 },
1816}
1917
Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ const (
1515
1616// streamCmd represents the new command for streaming functionality
1717var 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 .` ,
2121 Run : agentStream ,
2222}
2323
@@ -28,7 +28,11 @@ func init() {
2828func agentStream (cmd * cobra.Command , args []string ) {
2929 fmt .Println ("stream command executed successfully" )
3030
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+ }
3236
3337 result , err := stream .ParseFile (file )
3438 if err != nil {
You can’t perform that action at this time.
0 commit comments