Extract memind_adm admin server, add local dev tooling, and remove image-generation.
Split platform admin and ops APIs into standalone admin-server.mjs with network guards; simplify billing to RMB token pricing, refactor user auth, and add rsync deploy plus local-test scripts and docs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { useAppSession } from '../context/AppSessionContext';
|
||||
import { useNetworkStatus } from '../hooks/useNetworkStatus';
|
||||
import { openAvatarPicker } from '../utils/userAvatar';
|
||||
import { CHAT_SKILL_OPTIONS, filterChatSkills } from '../utils/chatSkills';
|
||||
@@ -45,7 +44,6 @@ export function ChatPanel({
|
||||
onClose?: () => void;
|
||||
}) {
|
||||
const online = useNetworkStatus();
|
||||
const { capabilities: sessionCapabilities, grantedSkills: sessionGrantedSkills } = useAppSession();
|
||||
const [input, setInput] = useState('');
|
||||
const [pageSource, setPageSource] = useState<Message | null>(null);
|
||||
const [voiceNotice, setVoiceNotice] = useState<string | null>(null);
|
||||
@@ -58,14 +56,9 @@ export function ChatPanel({
|
||||
const busy = chatState === 'streaming' || chatState === 'loading' || chatState === 'connecting';
|
||||
const offlineBlocked = !online;
|
||||
const publishSkillName = user?.publishSkillName ?? 'static-page-publish';
|
||||
const effectiveCapabilities = capabilities ?? sessionCapabilities;
|
||||
const effectiveGrantedSkills = grantedSkills ?? sessionGrantedSkills;
|
||||
const hasPublishSkill = effectiveGrantedSkills?.includes(publishSkillName) ?? false;
|
||||
const canPublish = Boolean(effectiveCapabilities?.static_publish) || hasPublishSkill;
|
||||
const chatSkills = filterChatSkills(CHAT_SKILL_OPTIONS, {
|
||||
grantedSkills: effectiveGrantedSkills,
|
||||
canPublish,
|
||||
});
|
||||
const hasPublishSkill = grantedSkills?.includes(publishSkillName) ?? false;
|
||||
const canPublish = Boolean(capabilities?.static_publish) || hasPublishSkill;
|
||||
const chatSkills = filterChatSkills(CHAT_SKILL_OPTIONS, { grantedSkills, canPublish });
|
||||
const compact = variant === 'compact';
|
||||
|
||||
const handleSubmit = async () => {
|
||||
@@ -135,9 +128,6 @@ export function ChatPanel({
|
||||
onSaved={(result) => {
|
||||
setPageSource(null);
|
||||
onPageSaved?.(result);
|
||||
if (result.kind === 'page' && result.pageId) {
|
||||
onClose?.();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user