Add feature flag for showing multiple modelings
This commit is contained in:
@@ -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>();
|
||||
@@ -723,3 +724,7 @@ export function getExtensionsDirectory(languageId: string): string | undefined {
|
||||
languageId,
|
||||
});
|
||||
}
|
||||
|
||||
export function showMultipleModels(): boolean {
|
||||
return !!SHOW_MULTIPLE_MODELS.getValue<boolean>();
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
@@ -365,6 +369,7 @@ export class ModelEditorView extends AbstractWebview<
|
||||
extensionPack: this.extensionPack,
|
||||
showFlowGeneration: showFlowGeneration(),
|
||||
showLlmButton,
|
||||
showMultipleModels: showMultipleModels(),
|
||||
mode: this.mode,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -5,5 +5,6 @@ export interface ModelEditorViewState {
|
||||
extensionPack: ExtensionPack;
|
||||
showFlowGeneration: boolean;
|
||||
showLlmButton: boolean;
|
||||
showMultipleModels: boolean;
|
||||
mode: Mode;
|
||||
}
|
||||
|
||||
@@ -214,6 +214,7 @@ LibraryRow.args = {
|
||||
extensionPack: createMockExtensionPack(),
|
||||
showFlowGeneration: true,
|
||||
showLlmButton: true,
|
||||
showMultipleModels: true,
|
||||
mode: Mode.Application,
|
||||
},
|
||||
hideModeledMethods: false,
|
||||
|
||||
@@ -30,6 +30,7 @@ ModelEditor.args = {
|
||||
},
|
||||
showFlowGeneration: true,
|
||||
showLlmButton: true,
|
||||
showMultipleModels: true,
|
||||
mode: Mode.Application,
|
||||
},
|
||||
initialMethods: [
|
||||
|
||||
@@ -20,6 +20,7 @@ describe(LibraryRow.name, () => {
|
||||
mode: Mode.Application,
|
||||
showFlowGeneration: false,
|
||||
showLlmButton: false,
|
||||
showMultipleModels: false,
|
||||
extensionPack: createMockExtensionPack(),
|
||||
};
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ describe(ModeledMethodsList.name, () => {
|
||||
mode: Mode.Application,
|
||||
showFlowGeneration: false,
|
||||
showLlmButton: false,
|
||||
showMultipleModels: false,
|
||||
extensionPack: createMockExtensionPack(),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user