style: apply oxfmt
This commit is contained in:
@@ -114,9 +114,7 @@ export async function gatherDaemonStatus(
|
|||||||
const [loaded, command, runtime] = await Promise.all([
|
const [loaded, command, runtime] = await Promise.all([
|
||||||
service.isLoaded({ env: process.env }).catch(() => false),
|
service.isLoaded({ env: process.env }).catch(() => false),
|
||||||
service.readCommand(process.env).catch(() => null),
|
service.readCommand(process.env).catch(() => null),
|
||||||
service
|
service.readRuntime(process.env).catch((err) => ({ status: "unknown", detail: String(err) })),
|
||||||
.readRuntime(process.env)
|
|
||||||
.catch((err) => ({ status: "unknown", detail: String(err) })),
|
|
||||||
]);
|
]);
|
||||||
const configAudit = await auditGatewayServiceConfig({
|
const configAudit = await auditGatewayServiceConfig({
|
||||||
env: process.env,
|
env: process.env,
|
||||||
|
|||||||
@@ -55,9 +55,7 @@ describe("memory cli", () => {
|
|||||||
|
|
||||||
expect(log).toHaveBeenCalledWith(expect.stringContaining("Vector: ready"));
|
expect(log).toHaveBeenCalledWith(expect.stringContaining("Vector: ready"));
|
||||||
expect(log).toHaveBeenCalledWith(expect.stringContaining("Vector dims: 1024"));
|
expect(log).toHaveBeenCalledWith(expect.stringContaining("Vector dims: 1024"));
|
||||||
expect(log).toHaveBeenCalledWith(
|
expect(log).toHaveBeenCalledWith(expect.stringContaining("Vector path: /opt/sqlite-vec.dylib"));
|
||||||
expect.stringContaining("Vector path: /opt/sqlite-vec.dylib"),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("prints vector error when unavailable", async () => {
|
it("prints vector error when unavailable", async () => {
|
||||||
|
|||||||
@@ -177,8 +177,7 @@ const FIELD_LABELS: Record<string, string> = {
|
|||||||
"agents.defaults.memorySearch.local.modelPath": "Local Embedding Model Path",
|
"agents.defaults.memorySearch.local.modelPath": "Local Embedding Model Path",
|
||||||
"agents.defaults.memorySearch.store.path": "Memory Search Index Path",
|
"agents.defaults.memorySearch.store.path": "Memory Search Index Path",
|
||||||
"agents.defaults.memorySearch.store.vector.enabled": "Memory Search Vector Index",
|
"agents.defaults.memorySearch.store.vector.enabled": "Memory Search Vector Index",
|
||||||
"agents.defaults.memorySearch.store.vector.extensionPath":
|
"agents.defaults.memorySearch.store.vector.extensionPath": "Memory Search Vector Extension Path",
|
||||||
"Memory Search Vector Extension Path",
|
|
||||||
"agents.defaults.memorySearch.chunking.tokens": "Memory Chunk Tokens",
|
"agents.defaults.memorySearch.chunking.tokens": "Memory Chunk Tokens",
|
||||||
"agents.defaults.memorySearch.chunking.overlap": "Memory Chunk Overlap Tokens",
|
"agents.defaults.memorySearch.chunking.overlap": "Memory Chunk Overlap Tokens",
|
||||||
"agents.defaults.memorySearch.sync.onSessionStart": "Index on Session Start",
|
"agents.defaults.memorySearch.sync.onSessionStart": "Index on Session Start",
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ export async function isWSL(): Promise<boolean> {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const release = await fs.readFile("/proc/sys/kernel/osrelease", "utf8");
|
const release = await fs.readFile("/proc/sys/kernel/osrelease", "utf8");
|
||||||
wslCached = release.toLowerCase().includes("microsoft") || release.toLowerCase().includes("wsl");
|
wslCached =
|
||||||
|
release.toLowerCase().includes("microsoft") || release.toLowerCase().includes("wsl");
|
||||||
} catch {
|
} catch {
|
||||||
wslCached = false;
|
wslCached = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,9 +105,7 @@ function formatConsoleTimestamp(style: ConsoleStyle): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function hasTimestampPrefix(value: string): boolean {
|
function hasTimestampPrefix(value: string): boolean {
|
||||||
return /^(?:\d{2}:\d{2}:\d{2}|\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z?)/.test(
|
return /^(?:\d{2}:\d{2}:\d{2}|\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z?)/.test(value);
|
||||||
value,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function isJsonPayload(value: string): boolean {
|
function isJsonPayload(value: string): boolean {
|
||||||
|
|||||||
@@ -161,8 +161,9 @@ function normalizeForwardedUserLabel(user: TelegramForwardUser) {
|
|||||||
const username = user.username?.trim() || undefined;
|
const username = user.username?.trim() || undefined;
|
||||||
const id = user.id != null ? String(user.id) : undefined;
|
const id = user.id != null ? String(user.id) : undefined;
|
||||||
const display =
|
const display =
|
||||||
(name && username ? `${name} (@${username})` : name || (username ? `@${username}` : undefined)) ||
|
(name && username
|
||||||
(id ? `user:${id}` : undefined);
|
? `${name} (@${username})`
|
||||||
|
: name || (username ? `@${username}` : undefined)) || (id ? `user:${id}` : undefined);
|
||||||
return { display, name: name || undefined, username, id };
|
return { display, name: name || undefined, username, id };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,7 +214,8 @@ function buildForwardedContextFromChat(params: {
|
|||||||
type: string;
|
type: string;
|
||||||
signature?: string;
|
signature?: string;
|
||||||
}): TelegramForwardedContext | null {
|
}): TelegramForwardedContext | null {
|
||||||
const fallbackKind = params.type === "channel" || params.type === "legacy_channel" ? "channel" : "chat";
|
const fallbackKind =
|
||||||
|
params.type === "channel" || params.type === "legacy_channel" ? "channel" : "chat";
|
||||||
const { display, title, username, id } = normalizeForwardedChatLabel(params.chat, fallbackKind);
|
const { display, title, username, id } = normalizeForwardedChatLabel(params.chat, fallbackKind);
|
||||||
if (!display) return null;
|
if (!display) return null;
|
||||||
const signature = params.signature?.trim() || undefined;
|
const signature = params.signature?.trim() || undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user