Skip to content

armgit / strix

Public Imported from GitHub
0

Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.

fix: reduce spacing between consecutive tool calls in TUI

0xallamc53a0f6b64c2
diff --git a/strix/interface/assets/tui_styles.tcss b/strix/interface/assets/tui_styles.tcss
index f800c5d0..c4693c86 100644
--- a/strix/interface/assets/tui_styles.tcss
+++ b/strix/interface/assets/tui_styles.tcss
@@ -307,9 +307,8 @@ VulnerabilityDetailScreen {
}
.tool-call {
- margin: 0 !important;
- margin-top: 0 !important;
- margin-bottom: 0 !important;
+ margin-top: 1;
+ margin-bottom: 0;
padding: 0 1;
background: transparent;
border: none;
@@ -318,24 +317,21 @@ VulnerabilityDetailScreen {
.tool-call.status-completed {
background: transparent;
- margin: 0 !important;
- margin-top: 0 !important;
- margin-bottom: 0 !important;
+ margin-top: 1;
+ margin-bottom: 0;
}
.tool-call.status-running {
background: transparent;
- margin: 0 !important;
- margin-top: 0 !important;
- margin-bottom: 0 !important;
+ margin-top: 1;
+ margin-bottom: 0;
}
.tool-call.status-failed,
.tool-call.status-error {
background: transparent;
- margin: 0 !important;
- margin-top: 0 !important;
- margin-bottom: 0 !important;
+ margin-top: 1;
+ margin-bottom: 0;
}
.browser-tool,
@@ -349,17 +345,15 @@ VulnerabilityDetailScreen {
.web-search-tool,
.scan-info-tool,
.subagent-info-tool {
- margin: 0 !important;
- margin-top: 0 !important;
- margin-bottom: 0 !important;
+ margin-top: 1;
+ margin-bottom: 0;
background: transparent;
}
.finish-tool,
.reporting-tool {
- margin: 0 !important;
- margin-top: 0 !important;
- margin-bottom: 0 !important;
+ margin-top: 1;
+ margin-bottom: 0;
background: transparent;
}
@@ -386,9 +380,8 @@ VulnerabilityDetailScreen {
.subagent-info-tool.status-completed,
.subagent-info-tool.status-running {
background: transparent;
- margin: 0 !important;
- margin-top: 0 !important;
- margin-bottom: 0 !important;
+ margin-top: 1;
+ margin-bottom: 0;
}
.finish-tool.status-completed,
@@ -396,9 +389,8 @@ VulnerabilityDetailScreen {
.reporting-tool.status-completed,
.reporting-tool.status-running {
background: transparent;
- margin: 0 !important;
- margin-top: 0 !important;
- margin-bottom: 0 !important;
+ margin-top: 1;
+ margin-bottom: 0;
}
Tree {
diff --git a/strix/interface/tui.py b/strix/interface/tui.py
index 39ddefb8..2414be69 100644
--- a/strix/interface/tui.py
+++ b/strix/interface/tui.py
@@ -1021,7 +1021,7 @@ class StrixTUIApp(App): # type: ignore[misc]
if content:
if renderables:
- renderables.append(Text("\n"))
+ renderables.append(Text(""))
renderables.append(content)
if self.selected_agent_id:
@@ -1030,7 +1030,7 @@ class StrixTUIApp(App): # type: ignore[misc]
streaming_text = self._render_streaming_content(streaming)
if streaming_text:
if renderables:
- renderables.append(Text("\n"))
+ renderables.append(Text(""))
renderables.append(streaming_text)
if not renderables:
@@ -1055,7 +1055,7 @@ class StrixTUIApp(App): # type: ignore[misc]
text_content = AgentMessageRenderer.render_simple(segment.content)
if renderables:
- renderables.append(Text("\n"))
+ renderables.append(Text(""))
renderables.append(text_content)
elif segment.type == "tool":
@@ -1065,7 +1065,7 @@ class StrixTUIApp(App): # type: ignore[misc]
segment.is_complete,
)
if renderables:
- renderables.append(Text("\n"))
+ renderables.append(Text(""))
renderables.append(tool_renderable)
if not renderables: