Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  list.row-sources.ts

  Sprache: JAVA
 

Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

import type { ModelRegistry } from "@mariozechner/pi-coding-agent";
import {
  appendCatalogSupplementRows,
  appendConfiguredProviderRows,
  appendConfiguredRows,
  appendDiscoveredRows,
  appendProviderCatalogRows,
  type RowBuilderContext,
} from "./list.rows.js";
import type { ConfiguredEntry, ModelRow } from "./list.types.js";

type AllModelRowSources = {
  rows: ModelRow[];
  context: RowBuilderContext;
  modelRegistry?: ModelRegistry;
  useProviderCatalogFastPath: boolean;
};

type AppendAllModelRowSourcesResult = {
  requiresRegistryFallback: boolean;
};

export function modelRowSourcesRequireRegistry(params: {
  all?: boolean;
  providerFilter?: string;
  useProviderCatalogFastPath: boolean;
}): boolean {
  if (!params.all) {
    return false;
  }
  if (params.providerFilter && params.useProviderCatalogFastPath) {
    return false;
  }
  return true;
}

export async function appendAllModelRowSources(
  params: AllModelRowSources,
): Promise<AppendAllModelRowSourcesResult> {
  if (params.context.filter.provider && params.useProviderCatalogFastPath) {
    let seenKeys = new Set<string>();
    appendConfiguredProviderRows({
      rows: params.rows,
      context: params.context,
      seenKeys,
    });
    const catalogRows = await appendProviderCatalogRows({
      rows: params.rows,
      context: params.context,
      seenKeys,
      staticOnly: true,
    });
    if (catalogRows === 0) {
      if (!params.modelRegistry) {
        return { requiresRegistryFallback: true };
      }
      appendDiscoveredRows({
        rows: params.rows,
        models: params.modelRegistry.getAll(),
        modelRegistry: params.modelRegistry,
        context: params.context,
      });
    }
    return { requiresRegistryFallback: false };
  }

  const seenKeys = appendDiscoveredRows({
    rows: params.rows,
    models: params.modelRegistry?.getAll() ?? [],
    modelRegistry: params.modelRegistry,
    context: params.context,
  });

  appendConfiguredProviderRows({
    rows: params.rows,
    context: params.context,
    seenKeys,
  });

  if (params.modelRegistry && !params.context.filter.provider) {
    await appendCatalogSupplementRows({
      rows: params.rows,
      modelRegistry: params.modelRegistry,
      context: params.context,
      seenKeys,
    });
    return { requiresRegistryFallback: false };
  }

  await appendProviderCatalogRows({
    rows: params.rows,
    context: params.context,
    seenKeys,
  });
  return { requiresRegistryFallback: false };
}

export function appendConfiguredModelRowSources(params: {
  rows: ModelRow[];
  entries: ConfiguredEntry[];
  modelRegistry: ModelRegistry;
  context: RowBuilderContext;
}): void {
  appendConfiguredRows(params);
}

¤ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet am  2026-04-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge