Describe the new tools in the system prompt
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
co-authored by
Sisyphus
parent
9c4316e562
commit
a8a3ffcb5c
+1
-1
@@ -105,5 +105,5 @@ test('omitting every section leaves no dangling markers', () => {
|
||||
test('the prompt stays a reasonable size with everything on', () => {
|
||||
const prompt = systemPrompt({ cwd: '/repo', availableTools: ALL, canAsk: true });
|
||||
// Sent on every request, so a runaway prompt is a direct cost.
|
||||
expect(prompt.length).toBeLessThan(4000);
|
||||
expect(prompt.length).toBeLessThan(5000);
|
||||
});
|
||||
|
||||
@@ -5,6 +5,7 @@ import { mkdtempSync, rmSync } from 'node:fs';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
import { variantByName } from '../src/agents';
|
||||
import { createCommitMessageTool } from '../src/commit';
|
||||
import { Memory } from '../src/memory';
|
||||
import { createHost } from '../src/plugins';
|
||||
import { guardPlugin, timePlugin } from '../src/plugins-builtin';
|
||||
@@ -244,7 +245,15 @@ test('afterTurn fires once the turn ends', async () => {
|
||||
|
||||
test('the git tools are offered by default and never prompt', async () => {
|
||||
const { seen, model } = recorder();
|
||||
const session = new Session({ model, askApproval: async () => 'deny' });
|
||||
// git_commit_message is model-built, so it joins through extraTools the way
|
||||
// cli.tsx wires it; the static five come with the session.
|
||||
const session = new Session({
|
||||
model,
|
||||
askApproval: async () => {
|
||||
throw new Error('a git tool must never prompt');
|
||||
},
|
||||
extraTools: { git_commit_message: createCommitMessageTool({ model }) },
|
||||
});
|
||||
for await (const _ of session.send('what changed')) void _;
|
||||
|
||||
const offered = (seen[0]?.tools ?? []).map((t) => t.name);
|
||||
|
||||
Reference in New Issue
Block a user