Skip to content

Commit 64d1477

Browse files
committed
fix: correct width calculations and improve logging in tool command
This commit adjusts the width calculations for the main content and debug panel in the TUI. It also refines the logging of tool command arguments, ensuring that the pretty-printed arguments are logged correctly regardless of the verbosity setting. These changes enhance the clarity of the UI layout and improve debugging capabilities.
1 parent 5f5f468 commit 64d1477

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

main.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@ func (m AppModel) View() string {
375375
return fmt.Sprintf("Error: %v\n\nPress ctrl+c to quit.", m.err)
376376
}
377377

378-
debugWidth := m.width / 3
379-
mainWidth := m.width - debugWidth
378+
mainWidth := m.width / 3
379+
//debugWidth := m.width - mainWidth
380380

381381
var mainContent strings.Builder
382382
switch m.state {
@@ -427,13 +427,11 @@ func (m *AppModel) callToolCmd() tea.Cmd {
427427
args[name] = m.argInputs[i].Value()
428428
}
429429

430-
if verbose {
431-
prettyArgs, err := json.MarshalIndent(args, "", " ")
432-
if err != nil {
433-
m.logf("Error marshalling args: %v", err)
434-
}
435-
m.logf("Calling tool '%s' with args:\n%s", m.selectedTool.Name, string(prettyArgs))
430+
prettyArgs, err := json.MarshalIndent(args, "", " ")
431+
if err != nil {
432+
m.logf("Error marshalling args: %v", err)
436433
}
434+
m.logf("Calling tool '%s' with args:\n%s", m.selectedTool.Name, string(prettyArgs))
437435

438436
params := &mcp.CallToolParams{
439437
Name: m.selectedTool.Name,

0 commit comments

Comments
 (0)