summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-11-21 11:48:46 +0300
committerGrail Finder <wohilas@gmail.com>2025-11-21 11:48:46 +0300
commitc2ecef69b4fde4ae310c5db1ddbb85855522457b (patch)
tree8b420f461fd46880a2caac658012c501335d2dea
parent866a74e459ee2bec64d2b542394a09143d6d00f4 (diff)
Enha: ctrl+s to show filepath
-rw-r--r--bot.go2
-rw-r--r--tables.go14
-rw-r--r--tools.go16
3 files changed, 21 insertions, 11 deletions
diff --git a/bot.go b/bot.go
index e25ada0..d5b4a97 100644
--- a/bot.go
+++ b/bot.go
@@ -569,7 +569,7 @@ func init() {
}
// load cards
basicCard.Role = cfg.AssistantRole
- toolCard.Role = cfg.AssistantRole
+ // toolCard.Role = cfg.AssistantRole
//
logLevel.Set(slog.LevelInfo)
logger = slog.New(slog.NewTextHandler(logfile, &slog.HandlerOptions{Level: logLevel}))
diff --git a/tables.go b/tables.go
index 07519e6..59c1ec8 100644
--- a/tables.go
+++ b/tables.go
@@ -326,7 +326,7 @@ func makeRAGTable(fileList []string) *tview.Flex {
// }
func makeAgentTable(agentList []string) *tview.Table {
- actions := []string{"load"}
+ actions := []string{"filepath", "load"}
rows, cols := len(agentList), len(actions)+1
chatActTable := tview.NewTable().
SetBorders(true)
@@ -339,6 +339,17 @@ func makeAgentTable(agentList []string) *tview.Table {
SetTextColor(color).
SetAlign(tview.AlignCenter))
} else {
+ if actions[c-1] == "filepath" {
+ cc, ok := sysMap[agentList[r]]
+ if !ok {
+ continue
+ }
+ chatActTable.SetCell(r, c,
+ tview.NewTableCell(cc.FilePath).
+ SetTextColor(color).
+ SetAlign(tview.AlignCenter))
+ continue
+ }
chatActTable.SetCell(r, c,
tview.NewTableCell(actions[c-1]).
SetTextColor(color).
@@ -694,7 +705,6 @@ func makeFilePicker() *tview.Flex {
// Initialize the file list
refreshList(startDir)
-
// Set up keyboard navigation
flex.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
switch event.Key() {
diff --git a/tools.go b/tools.go
index 0f8381c..72b065c 100644
--- a/tools.go
+++ b/tools.go
@@ -70,15 +70,15 @@ After that you are free to respond to the user.
Role: "",
FilePath: "",
}
- toolCard = &models.CharCard{
- SysPrompt: toolSysMsg,
- FirstMsg: defaultFirstMsg,
- Role: "",
- FilePath: "",
- }
+ // toolCard = &models.CharCard{
+ // SysPrompt: toolSysMsg,
+ // FirstMsg: defaultFirstMsg,
+ // Role: "",
+ // FilePath: "",
+ // }
// sysMap = map[string]string{"basic_sys": basicSysMsg, "tool_sys": toolSysMsg}
- sysMap = map[string]*models.CharCard{"basic_sys": basicCard, "tool_sys": toolCard}
- sysLabels = []string{"basic_sys", "tool_sys"}
+ sysMap = map[string]*models.CharCard{"basic_sys": basicCard}
+ sysLabels = []string{"basic_sys"}
)
// web search (depends on extra server)