Open computers from the chat, let bots ask for a take-over, show task progress
- Serve each computer to its owner under /computers/<id>/ (HTTP and websockets proxied to the AIO sandbox) and show it in a shared ComputerView with browser, terminal and code modes, opened from the computers modal or a take-over button in the thread. - ask_user_to_take_over lets a bot hand a computer to the user for a login or captcha; the message gets a take-over button and needs-you, and the viewer hands it back with a chat message. - While a task runs the thread shows "<bot> is working..." with the task's latest step; steps read as plain words, not tool names. - A coordinator with no workers no longer claims to delegate, and bots describe started tasks in the first person. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -5,11 +5,11 @@ import describeJobStep from "./describe-job-step";
|
||||
const candidate = { model: { slug: "deepseek/deepseek-chat:free" } } as HarnessCandidate;
|
||||
|
||||
describe("describeJobStep", () => {
|
||||
test("names each tool once, never its arguments", () => {
|
||||
test("says what each tool does once, never its arguments", () => {
|
||||
expect(
|
||||
describeJobStep({
|
||||
index: 2,
|
||||
text: "Let me look.",
|
||||
text: null,
|
||||
candidate,
|
||||
tool_calls: [
|
||||
{ id: "a", name: "sandbox_execute_bash", arguments: '{"command":"cat secret"}' },
|
||||
@@ -19,7 +19,7 @@ describe("describeJobStep", () => {
|
||||
}),
|
||||
).toEqual({
|
||||
kind: "tool",
|
||||
text: "Using sandbox_execute_bash, update_memory",
|
||||
text: "Running a command, Updating memory",
|
||||
metadata: {
|
||||
step: 2,
|
||||
model: "deepseek/deepseek-chat:free",
|
||||
@@ -28,6 +28,32 @@ describe("describeJobStep", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("prefers what the model said it's doing", () => {
|
||||
expect(
|
||||
describeJobStep({
|
||||
index: 0,
|
||||
text: "Opening the Gmail tab.\nThen reading it.",
|
||||
candidate,
|
||||
tool_calls: [{ id: "a", name: "browser_navigate", arguments: "{}" }],
|
||||
})?.text,
|
||||
).toBe("Opening the Gmail tab.");
|
||||
});
|
||||
|
||||
test("labels tool families and falls back to the name", () => {
|
||||
expect(
|
||||
describeJobStep({
|
||||
index: 0,
|
||||
text: "",
|
||||
candidate,
|
||||
tool_calls: [
|
||||
{ id: "a", name: "browser_navigate", arguments: "{}" },
|
||||
{ id: "b", name: "browser_click", arguments: "{}" },
|
||||
{ id: "c", name: "some_mcp_tool", arguments: "{}" },
|
||||
],
|
||||
})?.text,
|
||||
).toBe("Using the browser, Using some_mcp_tool");
|
||||
});
|
||||
|
||||
test("keeps the first line of a text-only turn, cut to one line", () => {
|
||||
const step = describeJobStep({
|
||||
index: 0,
|
||||
|
||||
Reference in New Issue
Block a user