fix: address LLM square bracket mapping format and resolve Biome import formatting
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
cc2c247311
commit
1085d7909c
@@ -1,7 +1,7 @@
|
||||
import { existsSync, statSync } from "node:fs";
|
||||
import path from "node:path";
|
||||
import { AppError } from "../errors";
|
||||
import type { ResolvedMediaSource, MediaMode } from "./mediaTypes";
|
||||
import type { MediaMode, ResolvedMediaSource } from "./mediaTypes";
|
||||
import { createPlayDlResolver } from "./playDlResolver";
|
||||
import { createYtDlp, type YtDlpClient } from "./ytdlp";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Streamer, playPreparedStream } from "../streaming";
|
||||
import { AppError } from "../errors";
|
||||
import { createChildLogger } from "../logger";
|
||||
import { discordPlayer } from "../player";
|
||||
import { playPreparedStream, Streamer } from "../streaming";
|
||||
|
||||
const logger = createChildLogger("screen-share");
|
||||
|
||||
|
||||
@@ -101,7 +101,10 @@ export function parseModerationResponse(
|
||||
throw new Error("Result missing 'message_id'");
|
||||
}
|
||||
|
||||
let finalId = String(message_id);
|
||||
let finalId = String(message_id).trim();
|
||||
if (finalId.startsWith("[") && finalId.endsWith("]")) {
|
||||
finalId = finalId.slice(1, -1).trim();
|
||||
}
|
||||
|
||||
// Precision loss fix: If the ID from LLM is not found,
|
||||
// try to find the closest match in targets if it looks rounded (ends in 000)
|
||||
|
||||
+1
-1
@@ -9,8 +9,8 @@ import {
|
||||
VoiceConnection,
|
||||
} from "@discordjs/voice";
|
||||
import type {
|
||||
DiscordPlayOptions,
|
||||
DiscordPlayerOwner,
|
||||
DiscordPlayOptions,
|
||||
} from "./media/mediaTypes";
|
||||
|
||||
export class DiscordPlayer {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { EventEmitter } from "node:events";
|
||||
import { PassThrough } from "node:stream";
|
||||
import type { Readable } from "node:stream";
|
||||
import type { ChildProcess } from "node:child_process";
|
||||
import type { Client } from "discord.js-selfbot-v13";
|
||||
import { EventEmitter } from "node:events";
|
||||
import type { Readable } from "node:stream";
|
||||
import { PassThrough } from "node:stream";
|
||||
import {
|
||||
Streamer as DankStreamer,
|
||||
prepareStream as dankPrepareStream,
|
||||
playStream as dankPlayStream,
|
||||
Utils,
|
||||
prepareStream as dankPrepareStream,
|
||||
Encoders,
|
||||
Utils,
|
||||
} from "@dank074/discord-video-stream";
|
||||
import type { Client } from "discord.js-selfbot-v13";
|
||||
|
||||
type VoiceConnectionLike = any;
|
||||
type StreamConnectionLike = any;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { spawn, ChildProcess } from "node:child_process";
|
||||
import { PassThrough } from "node:stream";
|
||||
import { ChildProcess, spawn } from "node:child_process";
|
||||
import type { Readable } from "node:stream";
|
||||
import { retryWithBackoff } from "../retry";
|
||||
import { PassThrough } from "node:stream";
|
||||
import { createChildLogger } from "../logger";
|
||||
import { transcoderRestartsCounter, transcoderRunningGauge } from "../metrics";
|
||||
import { retryWithBackoff } from "../retry";
|
||||
|
||||
const logger = createChildLogger("transcoder");
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,6 @@ import fs from "node:fs";
|
||||
import http from "node:http";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { Streamer } from "./streaming";
|
||||
import { AudioPlayerStatus } from "@discordjs/voice";
|
||||
import type { Client } from "discord.js-selfbot-v13";
|
||||
import express, {
|
||||
@@ -29,6 +28,7 @@ import { createMessageRoutes } from "./routes/messageRoutes";
|
||||
import { createSyncRoutes } from "./routes/syncRoutes";
|
||||
import { createUIStateRoutes } from "./routes/uiStateRoutes";
|
||||
import { createVoiceRoutes } from "./routes/voiceRoutes";
|
||||
import { Streamer } from "./streaming";
|
||||
import type { VoiceController } from "./voiceController";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
|
||||
Reference in New Issue
Block a user