ausername-12345 commited on
Commit
f3011f5
·
1 Parent(s): 94c6419

strip system prompt to bare minimum for TPM limit

Browse files
Files changed (1) hide show
  1. src/agent.js +1 -27
src/agent.js CHANGED
@@ -11,34 +11,8 @@ const path = require('path');
11
  const fs = require('fs');
12
  const projectRoot = path.resolve(__dirname, '..');
13
 
14
- function projectFileTree() {
15
- const entries = [];
16
- function walk(dir, prefix) {
17
- try {
18
- for (const e of fs.readdirSync(dir, { withFileTypes: true })) {
19
- const rel = prefix + e.name;
20
- if (e.name.startsWith('.') || e.name === 'node_modules') continue;
21
- if (e.isDirectory()) walk(path.join(dir, e.name), rel + '/');
22
- else entries.push(rel);
23
- }
24
- } catch {}
25
- }
26
- walk(projectRoot, '');
27
- return entries.join('\n');
28
- }
29
-
30
  function systemPrompt() {
31
- return [
32
- `You are ${AGENT_NAME}. You can edit project files. Project tree:`,
33
- projectFileTree(),
34
- '',
35
- 'To read a file, include: ````read path/to/file.js```` in your response.',
36
- 'To write a file, include:',
37
- '````write path/to/file.js',
38
- 'file content here',
39
- '````',
40
- 'Always read a file before writing it. Write the COMPLETE file content, not a diff.',
41
- ].join('\n');
42
  }
43
 
44
  function makeLogEntry(type, fields = {}) {
 
11
  const fs = require('fs');
12
  const projectRoot = path.resolve(__dirname, '..');
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  function systemPrompt() {
15
+ return `${AGENT_NAME}. Can read files: \`\`\`\`read path/to/file\`\`\`\` and write: \`\`\`\`write path/to/file\ncontent\`\`\`\`. Be concise.`;
 
 
 
 
 
 
 
 
 
 
16
  }
17
 
18
  function makeLogEntry(type, fields = {}) {