Track agent prompt sent from agent hooks (#3033)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Brennan Benson
2026-05-29 12:45:34 -07:00
committed by GitHub
co-authored by Orca
parent 10eb4d05bf
commit 423a6d11e3
22 changed files with 1454 additions and 60 deletions
+3 -1
View File
@@ -210,7 +210,9 @@ describe('OpenCodeHookService buildPtyEnv / clearPty round-trip', () => {
const pluginPath = join(env.OPENCODE_CONFIG_DIR!, 'plugins', 'orca-opencode-status.js')
expect(existsSync(pluginPath)).toBe(true)
// Sanity-check the file has plugin source, not a stray write.
expect(readFileSync(pluginPath, 'utf8')).toContain('OrcaOpenCodeStatusPlugin')
const pluginSource = readFileSync(pluginPath, 'utf8')
expect(pluginSource).toContain('OrcaOpenCodeStatusPlugin')
expect(pluginSource).toContain('messageID: part.messageID')
})
it('clearPty removes the same directory buildPtyEnv created', () => {
+1 -1
View File
@@ -305,7 +305,7 @@ function getOpenCodePluginSource(): string {
' if (!part || part.type !== "text" || !part.text) return;',
' const role = messageRoleById.get(part.messageID);',
' if (!role) return;',
' await post("MessagePart", { role, text: part.text });',
' await post("MessagePart", { role, text: part.text, messageID: part.messageID });',
' return;',
' }',
'',