convenience tags
This commit is contained in:
parent
4f93c7499a
commit
d90c19a57d
8
main.go
8
main.go
|
|
@ -174,7 +174,7 @@ func openChat(sid string) {
|
|||
}
|
||||
w.Name("%s", winName)
|
||||
w.Ctl("cleartag")
|
||||
w.Fprintf("tag", " Prompt Stop Ctl")
|
||||
w.Fprintf("tag", " Prompt Stop Ctl Cfg Nudge Usage")
|
||||
|
||||
cw := &chatWin{win: w, sid: sid}
|
||||
chatWindows.Store(sid, cw)
|
||||
|
|
@ -204,6 +204,12 @@ func (cw *chatWin) eventLoop() {
|
|||
os.WriteFile(filepath.Join(ollie, "s", cw.sid, "ctl"), []byte("stop"), 0644) //nolint:errcheck
|
||||
case "Ctl":
|
||||
openFile(filepath.Join(ollie, "s", cw.sid, "ctl"))
|
||||
case "Cfg":
|
||||
openFile(filepath.Join(ollie, "s", cw.sid, "cfg"))
|
||||
case "Nudge":
|
||||
os.WriteFile(filepath.Join(ollie, "s", cw.sid, "prompt"), []byte("."), 0644) //nolint:errcheck
|
||||
case "Usage":
|
||||
openFile(filepath.Join(ollie, "s", cw.sid, "usage"))
|
||||
default:
|
||||
cw.win.WriteEvent(e)
|
||||
}
|
||||
|
|
|
|||
Reference in New Issue