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): Added prompts for online search in skillsNet

openJiuwen-bot54fe9ca5b2c1
diff --git a/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/InputArea.tsx b/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/InputArea.tsx
index 4fbb315b9c..c47b805a4f 100644
--- a/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/InputArea.tsx
+++ b/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/InputArea.tsx
@@ -1,7 +1,7 @@
-// import { useState, useRef, useCallback, KeyboardEvent, PointerEvent as ReactPointerEvent, useEffect } from 'react';
import { useState, useRef, useCallback, KeyboardEvent, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { useSpeechRecognition } from '../../hooks';
+
// import { stopAllTts } from '../../utils';
import { useChatStore, useSessionStore } from '../../stores';
import { AgentMode } from '../../types';
diff --git a/jiuwenswarm/channels/web/frontend/src/components/SkillPanel/index.tsx b/jiuwenswarm/channels/web/frontend/src/components/SkillPanel/index.tsx
index 062f716c5f..cf906baab7 100644
--- a/jiuwenswarm/channels/web/frontend/src/components/SkillPanel/index.tsx
+++ b/jiuwenswarm/channels/web/frontend/src/components/SkillPanel/index.tsx
@@ -1159,6 +1159,10 @@ export function SkillPanel({ sessionId, onNavigateToConfig }: SkillPanelProps) {
onClose={() => setSourceModalOpen(false)}
currentSource={onlineSource}
onSourceChange={(source) => setOnlineSource(source)}
+ onNavigateToConfig={() => {
+ setSourceModalOpen(false);
+ onNavigateToConfig?.();
+ }}
/>
<SkillNetSearchModal
open={skillNetModalOpen}
diff --git a/jiuwenswarm/channels/web/frontend/src/features/SourceManagerModal/index.tsx b/jiuwenswarm/channels/web/frontend/src/features/SourceManagerModal/index.tsx
index b23af5d70c..3f9aedf0e4 100644
--- a/jiuwenswarm/channels/web/frontend/src/features/SourceManagerModal/index.tsx
+++ b/jiuwenswarm/channels/web/frontend/src/features/SourceManagerModal/index.tsx
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useState } from "react";
-import { useTranslation } from "react-i18next";
+import { Trans, useTranslation } from "react-i18next";
import { webRequest } from "../../services/webClient";
type SourceType = "skillnet" | "clawhub";
@@ -10,6 +10,7 @@ interface SourceManagerModalProps {
onClose: () => void;
onSourceChange?: (source: SourceType) => void;
currentSource?: SourceType;
+ onNavigateToConfig?: () => void;
}
export function SourceManagerModal({
@@ -18,6 +19,7 @@ export function SourceManagerModal({
onClose,
onSourceChange,
currentSource = "skillnet",
+ onNavigateToConfig,
}: SourceManagerModalProps) {
const { t } = useTranslation();
const [selectedSource, setSelectedSource] = useState<SourceType>(currentSource);
@@ -216,10 +218,37 @@ export function SourceManagerModal({
{selectedSource === "skillnet" && (
<div className="rounded-lg border border-border bg-panel p-4">
- <div className="text-sm font-medium text-text mb-2">{t("sourceManager.skillnetInfo")}</div>
- <p className="text-xs text-text-muted">
- {t("sourceManager.skillnetInfoDesc")}
- </p>
+ <div className="font-medium text-text mb-2">
+ {t("sourceManager.skillnet.usageNoticeTitle")}
+ </div>
+ <ul className="list-disc pl-4 space-y-1 text-xs text-text-muted">
+ <li>{t("sourceManager.skillnet.usageNotice1")}</li>
+ <li>
+ <Trans
+ i18nKey="sourceManager.skillnet.usageNotice2"
+ components={{
+ strong: (
+ <strong className="font-semibold text-text" />
+ ),
+ }}
+ />
+ </li>
+ <li>
+ <Trans
+ i18nKey="sourceManager.skillnet.usageNotice3"
+ components={{
+ configLink: (
+ <button
+ type="button"
+ aria-label={t("sourceManager.skillnet.configPageLinkAria")}
+ onClick={() => onNavigateToConfig?.()}
+ className="inline p-0 m-0 align-baseline border-0 bg-transparent cursor-pointer font-medium text-accent underline decoration-accent/35 underline-offset-2 hover:text-accent-hover hover:decoration-accent/60"
+ />
+ ),
+ }}
+ />
+ </li>
+ </ul>
</div>
)}
</div>
diff --git a/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json b/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json
index 6af84d82fd..18a36f1861 100644
--- a/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json
+++ b/jiuwenswarm/channels/web/frontend/src/i18n/locales/en.json
@@ -356,6 +356,13 @@
"enabled": "Enabled",
"disabled": "Disabled",
"expired": "Expired"
+ },
+ "skillnet": {
+ "usageNoticeTitle": "Notes",
+ "usageNotice1": "SkillNet search uses a public service; timeouts or errors may be due to network congestion or server load—try again later.",
+ "usageNotice2": "Installing a skill downloads files from GitHub. <strong>Ensure the machine running JiuwenClaw can reach GitHub</strong> (network / proxy).",
+ "usageNotice3": "GitHub's API limits anonymous (unauthenticated) use to about 60 requests per hour per IP. If install fails with rate limiting, wait and retry later. For increased rate limits, configure github_token on the <configLink>configuration page</configLink>.",
+ "configPageLinkAria": "Go to configuration page"
}
},
"channels": {
diff --git a/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json b/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json
index 72158ebdf5..4ef4f323c3 100644
--- a/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json
+++ b/jiuwenswarm/channels/web/frontend/src/i18n/locales/zh.json
@@ -355,6 +355,13 @@
"label": "状态",
"enabled": "已启用",
"disabled": "已禁用"
+ },
+ "skillnet": {
+ "usageNoticeTitle": "提示",
+ "usageNotice1": "SkillNet 在线搜索走公网服务,若出现超时或失败,可能是网络拥堵或服务繁忙,请稍后再试。",
+ "usageNotice2": "从 SkillNet 安装技能时,文件实际从 GitHub 下载,<strong>请保证运行 JiuwenClaw 的环境能访问 GitHub</strong>(网络、代理等)。",
+ "usageNotice3": "从 GitHub 拉取依赖其 API:未认证(匿名)约 60 次/小时/本机 IP;若安装失败并提示限流,请隔一段时间再试。如需提高速率限制,请在<configLink>配置页面</configLink>中配置 github_token。",
+ "configPageLinkAria": "前往配置页面"
}
},
"channels": {