feat: update desktop workflows and app center

This commit is contained in:
inman
2026-05-13 19:14:56 +08:00
parent 20b5aff4ad
commit 7c8781a6e3
160 changed files with 55492 additions and 1423 deletions

View File

@@ -12,9 +12,10 @@ import { Button } from '@/components/ui/button';
import { Textarea } from '@/components/ui/textarea';
import { hostApiFetch } from '@/lib/host-api';
import { invokeIpc } from '@/lib/api-client';
import { buildQuickTaskPrompt } from '@/lib/quick-task-prompt';
import { cn } from '@/lib/utils';
import { useGatewayStore } from '@/stores/gateway';
import { useQuickTasksStore, type QuickTaskConfig } from '@/stores/quick-tasks';
import { useQuickTasksStore } from '@/stores/quick-tasks';
import { useTranslation } from 'react-i18next';
// ── Types ────────────────────────────────────────────────────────
@@ -102,21 +103,6 @@ function readFileAsBase64(file: globalThis.File): Promise<string> {
});
}
function buildQuickTaskPrompt(tasks: QuickTaskConfig[]): string {
return tasks
.map((task) => {
const skillNames = task.skills
.map((skill) => skill.name.trim())
.filter(Boolean);
const triggerNames = skillNames.length > 0 ? skillNames : [task.name.trim()].filter(Boolean);
return triggerNames
.map((skillName) => `使用${skillName} skill`)
.join(' ');
})
.filter(Boolean)
.join(' ');
}
// ── Component ────────────────────────────────────────────────────
export function ChatInput({