ci: add typechecking, fail fast in CI, and patch typechecking errors (#63)
This commit is contained in:
@@ -123,6 +123,9 @@ export function backfillBuffers(
|
||||
if (toolCalls.length > 0 && toolCalls[0]?.tool_call_id) {
|
||||
const toolCall = toolCalls[0];
|
||||
const toolCallId = toolCall.tool_call_id;
|
||||
// Skip if any required fields are missing
|
||||
if (!toolCallId || !toolCall.name || !toolCall.arguments) break;
|
||||
|
||||
const exists = buffers.byId.has(lineId);
|
||||
|
||||
buffers.byId.set(lineId, {
|
||||
|
||||
@@ -23,11 +23,13 @@ export function formatArgsDisplay(argsJson: string): {
|
||||
if ("request_heartbeat" in clone) delete clone.request_heartbeat;
|
||||
parsed = clone;
|
||||
const keys = Object.keys(parsed);
|
||||
const firstKey = keys[0];
|
||||
if (
|
||||
keys.length === 1 &&
|
||||
["query", "path", "file_path", "command", "label"].includes(keys[0])
|
||||
firstKey &&
|
||||
["query", "path", "file_path", "command", "label"].includes(firstKey)
|
||||
) {
|
||||
const v = parsed[keys[0]];
|
||||
const v = parsed[firstKey];
|
||||
display = typeof v === "string" ? v : String(v);
|
||||
} else {
|
||||
display = Object.entries(parsed)
|
||||
|
||||
@@ -191,7 +191,7 @@ export async function drainStreamWithResume(
|
||||
|
||||
// Use the resume result (should have proper stop_reason now)
|
||||
result = resumeResult;
|
||||
} catch (e) {
|
||||
} catch (_e) {
|
||||
// Resume failed - stick with the error stop_reason
|
||||
// The original error result will be returned
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user