mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-11 08:16:03 +00:00
fix(skill): remove auto activation setting
This commit is contained in:
@@ -3,7 +3,6 @@ import { useTranslation } from 'react-i18next';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { Switch } from '@/components/ui/switch';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { FolderSearch, ChevronDown, ChevronRight } from 'lucide-react';
|
||||
import { httpClient } from '@/app/infra/http/HttpClient';
|
||||
@@ -30,7 +29,6 @@ const emptySkillDraft: SkillFormDraft = {
|
||||
description: '',
|
||||
instructions: '',
|
||||
package_root: '',
|
||||
auto_activate: true,
|
||||
},
|
||||
showAdvanced: false,
|
||||
};
|
||||
@@ -95,7 +93,6 @@ export default function SkillForm({
|
||||
description: prev.description || result.description,
|
||||
package_root: result.package_root,
|
||||
instructions: result.instructions,
|
||||
auto_activate: result.auto_activate ?? true,
|
||||
}));
|
||||
toast.success(t('skills.scanSuccess'));
|
||||
} catch (error) {
|
||||
@@ -123,7 +120,6 @@ export default function SkillForm({
|
||||
display_name: skill.display_name || '',
|
||||
description: skill.description || '',
|
||||
instructions: skill.instructions || '',
|
||||
auto_activate: skill.auto_activate ?? true,
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -203,23 +199,6 @@ export default function SkillForm({
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-start justify-between gap-4">
|
||||
<div className="space-y-1">
|
||||
<Label htmlFor="auto_activate">{t('skills.autoActivate')}</Label>
|
||||
<p className="text-xs leading-relaxed text-muted-foreground">
|
||||
{t('skills.autoActivateDescription')}
|
||||
</p>
|
||||
</div>
|
||||
<Switch
|
||||
id="auto_activate"
|
||||
className="mt-0.5"
|
||||
checked={skill.auto_activate ?? true}
|
||||
onCheckedChange={(checked) =>
|
||||
setSkill({ ...skill, auto_activate: checked })
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="space-y-3">
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -590,7 +590,6 @@ export interface Skill {
|
||||
description: string;
|
||||
instructions?: string;
|
||||
package_root?: string;
|
||||
auto_activate?: boolean;
|
||||
is_builtin?: boolean;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
|
||||
@@ -1269,7 +1269,6 @@ export class BackendClient extends BaseHttpClient {
|
||||
display_name?: string;
|
||||
description: string;
|
||||
instructions: string;
|
||||
auto_activate?: boolean;
|
||||
}> {
|
||||
return this.get('/api/v1/skills/scan', { path });
|
||||
}
|
||||
|
||||
@@ -1346,9 +1346,6 @@ const enUS = {
|
||||
'Used as the skill directory name. Only letters, numbers, hyphens and underscores.',
|
||||
skillDescription: 'Skill Description',
|
||||
skillInstructions: 'Instructions',
|
||||
autoActivate: 'Auto Activate',
|
||||
autoActivateDescription:
|
||||
'When enabled, the Agent may match and activate this skill based on its description during conversations.',
|
||||
saveSuccess: 'Saved successfully',
|
||||
saveError: 'Save failed: ',
|
||||
createSuccess: 'Created successfully',
|
||||
|
||||
@@ -1290,9 +1290,6 @@ const zhHans = {
|
||||
skillSlugHelp: '用作技能目录名,仅支持英文字母、数字、连字符和下划线。',
|
||||
skillDescription: '技能描述',
|
||||
skillInstructions: '指令内容',
|
||||
autoActivate: '自动激活',
|
||||
autoActivateDescription:
|
||||
'开启后,Agent 会在对话中根据技能描述自动匹配并激活此技能。',
|
||||
saveSuccess: '保存成功',
|
||||
saveError: '保存失败:',
|
||||
createSuccess: '创建成功',
|
||||
|
||||
@@ -1360,9 +1360,6 @@ const zhHant = {
|
||||
skillSlugHelp: '用作技能目錄名,僅支援英文字母、數字、連字符和底線。',
|
||||
skillDescription: '技能描述',
|
||||
skillInstructions: '指令內容',
|
||||
autoActivate: '自動啟用',
|
||||
autoActivateDescription:
|
||||
'開啟後,Agent 會在對話中根據技能描述自動匹配並啟用此技能。',
|
||||
saveSuccess: '儲存成功',
|
||||
saveError: '儲存失敗:',
|
||||
createSuccess: '創建成功',
|
||||
|
||||
Reference in New Issue
Block a user