mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 14:16:34 +09:00
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-07T14:36:18Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d88e4567c7
commit
6b2a66b7cf
1 file changed
+10
-5
@@ -198,19 +198,24 @@ const routeTaskCommand: Command = {
|
||||
? output.warning
|
||||
: output.error;
|
||||
|
||||
const qValues = result.qValues || [0];
|
||||
const maxQValue = Math.max(...qValues);
|
||||
const capabilities = agent.capabilities || [];
|
||||
const alternatives = result.alternatives || [];
|
||||
|
||||
output.printBox([
|
||||
`Task: ${taskDescription}`,
|
||||
``,
|
||||
`Agent: ${output.highlight(agent.name)} (${result.route})`,
|
||||
`Confidence: ${confidenceColor(`${(confidence * 100).toFixed(1)}%`)}`,
|
||||
`Q-Value: ${Math.max(...result.qValues).toFixed(3)}`,
|
||||
`Q-Value: ${maxQValue.toFixed(3)}`,
|
||||
`Exploration: ${result.explored ? output.warning('Yes') : 'No'}`,
|
||||
``,
|
||||
`Description: ${agent.description}`,
|
||||
`Capabilities: ${agent.capabilities.join(', ')}`,
|
||||
`Capabilities: ${capabilities.join(', ')}`,
|
||||
].join('\n'), 'Q-Learning Routing');
|
||||
|
||||
if (result.alternatives.length > 0) {
|
||||
if (alternatives.length > 0) {
|
||||
output.writeln();
|
||||
output.writeln(output.bold('Alternatives:'));
|
||||
output.printTable({
|
||||
@@ -218,9 +223,9 @@ const routeTaskCommand: Command = {
|
||||
{ key: 'agent', header: 'Agent', width: 20 },
|
||||
{ key: 'score', header: 'Score', width: 12, align: 'right' },
|
||||
],
|
||||
data: result.alternatives.map(a => ({
|
||||
data: alternatives.map(a => ({
|
||||
agent: getAgentType(a.route)?.name || a.route,
|
||||
score: a.score.toFixed(3),
|
||||
score: (a.score ?? 0).toFixed(3),
|
||||
})),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user