foo

checkpoint
This commit is contained in:
jacob314
2026-03-04 00:06:46 -08:00
parent 12957ea16a
commit 81a1e127ed
185 changed files with 818 additions and 748 deletions
+2 -2
View File
@@ -793,7 +793,7 @@ export class Task {
) {
errorEvent = event;
}
const errorMessage = errorEvent?.value?.error
const errorMessage = errorEvent?.value.error
? getErrorMessage(errorEvent.value.error)
: 'Unknown error from LLM stream';
logger.error(
@@ -802,7 +802,7 @@ export class Task {
);
let errMessage = `Unknown error from LLM stream: ${JSON.stringify(event)}`;
if (errorEvent?.value?.error) {
if (errorEvent?.value.error) {
errMessage = parseAndFormatApiError(errorEvent.value.error);
}
this.cancelPendingTools(`LLM stream error: ${errorMessage}`);
+4 -4
View File
@@ -109,9 +109,9 @@ export async function loadConfig(
};
const fileService = new FileDiscoveryService(workspaceDir, {
respectGitIgnore: configParams?.fileFiltering?.respectGitIgnore,
respectGeminiIgnore: configParams?.fileFiltering?.respectGeminiIgnore,
customIgnoreFilePaths: configParams?.fileFiltering?.customIgnoreFilePaths,
respectGitIgnore: configParams.fileFiltering?.respectGitIgnore,
respectGeminiIgnore: configParams.fileFiltering?.respectGeminiIgnore,
customIgnoreFilePaths: configParams.fileFiltering?.customIgnoreFilePaths,
});
const { memoryContent, fileCount, filePaths } =
await loadServerHierarchicalMemory(
@@ -212,7 +212,7 @@ export function loadEnvironment(): void {
function findEnvFile(startDir: string): string | null {
let currentDir = path.resolve(startDir);
while (true) {
for (;;) {
// prefer gemini-specific .env under GEMINI_DIR
const geminiEnvPath = path.join(currentDir, GEMINI_DIR, '.env');
if (fs.existsSync(geminiEnvPath)) {
+1 -1
View File
@@ -148,7 +148,7 @@ function isPersistedStateMetadata(
export function getPersistedState(
metadata: PersistedTaskMetadata,
): PersistedStateMetadata | undefined {
const state = metadata?.[METADATA_KEY];
const state = metadata[METADATA_KEY];
if (isPersistedStateMetadata(state)) {
return state;
}
@@ -157,7 +157,7 @@ export function assertUniqueFinalEventIsLast(
expect(finalEvent.metadata?.['coderAgent']).toMatchObject({
kind: 'state-change',
});
expect(finalEvent.status?.state).toBe('input-required');
expect(finalEvent.status.state).toBe('input-required');
expect(finalEvent.final).toBe(true);
// There is only one event with final and its the last