feat: update desktop workflows and app center
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user