fix: reduce spacing between consecutive tool calls in TUI

This commit is contained in:
0xallam
2026-01-08 17:53:16 -08:00
parent dc5043452e
commit c53a0f6b64
2 changed files with 20 additions and 28 deletions

View File

@@ -307,9 +307,8 @@ VulnerabilityDetailScreen {
} }
.tool-call { .tool-call {
margin: 0 !important; margin-top: 1;
margin-top: 0 !important; margin-bottom: 0;
margin-bottom: 0 !important;
padding: 0 1; padding: 0 1;
background: transparent; background: transparent;
border: none; border: none;
@@ -318,24 +317,21 @@ VulnerabilityDetailScreen {
.tool-call.status-completed { .tool-call.status-completed {
background: transparent; background: transparent;
margin: 0 !important; margin-top: 1;
margin-top: 0 !important; margin-bottom: 0;
margin-bottom: 0 !important;
} }
.tool-call.status-running { .tool-call.status-running {
background: transparent; background: transparent;
margin: 0 !important; margin-top: 1;
margin-top: 0 !important; margin-bottom: 0;
margin-bottom: 0 !important;
} }
.tool-call.status-failed, .tool-call.status-failed,
.tool-call.status-error { .tool-call.status-error {
background: transparent; background: transparent;
margin: 0 !important; margin-top: 1;
margin-top: 0 !important; margin-bottom: 0;
margin-bottom: 0 !important;
} }
.browser-tool, .browser-tool,
@@ -349,17 +345,15 @@ VulnerabilityDetailScreen {
.web-search-tool, .web-search-tool,
.scan-info-tool, .scan-info-tool,
.subagent-info-tool { .subagent-info-tool {
margin: 0 !important; margin-top: 1;
margin-top: 0 !important; margin-bottom: 0;
margin-bottom: 0 !important;
background: transparent; background: transparent;
} }
.finish-tool, .finish-tool,
.reporting-tool { .reporting-tool {
margin: 0 !important; margin-top: 1;
margin-top: 0 !important; margin-bottom: 0;
margin-bottom: 0 !important;
background: transparent; background: transparent;
} }
@@ -386,9 +380,8 @@ VulnerabilityDetailScreen {
.subagent-info-tool.status-completed, .subagent-info-tool.status-completed,
.subagent-info-tool.status-running { .subagent-info-tool.status-running {
background: transparent; background: transparent;
margin: 0 !important; margin-top: 1;
margin-top: 0 !important; margin-bottom: 0;
margin-bottom: 0 !important;
} }
.finish-tool.status-completed, .finish-tool.status-completed,
@@ -396,9 +389,8 @@ VulnerabilityDetailScreen {
.reporting-tool.status-completed, .reporting-tool.status-completed,
.reporting-tool.status-running { .reporting-tool.status-running {
background: transparent; background: transparent;
margin: 0 !important; margin-top: 1;
margin-top: 0 !important; margin-bottom: 0;
margin-bottom: 0 !important;
} }
Tree { Tree {

View File

@@ -1021,7 +1021,7 @@ class StrixTUIApp(App): # type: ignore[misc]
if content: if content:
if renderables: if renderables:
renderables.append(Text("\n")) renderables.append(Text(""))
renderables.append(content) renderables.append(content)
if self.selected_agent_id: if self.selected_agent_id:
@@ -1030,7 +1030,7 @@ class StrixTUIApp(App): # type: ignore[misc]
streaming_text = self._render_streaming_content(streaming) streaming_text = self._render_streaming_content(streaming)
if streaming_text: if streaming_text:
if renderables: if renderables:
renderables.append(Text("\n")) renderables.append(Text(""))
renderables.append(streaming_text) renderables.append(streaming_text)
if not renderables: if not renderables:
@@ -1055,7 +1055,7 @@ class StrixTUIApp(App): # type: ignore[misc]
text_content = AgentMessageRenderer.render_simple(segment.content) text_content = AgentMessageRenderer.render_simple(segment.content)
if renderables: if renderables:
renderables.append(Text("\n")) renderables.append(Text(""))
renderables.append(text_content) renderables.append(text_content)
elif segment.type == "tool": elif segment.type == "tool":
@@ -1065,7 +1065,7 @@ class StrixTUIApp(App): # type: ignore[misc]
segment.is_complete, segment.is_complete,
) )
if renderables: if renderables:
renderables.append(Text("\n")) renderables.append(Text(""))
renderables.append(tool_renderable) renderables.append(tool_renderable)
if not renderables: if not renderables: