mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 05:30:22 +00:00
refactor: dedupe record guards
This commit is contained in:
@@ -2,6 +2,7 @@ import { execFileSync } from "node:child_process";
|
||||
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
||||
import { homedir } from "node:os";
|
||||
import { dirname, join } from "node:path";
|
||||
import { isRecord } from "../src/utils.js";
|
||||
|
||||
function writeStdoutLine(message = ""): void {
|
||||
process.stdout.write(`${message}\n`);
|
||||
@@ -546,10 +547,6 @@ function extractResponseText(payload: OpenAIResponse): string {
|
||||
return chunks.join("\n").trim();
|
||||
}
|
||||
|
||||
function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
|
||||
function fallbackCategory(issueText: string): "bug" | "enhancement" {
|
||||
const lower = issueText.toLowerCase();
|
||||
const bugSignals = [
|
||||
|
||||
Reference in New Issue
Block a user