Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

1.1 KB
Raw Blame
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0

import type { AudioOptionSpec } from "../audio-options";
import type { AudioWorkflowId } from "../workflows";
import { audioToolPanelsFor } from "./registry";
import { panelValue } from "./select";
import type { AudioModelContext, CoreInputs } from "./types";

export function AudioToolPanels({
  workflow,
  ctx,
  values,
  onChange,
  specs,
  disabled,
  core,
}: {
  workflow: AudioWorkflowId;
  ctx: AudioModelContext;
  values: Readonly<Record<string, unknown>>;
  onChange: (panelId: string, value: unknown) => void;
  specs: AudioOptionSpec[];
  disabled: boolean;
  core?: CoreInputs;
}) {
  return (
    <>
      {audioToolPanelsFor(workflow, ctx).map((panel) => (
        <panel.Component
          key={panel.id}
          value={panelValue(panel, values, specs)}
          onChange={(value: unknown) => onChange(panel.id, value)}
          specs={specs}
          disabled={disabled}
          ctx={ctx}
          core={core}
        />
      ))}
    </>
  );
}