ui: add escape and add success toasts (#1931)
This commit is contained in:
@@ -18,7 +18,7 @@ export async function activateExtension({
|
|||||||
}: ActivateExtensionProps): Promise<void> {
|
}: ActivateExtensionProps): Promise<void> {
|
||||||
try {
|
try {
|
||||||
// AddToAgent
|
// AddToAgent
|
||||||
await addToAgent(extensionConfig);
|
await addToAgent(extensionConfig, { silent: false, showEscMessage: true });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to add extension to agent:', error);
|
console.error('Failed to add extension to agent:', error);
|
||||||
// add to config with enabled = false
|
// add to config with enabled = false
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Input } from '../../../ui/input';
|
import { Input } from '../../../ui/input';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { removeShims } from '../utils';
|
|
||||||
|
|
||||||
interface ExtensionConfigFieldsProps {
|
interface ExtensionConfigFieldsProps {
|
||||||
type: 'stdio' | 'sse' | 'builtin';
|
type: 'stdio' | 'sse' | 'builtin';
|
||||||
@@ -26,7 +25,7 @@ export default function ExtensionConfigFields({
|
|||||||
<label className="text-sm font-medium mb-2 block text-textStandard">Command</label>
|
<label className="text-sm font-medium mb-2 block text-textStandard">Command</label>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<Input
|
<Input
|
||||||
value={removeShims(full_cmd)}
|
value={full_cmd}
|
||||||
onChange={(e) => onChange('cmd', e.target.value)}
|
onChange={(e) => onChange('cmd', e.target.value)}
|
||||||
placeholder="e.g. npx -y @modelcontextprotocol/my-extension <filepath>"
|
placeholder="e.g. npx -y @modelcontextprotocol/my-extension <filepath>"
|
||||||
className={`w-full ${!submitAttempted || isValid ? 'border-borderSubtle' : 'border-red-500'} text-textStandard`}
|
className={`w-full ${!submitAttempted || isValid ? 'border-borderSubtle' : 'border-red-500'} text-textStandard`}
|
||||||
|
|||||||
Reference in New Issue
Block a user