Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions extensions/ql-vscode/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ const MODEL_SETTING = new Setting("model", ROOT_SETTING);
const FLOW_GENERATION = new Setting("flowGeneration", MODEL_SETTING);
const LLM_GENERATION = new Setting("llmGeneration", MODEL_SETTING);
const EXTENSIONS_DIRECTORY = new Setting("extensionsDirectory", MODEL_SETTING);
const SHOW_MULTIPLE_MODELS = new Setting("showMultipleModels", MODEL_SETTING);

export function showFlowGeneration(): boolean {
return !!FLOW_GENERATION.getValue<boolean>();
Expand All @@ -723,3 +724,7 @@ export function getExtensionsDirectory(languageId: string): string | undefined {
languageId,
});
}

export function showMultipleModels(): boolean {
return !!SHOW_MULTIPLE_MODELS.getValue<boolean>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ import {
import { Method, Usage } from "./method";
import { ModeledMethod } from "./modeled-method";
import { ExtensionPack } from "./shared/extension-pack";
import { showFlowGeneration, showLlmGeneration } from "../config";
import {
showFlowGeneration,
showLlmGeneration,
showMultipleModels,
} from "../config";
import { Mode } from "./shared/mode";
import { loadModeledMethods, saveModeledMethods } from "./modeled-method-fs";
import { pickExtensionPack } from "./extension-pack-picker";
Expand Down Expand Up @@ -365,6 +369,7 @@ export class ModelEditorView extends AbstractWebview<
extensionPack: this.extensionPack,
showFlowGeneration: showFlowGeneration(),
showLlmButton,
showMultipleModels: showMultipleModels(),
mode: this.mode,
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export interface ModelEditorViewState {
extensionPack: ExtensionPack;
showFlowGeneration: boolean;
showLlmButton: boolean;
showMultipleModels: boolean;
mode: Mode;
}
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ LibraryRow.args = {
extensionPack: createMockExtensionPack(),
showFlowGeneration: true,
showLlmButton: true,
showMultipleModels: true,
mode: Mode.Application,
},
hideModeledMethods: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ModelEditor.args = {
},
showFlowGeneration: true,
showLlmButton: true,
showMultipleModels: true,
mode: Mode.Application,
},
initialMethods: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe(LibraryRow.name, () => {
mode: Mode.Application,
showFlowGeneration: false,
showLlmButton: false,
showMultipleModels: false,
extensionPack: createMockExtensionPack(),
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ describe(ModeledMethodsList.name, () => {
mode: Mode.Application,
showFlowGeneration: false,
showLlmButton: false,
showMultipleModels: false,
extensionPack: createMockExtensionPack(),
};

Expand Down