mirror of
https://github.com/stablyai/orca.git
synced 2026-10-13 16:02:49 +00:00
Submit initial OpenCode 2.0.12 prompts through the native startup plugin (#25428)
* fix(opencode): submit initial prompts for reviewed 2.0.12 Route the reported release through the existing native startup intent. Retain conservative behavior for other unreviewed versions. * Wait for OpenCode startup fixture file reads in the hydration test --------- Co-authored-by: nwparker <nwparker@users.noreply.github.com>
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import { expect, it } from 'vitest'
|
||||
import { getOpenCodeCliCapabilities, parseOpenCodeCliVersion } from './opencode-cli-version'
|
||||
|
||||
it.each(['1.1.23', 'opencode v2.0.16', '2.0.0-beta.1+build'])('parses CLI output %s', (output) => {
|
||||
expect(parseOpenCodeCliVersion(output)).toBe(output.replace(/^opencode v/, ''))
|
||||
})
|
||||
it.each(['1.1.23', 'opencode v2.0.12', 'opencode v2.0.16', '2.0.0-beta.1+build'])(
|
||||
'parses CLI output %s',
|
||||
(output) => {
|
||||
expect(parseOpenCodeCliVersion(output)).toBe(output.replace(/^opencode v/, ''))
|
||||
}
|
||||
)
|
||||
it.each([null, '', 'Error 2.0.16', '1.1', '2.0.16\nwarning'])(
|
||||
'does not mistake other output for a version',
|
||||
(output) => {
|
||||
@@ -21,6 +24,11 @@ it('keeps future versions unknown instead of assuming a plugin loader or prompt
|
||||
pluginApi: 'v1',
|
||||
promptMode: 'submit'
|
||||
})
|
||||
expect(getOpenCodeCliCapabilities('opencode v2.0.12')).toEqual({
|
||||
version: '2.0.12',
|
||||
pluginApi: 'v2',
|
||||
promptMode: 'prefill'
|
||||
})
|
||||
expect(getOpenCodeCliCapabilities('opencode v2.0.16')).toEqual({
|
||||
version: '2.0.16',
|
||||
pluginApi: 'v2',
|
||||
@@ -29,6 +37,7 @@ it('keeps future versions unknown instead of assuming a plugin loader or prompt
|
||||
})
|
||||
|
||||
it('does not opt unverified v2 builds into an extra prompt submission', () => {
|
||||
expect(getOpenCodeCliCapabilities('2.0.17').promptMode).toBe('unknown')
|
||||
expect(getOpenCodeCliCapabilities('2.0.16-beta').promptMode).toBe('unknown')
|
||||
for (const version of ['2.0.13', '2.0.15', '2.0.17', '2.0.21', '2.0.12-beta', '2.0.16-beta']) {
|
||||
expect(getOpenCodeCliCapabilities(version).promptMode).toBe('unknown')
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user