Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix(web-frontend): Agent Configuration, No Prompt for Skill Installation

openJiuwen-botc2fc658f4249
diff --git a/jiuwenswarm/channels/web/frontend/src/components/ConfigPanel/index.tsx b/jiuwenswarm/channels/web/frontend/src/components/ConfigPanel/index.tsx
index 0feba1324a..24dfb0d2f2 100644
--- a/jiuwenswarm/channels/web/frontend/src/components/ConfigPanel/index.tsx
+++ b/jiuwenswarm/channels/web/frontend/src/components/ConfigPanel/index.tsx
@@ -12,11 +12,13 @@ function MultiSelectDropdown({
selected,
onChange,
placeholder,
+ emptyMessage,
}: {
options: string[];
selected: string[];
onChange: (selected: string[]) => void;
placeholder?: string;
+ emptyMessage?: string;
}) {
const [isOpen, setIsOpen] = useState(false);
const containerRef = useRef<HTMLDivElement>(null);
@@ -86,7 +88,7 @@ function MultiSelectDropdown({
))
)}
</div>
- {isOpen && options.length > 0 && createPortal(
+ {isOpen && createPortal(
<div
ref={dropdownRef}
className="fixed z-[9999] max-h-60 overflow-auto rounded border border-border bg-card shadow-lg"
@@ -96,20 +98,26 @@ function MultiSelectDropdown({
width: dropdownPosition.width,
}}
>
- {options.map((option) => (
- <label
- key={option}
- className="flex items-center gap-2 px-2 py-1.5 hover:bg-secondary/50 cursor-pointer text-xs"
- >
- <input
- type="checkbox"
- checked={selected.includes(option)}
- onChange={() => toggleOption(option)}
- className="rounded border-border"
- />
- <span className="text-text">{option}</span>
- </label>
- ))}
+ {options.length === 0 ? (
+ <div className="px-2 py-1.5 text-xs text-text-muted">
+ {emptyMessage || "No options available"}
+ </div>
+ ) : (
+ options.map((option) => (
+ <label
+ key={option}
+ className="flex items-center gap-2 px-2 py-1.5 hover:bg-secondary/50 cursor-pointer text-xs"
+ >
+ <input
+ type="checkbox"
+ checked={selected.includes(option)}
+ onChange={() => toggleOption(option)}
+ className="rounded border-border"
+ />
+ <span className="text-text">{option}</span>
+ </label>
+ ))
+ )}
</div>,
document.body
)}
@@ -1457,6 +1465,7 @@ function MultiAgentSection({
onAgentsChange(copy);
}}
placeholder={t("config.keys.agentSkillsPlaceholder")}
+ emptyMessage={t("config.keys.agentSkillsEmpty")}
/>
) : field === "completion_timeout" ? (
<input
@@ -1555,6 +1564,7 @@ function MultiAgentSection({
selected={newAgent.skills || []}
onChange={(selected) => setNewAgent((p) => ({ ...p, skills: selected }))}
placeholder={t("config.keys.agentSkillsPlaceholder")}
+ emptyMessage={t("config.keys.agentSkillsEmpty")}
/>
) : field === "completion_timeout" ? (
<input
diff --git a/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json b/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json
index dc60b5721e..80116f9369 100644
--- a/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json
+++ b/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json
@@ -670,7 +670,8 @@
"memoryForbiddenEnabled": "Enable",
"memoryForbiddenDescription": "Forbidden memory content description",
"memoryForbiddenDescriptionPlaceholder": "e.g. passwords, API keys, secrets, tokens, credit card numbers, ID numbers, phone numbers",
- "agentSkillsPlaceholder": "Separate skills with commas",
+ "agentSkillsPlaceholder": "Click to select skills",
+ "agentSkillsEmpty": "No installed skills",
"agentName": "Name",
"agentModel": "Model",
"agentSkills": "Skills",
diff --git a/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json b/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json
index 7c3952c0fe..b369adf538 100644
--- a/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json
+++ b/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json
@@ -669,7 +669,8 @@
"memoryForbiddenEnabled": "启用",
"memoryForbiddenDescription": "禁止记忆内容描述",
"memoryForbiddenDescriptionPlaceholder": "例如:密码、API密钥、Secret、Token、信用卡号、身份证号、手机号等敏感信息",
- "agentSkillsPlaceholder": "技能用逗号隔开",
+ "agentSkillsPlaceholder": "点击选择技能",
+ "agentSkillsEmpty": "暂无已安装技能",
"agentName": "名称",
"agentModel": "模型",
"agentSkills": "技能",