Compare commits

..

1 Commits

Author SHA1 Message Date
Richard Palethorpe
6c67a66677 fix(test): Encourage LLM to plan multiple searches
Signed-off-by: Richard Palethorpe <io@richiejp.com>
2025-04-14 15:31:53 +01:00
5 changed files with 23 additions and 23 deletions

View File

@@ -275,7 +275,7 @@ var _ = Describe("Agent test", func() {
EnableStandaloneJob,
EnableHUD,
WithPeriodicRuns("1s"),
WithPermanentGoal("use the new_conversation tool to initiate a conversation with the user"),
WithPermanentGoal("use the new_conversation tool"),
// EnableStandaloneJob,
// WithRandomIdentity(),
)

View File

@@ -128,13 +128,11 @@ func (g *GithubPRReviewer) Run(ctx context.Context, params types.ActionParams) (
}
actionResult := fmt.Sprintf(
"Pull request https://github.com/%s/%s/pull/%d reviewed successfully with status: %s, comments: %v, message: %s",
"Pull request https://github.com/%s/%s/pull/%d reviewed successfully with status: %s",
result.Owner,
result.Repository,
result.PRNumber,
strings.ToLower(result.ReviewAction),
result.Comments,
result.ReviewComment,
)
return types.ActionResult{Result: actionResult}, nil

View File

@@ -1,12 +1,13 @@
import { useState, useEffect } from 'react';
import { useParams, Link } from 'react-router-dom';
import { useParams, Link, useNavigate } from 'react-router-dom';
function AgentStatus() {
const { name } = useParams();
const navigate = useNavigate();
const [statusData, setStatusData] = useState(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
const [_eventSource, setEventSource] = useState(null);
const [eventSource, setEventSource] = useState(null);
const [liveUpdates, setLiveUpdates] = useState([]);
// Update document title
@@ -48,7 +49,7 @@ function AgentStatus() {
const data = JSON.parse(event.data);
setLiveUpdates(prev => [data, ...prev.slice(0, 19)]); // Keep last 20 updates
} catch (err) {
setLiveUpdates(prev => [event.data, ...prev.slice(0, 19)]);
console.error('Error parsing SSE data:', err);
}
});
@@ -128,9 +129,23 @@ function AgentStatus() {
<h2 className="text-sm font-semibold mb-2">Agent Action:</h2>
<div className="status-details">
<div className="status-row">
<span className="status-label">{index}</span>
<span className="status-value">{formatValue(item)}</span>
<span className="status-label">Result:</span>
<span className="status-value">{formatValue(item.Result)}</span>
</div>
<div className="status-row">
<span className="status-label">Action:</span>
<span className="status-value">{formatValue(item.Action)}</span>
</div>
<div className="status-row">
<span className="status-label">Parameters:</span>
<span className="status-value pre-wrap">{formatValue(item.Params)}</span>
</div>
{item.Reasoning && (
<div className="status-row">
<span className="status-label">Reasoning:</span>
<span className="status-value reasoning">{formatValue(item.Reasoning)}</span>
</div>
)}
</div>
</div>
</div>

View File

@@ -30,7 +30,6 @@ export default defineConfig(({ mode }) => {
'/status': backendUrl,
'/action': backendUrl,
'/actions': backendUrl,
'/avatars': backendUrl
}
}
}

View File

@@ -4,7 +4,6 @@ import (
"crypto/subtle"
"embed"
"errors"
"fmt"
"math/rand"
"net/http"
"path/filepath"
@@ -239,20 +238,9 @@ func (app *App) registerRoutes(pool *state.AgentPool, webapp *fiber.App) {
history = &state.Status{ActionResults: []types.ActionState{}}
}
entries := []string{}
for _, h := range Reverse(history.Results()) {
entries = append(entries, fmt.Sprintf(
"Result: %v Action: %v Params: %v Reasoning: %v",
h.Result,
h.Action.Definition().Name,
h.Params,
h.Reasoning,
))
}
return c.JSON(fiber.Map{
"Name": c.Params("name"),
"History": entries,
"History": Reverse(history.Results()),
})
})