mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-10 18:35:17 +00:00
chore(lint): convert type aliases to interfaces (autofix)
- Remove no-use-before-define rule (conflicts with unistyles ordering) - Add typescript/consistent-type-definitions: interface - Run oxlint --fix: 606 type->interface conversions across 268 files Typecheck green. Warnings: 5432 -> 3787 (-1645).
This commit is contained in:
@@ -19,22 +19,22 @@ import { loadSherpaOnnxNode } from "../src/server/speech/providers/local/sherpa/
|
||||
const DEFAULT_SAMPLE_TEXT =
|
||||
"Paseo keeps your coding agents in your pocket, with fast local speech and reliable remote control.";
|
||||
|
||||
type ScriptOptions = {
|
||||
interface ScriptOptions {
|
||||
modelsDir: string;
|
||||
outputDir: string;
|
||||
text: string;
|
||||
speed: number;
|
||||
modelIds: LocalTtsModelId[];
|
||||
};
|
||||
}
|
||||
|
||||
type GeneratedSample = {
|
||||
interface GeneratedSample {
|
||||
modelId: LocalTtsModelId;
|
||||
voiceLabel: string;
|
||||
speakerId: number | null;
|
||||
sampleRate: number;
|
||||
durationSeconds: number;
|
||||
relativePath: string;
|
||||
};
|
||||
}
|
||||
|
||||
function usage(): string {
|
||||
return [
|
||||
|
||||
@@ -11,10 +11,10 @@ import { resolvePaseoHome } from "../src/server/paseo-home.js";
|
||||
import { runSupervisor } from "./supervisor.js";
|
||||
import { applySherpaLoaderEnv } from "../src/server/speech/providers/local/sherpa/sherpa-runtime-env.js";
|
||||
|
||||
type DaemonRunnerConfig = {
|
||||
interface DaemonRunnerConfig {
|
||||
devMode: boolean;
|
||||
workerArgs: string[];
|
||||
};
|
||||
}
|
||||
|
||||
function parseConfig(argv: string[]): DaemonRunnerConfig {
|
||||
let devMode = false;
|
||||
|
||||
@@ -13,7 +13,7 @@ type WorkerLifecycleMessage =
|
||||
reason?: string;
|
||||
};
|
||||
|
||||
type SupervisorOptions = {
|
||||
interface SupervisorOptions {
|
||||
name: string;
|
||||
startupMessage: string;
|
||||
resolveWorkerEntry: () => string;
|
||||
@@ -28,7 +28,7 @@ type SupervisorOptions = {
|
||||
onWorkerReady?: (message: { listen: string }) => Promise<void> | void;
|
||||
restartOnCrash?: boolean;
|
||||
onSupervisorExit?: () => Promise<void> | void;
|
||||
};
|
||||
}
|
||||
|
||||
function describeExit(code: number | null, signal: NodeJS.Signals | null): string {
|
||||
return signal ?? (typeof code === "number" ? `code ${code}` : "unknown");
|
||||
|
||||
@@ -23,17 +23,17 @@ function collectAssistantText(entries: Array<{ item: { type: string; text?: stri
|
||||
.join("\n");
|
||||
}
|
||||
|
||||
type ToolCallRecord = {
|
||||
interface ToolCallRecord {
|
||||
name: string;
|
||||
status: string;
|
||||
};
|
||||
}
|
||||
|
||||
type ProviderRunResult = {
|
||||
interface ProviderRunResult {
|
||||
provider: "claude" | "codex";
|
||||
agentId: string;
|
||||
assistantText: string;
|
||||
toolCalls: ToolCallRecord[];
|
||||
};
|
||||
}
|
||||
|
||||
async function verifyInjectedMcpForProvider(
|
||||
client: DaemonClient,
|
||||
|
||||
@@ -13,12 +13,12 @@ import {
|
||||
import { initializeLocalSpeechServices } from "../src/server/speech/providers/local/runtime.js";
|
||||
import type { RequestedSpeechProviders } from "../src/server/speech/speech-types.js";
|
||||
|
||||
type CliOptions = {
|
||||
interface CliOptions {
|
||||
wavPath: string;
|
||||
outPath?: string;
|
||||
model: LocalSttModelId;
|
||||
modelsDir: string;
|
||||
};
|
||||
}
|
||||
|
||||
function usage(): string {
|
||||
return [
|
||||
|
||||
@@ -5,11 +5,11 @@ import { DaemonClient } from "../src/server/test-utils/daemon-client.js";
|
||||
import { OpenAITTS } from "../src/server/speech/providers/openai/tts.js";
|
||||
import { withTimeout } from "../src/utils/promise-timeout.js";
|
||||
|
||||
type RoundTripResult = {
|
||||
interface RoundTripResult {
|
||||
voiceAgentId: string;
|
||||
speakToolCalls: number;
|
||||
audioChunks: number;
|
||||
};
|
||||
}
|
||||
|
||||
async function streamToBuffer(stream: AsyncIterable<unknown>): Promise<Buffer> {
|
||||
const chunks: Buffer[] = [];
|
||||
|
||||
Reference in New Issue
Block a user