Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

refactor: rename balanced view mode to minimal, limit tool step visibility, and ignore tool feedback promises

Salman Qureshidfeb2211ff21
diff --git a/src/core/agent.ts b/src/core/agent.ts
index d83809d3..56e1c333 100644
--- a/src/core/agent.ts
+++ b/src/core/agent.ts
@@ -762,7 +762,7 @@ export class Agent {
if (channel && msg.channelType !== 'internal') {
if (channel instanceof CLIChannel) {
for (const tc of toolCalls) {
- await (channel as CLIChannel).sendToolFeedback(tc.toolName, tc.input as Record<string, any>).catch(() => {});
+ void (channel as CLIChannel).sendToolFeedback(tc.toolName, tc.input as Record<string, any>).catch(() => {});
}
if (toolResults) {
for (let i = 0; i < toolResults.length; i++) {
@@ -776,7 +776,7 @@ export class Agent {
} else if (channel instanceof TelegramChannel) {
const tgCh = channel as TelegramChannel;
for (const tc of toolCalls) {
- await tgCh.sendToolFeedback(tc.toolName, tc.input as Record<string, any>, msg.channelId).catch(() => {});
+ void tgCh.sendToolFeedback(tc.toolName, tc.input as Record<string, any>, msg.channelId).catch(() => {});
}
if (toolResults) {
for (let i = 0; i < toolResults.length; i++) {
@@ -927,7 +927,7 @@ export class Agent {
if (channel && msg.channelType !== 'internal') {
if (channel instanceof CLIChannel) {
for (const tc of toolCalls) {
- await (channel as CLIChannel).sendToolFeedback(tc.toolName, tc.input as Record<string, any>).catch(() => {});
+ void (channel as CLIChannel).sendToolFeedback(tc.toolName, tc.input as Record<string, any>).catch(() => {});
}
if (toolResults) {
for (let i = 0; i < toolResults.length; i++) {
@@ -941,7 +941,7 @@ export class Agent {
} else if (channel instanceof TelegramChannel) {
const tgCh = channel as TelegramChannel;
for (const tc of toolCalls) {
- await tgCh.sendToolFeedback(tc.toolName, tc.input as Record<string, any>, msg.channelId).catch(() => {});
+ void tgCh.sendToolFeedback(tc.toolName, tc.input as Record<string, any>, msg.channelId).catch(() => {});
}
if (toolResults) {
for (let i = 0; i < toolResults.length; i++) {
diff --git a/src/ui/App.tsx b/src/ui/App.tsx
index 02747145..ad1d0efd 100644
--- a/src/ui/App.tsx
+++ b/src/ui/App.tsx
@@ -502,6 +502,7 @@ function StatusBarView({ state }: { state: TuiState }) {
tokenBar = `[${'█'.repeat(filled)}${'░'.repeat(20 - filled)}] ${state.tokenInfo.percentage}%`;
}
const providerBadge = state.provider ? `⚡ ${state.provider.name} · ${state.provider.model}` : '⚡ No provider';
+ const viewLabel = state.viewMode === 'balanced' ? 'minimal' : 'detailed';
return (
<Box flexDirection="column">
@@ -516,7 +517,7 @@ function StatusBarView({ state }: { state: TuiState }) {
<Text bold color="cyan">{state.agentName}</Text>
{state.programmingMode !== 'off' && <Text> <Text color={modeColor} bold>{modeLabel}</Text></Text>}
{state.projectContext && <Text> <Text color="gray">|</Text> <Text color="blue">{state.projectContext}</Text></Text>}
- <Text> <Text color="gray">|</Text> <Text color="yellow">View: {state.viewMode}</Text></Text>
+ <Text> <Text color="gray">|</Text> <Text color="yellow">View: {viewLabel}</Text></Text>
<Text> <Text color="gray">|</Text> <Text color="green">{state.permissionMode === 'allow-all' ? '🔓' : '🔒'}</Text></Text>
</Box>
<Text color="magenta">{providerBadge}</Text>
@@ -744,12 +745,12 @@ function ChatMessagesView({ messages, agentName }: { messages: ChatMessage[]; ag
}
function ToolStepsView({ steps, viewMode }: { steps: ToolStep[]; viewMode: 'balanced' | 'detailed' }) {
- const visible = viewMode === 'detailed' ? steps.slice(-20) : steps.slice(-6);
+ const visible = viewMode === 'detailed' ? steps.slice(-20) : steps.slice(-1);
const runningCount = visible.filter((s) => s.status === 'running').length;
const doneCount = visible.filter((s) => s.status === 'done').length;
return (
<Box flexDirection="column" marginLeft={2} marginTop={1}>
- <Text color="gray">Activity · {viewMode} · {runningCount > 0 ? `${runningCount} running` : `${doneCount} completed`}</Text>
+ <Text color="gray">Activity · {viewMode === 'balanced' ? 'minimal' : 'detailed'} · {runningCount > 0 ? `${runningCount} running` : `${doneCount} completed`}</Text>
{visible.map((step) => (
<Box key={step.id}>
<Text>
@@ -759,10 +760,10 @@ function ToolStepsView({ steps, viewMode }: { steps: ToolStep[]; viewMode: 'bala
<Text dimColor>{step.label}</Text>
{step.status === 'running' && <Text color="yellow"> …</Text>}
{step.status === 'done' && step.elapsed != null && <Text dimColor> ({step.elapsed.toFixed(1)}s)</Text>}
- {(viewMode === 'detailed' || step.status === 'done') && step.result && <Text dimColor> · {step.result}</Text>}
+ {viewMode === 'detailed' && step.result && <Text dimColor> · {step.result}</Text>}
</Box>
))}
- <Text dimColor>Press V to toggle Balanced/Detailed</Text>
+ <Text dimColor>Press V to toggle Minimal/Detailed</Text>
</Box>
);
}