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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
* Generated by scripts/generate-model-config.js from config/models.json
* Last updated: 2025-11-15T04:48:13.557Z
* Last updated: 2025-11-15T05:09:52.606Z
*/

const MODELS = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
* Generated by scripts/generate-model-config.js from config/models.json
* Last updated: 2025-11-15T04:48:13.555Z
* Last updated: 2025-11-15T05:09:52.605Z
*/

export type AIModel =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
* Generated by scripts/generate-model-config.js from config/models.json
* Last updated: 2025-11-15T04:48:13.557Z
* Last updated: 2025-11-15T05:09:52.606Z
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,14 @@ function generateExtensionConfig() {
const modelsArray = JSON.stringify(models, null, 2);
const providerInfo = JSON.stringify(modelsConfig.providerInfo, null, 2);
const modelIds = activeModels.map(m => ` | '${m.id}'`).join('\n');

const content = `/**
* AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
* Generated by scripts/generate-model-config.js from config/models.json
* Last updated: ${new Date().toISOString()}
*
* NOTE: If you need to use AIModel in other files, import it from this file
* or re-export it (e.g., in settings-manager.ts: export type { AIModel } from './generated/model-config')
*/

export type AIModel =
Expand All @@ -271,7 +274,7 @@ export interface ModelConfigType {

const MODELS: ModelConfigType[] = ${modelsArray};

const PROVIDER_INFO = ${providerInfo};
const PROVIDER_INFO: Record<string, { name: string; apiKeyEnvVar: string | null }> = ${providerInfo};

/**
* Model configuration manager for VS Code extension
Expand Down
7 changes: 5 additions & 2 deletions extension/secureflow/src/generated/model-config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/**
* AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
* Generated by scripts/generate-model-config.js from config/models.json
* Last updated: 2025-11-15T04:48:13.557Z
* Last updated: 2025-11-15T05:09:52.606Z
*
* NOTE: If you need to use AIModel in other files, import it from this file
* or re-export it (e.g., in settings-manager.ts: export type { AIModel } from './generated/model-config')
*/

export type AIModel =
Expand Down Expand Up @@ -363,7 +366,7 @@ const MODELS: ModelConfigType[] = [
}
];

const PROVIDER_INFO = {
const PROVIDER_INFO: Record<string, { name: string; apiKeyEnvVar: string | null }> = {
"openai": {
"name": "OpenAI",
"apiKeyEnvVar": "OPENAI_API_KEY"
Expand Down
3 changes: 2 additions & 1 deletion extension/secureflow/src/settings/settings-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import * as vscode from 'vscode';
* Run `npm run generate:models` from the CLI package to update
*/

// Import AIModel type from generated configuration
// Import and re-export AIModel type from generated configuration
import type { AIModel } from '../generated/model-config';
export type { AIModel };

/**
* Settings manager for SecureFlow extension
Expand Down