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:channel 提供适配中状态,钉钉改为适配中

NickFuryXXXdad7d7a22d2c
diff --git a/jiuwenclaw/web/src/components/ChannelsPanel/ChannelsPanel.css b/jiuwenclaw/web/src/components/ChannelsPanel/ChannelsPanel.css
index 5c53f4e749..e5c5f621c0 100644
--- a/jiuwenclaw/web/src/components/ChannelsPanel/ChannelsPanel.css
+++ b/jiuwenclaw/web/src/components/ChannelsPanel/ChannelsPanel.css
@@ -18,3 +18,8 @@
width: 1rem;
height: 1rem;
}
+
+.channels-panel__channel-disabled {
+ cursor: not-allowed;
+ opacity: 0.68;
+}
diff --git a/jiuwenclaw/web/src/components/ChannelsPanel/index.tsx b/jiuwenclaw/web/src/components/ChannelsPanel/index.tsx
index 60998815b3..0a1aad3c9c 100644
--- a/jiuwenclaw/web/src/components/ChannelsPanel/index.tsx
+++ b/jiuwenclaw/web/src/components/ChannelsPanel/index.tsx
@@ -15,6 +15,7 @@ type ChannelItem = {
type LoadState = 'idle' | 'loading' | 'success' | 'error';
type SupportedChannelId = 'web' | 'xiaoyi' | 'feishu' | 'dingtalk';
+const ADAPTING_CHANNEL_IDS = new Set<SupportedChannelId>(['dingtalk']);
type FeishuConfig = {
enabled: boolean;
@@ -425,6 +426,9 @@ export function ChannelsPanel({ isConnected }: ChannelsPanelProps) {
const handleSelectChannel = useCallback(
(channelId: SupportedChannelId) => {
+ if (ADAPTING_CHANNEL_IDS.has(channelId)) {
+ return;
+ }
setActiveChannelId(channelId);
},
[],
@@ -681,40 +685,48 @@ export function ChannelsPanel({ isConnected }: ChannelsPanelProps) {
</div>
) : (
<div className="space-y-2">
- {channels.map((channel, index) => (
- <button
- type="button"
- key={channel.channel_id}
- onClick={() => handleSelectChannel(channel.channel_id)}
- className={`w-full rounded-xl border px-4 py-3.5 text-left transition-colors ${
- activeChannelId === channel.channel_id
- ? 'border-accent bg-accent-subtle text-text'
- : 'border-border bg-card text-text hover:bg-bg-hover'
- }`}
- >
- <div className="flex items-center justify-between gap-3">
- <div className="flex items-center gap-3 min-w-0">
- <span className="text-xs px-2.5 py-1 rounded-full border border-border bg-secondary text-text-muted font-medium">
- #{index + 1}
- </span>
- <ChannelLogo channel={channel} />
- <span className="text-sm font-medium text-text">{channel.label}</span>
- <span className="mono text-xs px-2.5 py-1 rounded-md border border-border bg-secondary text-text-muted">
- {channel.channel_id}
+ {channels.map((channel, index) => {
+ const isAdapting = ADAPTING_CHANNEL_IDS.has(channel.channel_id);
+ return (
+ <button
+ type="button"
+ key={channel.channel_id}
+ onClick={() => handleSelectChannel(channel.channel_id)}
+ disabled={isAdapting}
+ className={`w-full rounded-xl border px-4 py-3.5 text-left transition-colors ${
+ isAdapting
+ ? 'channels-panel__channel-disabled border-border bg-card text-text-muted'
+ : activeChannelId === channel.channel_id
+ ? 'border-accent bg-accent-subtle text-text'
+ : 'border-border bg-card text-text hover:bg-bg-hover'
+ }`}
+ >
+ <div className="flex items-center justify-between gap-3">
+ <div className="flex items-center gap-3 min-w-0">
+ <span className="text-xs px-2.5 py-1 rounded-full border border-border bg-secondary text-text-muted font-medium">
+ #{index + 1}
+ </span>
+ <ChannelLogo channel={channel} />
+ <span className="text-sm font-medium text-text">{channel.label}</span>
+ <span className="mono text-xs px-2.5 py-1 rounded-md border border-border bg-secondary text-text-muted">
+ {channel.channel_id}
+ </span>
+ </div>
+ <span
+ className={`text-xs px-2.5 py-1 rounded-full border font-medium ${
+ isAdapting
+ ? 'text-text-muted border-border bg-secondary'
+ : channel.enabled
+ ? 'text-ok border-ok bg-ok-subtle'
+ : 'text-text-muted border-border bg-secondary'
+ }`}
+ >
+ {isAdapting ? '适配中' : channel.enabled ? '已启用' : '未启用'}
</span>
</div>
- <span
- className={`text-xs px-2.5 py-1 rounded-full border font-medium ${
- channel.enabled
- ? 'text-ok border-ok bg-ok-subtle'
- : 'text-text-muted border-border bg-secondary'
- }`}
- >
- {channel.enabled ? '已启用' : '未启用'}
- </span>
- </div>
- </button>
- ))}
+ </button>
+ );
+ })}
</div>
)}
</div>