mirror of
https://github.com/aljazceru/goose.git
synced 2026-01-02 14:04:27 +01:00
ui: no shim in config (#1916)
This commit is contained in:
@@ -19,6 +19,7 @@ import type {
|
||||
ExtensionQuery,
|
||||
ExtensionConfig,
|
||||
} from '../api/types.gen';
|
||||
import { removeShims } from './settings_v2/extensions/utils';
|
||||
|
||||
// Define a local version that matches the structure of the imported one
|
||||
export type FixedExtensionEntry = ExtensionConfig & {
|
||||
@@ -118,6 +119,10 @@ export const ConfigProvider: React.FC<ConfigProviderProps> = ({ children }) => {
|
||||
};
|
||||
|
||||
const addExtension = async (name: string, config: ExtensionConfig, enabled: boolean) => {
|
||||
// remove shims if present
|
||||
if (config.type == 'stdio') {
|
||||
config.cmd = removeShims(config.cmd);
|
||||
}
|
||||
const query: ExtensionQuery = { name, config, enabled };
|
||||
await apiAddExtension({
|
||||
body: query,
|
||||
|
||||
@@ -96,6 +96,7 @@ export default function ExtensionModal({
|
||||
if (isFormValid()) {
|
||||
onSubmit(formData);
|
||||
}
|
||||
onClose();
|
||||
};
|
||||
|
||||
// Create footer buttons based on current state
|
||||
|
||||
Reference in New Issue
Block a user