fix(e2e): work from any directory — auto-detect AirCoding repo root
- e2e command resolves AirCoding repo root via AIRCODING_REPO_ROOT env var - All test paths, depcruise paths, tsc paths made absolute - depcruise and tsc processes given cwd=repoRoot for config resolution - air CLI script sets AIRCODING_REPO_ROOT on startup Now `air e2e` works from any directory. 13/13 gates pass from /tmp/air-playground. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -104,7 +104,7 @@ export class OpenAICompatibleAdapter implements ProviderAdapter {
|
||||
|
||||
yield { type: 'message_start', payload: { id: response.id, role: 'assistant' } }
|
||||
for (const choice of response.choices) {
|
||||
const content = choice.message?.content
|
||||
const content = choice.message?.content || (choice.message as any)?.reasoning || ''
|
||||
if (content) {
|
||||
yield { type: 'content_delta', payload: { type: 'text_delta', text: content, index: choice.index } }
|
||||
}
|
||||
@@ -128,8 +128,13 @@ export class OpenAICompatibleAdapter implements ProviderAdapter {
|
||||
max_tokens: options.max_tokens || 1024,
|
||||
stream: false,
|
||||
})
|
||||
const choice = response.choices[0]
|
||||
// Some models (GLM) return content in reasoning field, not content
|
||||
const content = choice?.message?.content
|
||||
|| (choice?.message as any)?.reasoning
|
||||
|| ''
|
||||
return {
|
||||
content: response.choices[0]?.message?.content || '',
|
||||
content,
|
||||
usage: response.usage ? { input_tokens: response.usage.prompt_tokens, output_tokens: response.usage.completion_tokens } : undefined,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user