(context)
| 73 | name: 'skill_improvement', |
| 74 | |
| 75 | async shouldRun(context) { |
| 76 | if (context.querySource !== 'repl_main_thread') { |
| 77 | return false |
| 78 | } |
| 79 | |
| 80 | if (!findProjectSkill()) { |
| 81 | return false |
| 82 | } |
| 83 | |
| 84 | // Only run every TURN_BATCH_SIZE user messages |
| 85 | const userCount = count(context.messages, m => m.type === 'user') |
| 86 | if (userCount - lastAnalyzedCount < TURN_BATCH_SIZE) { |
| 87 | return false |
| 88 | } |
| 89 | |
| 90 | lastAnalyzedCount = userCount |
| 91 | return true |
| 92 | }, |
| 93 | |
| 94 | buildMessages(context) { |
| 95 | const projectSkill = findProjectSkill()! |
nothing calls this directly
no test coverage detected