feat(kol): expand variable schema and polish KOL UI
- Add length/range limits to KOL variable definitions: max_length and default_value for input/textarea, min_value/max_value/default_number for number. Backend validates and normalizes; frontend renders limit inputs in KolVariableConfig and applies limits at runtime in KolDynamicForm. - Sort workspace cards by most recent prompt/package update, falling back to granted_at. Adds updated_at to KolWorkspaceCard. - Polish TemplatesView, WorkspaceView, and KOL package management UI; route create/update/publish/archive/delete toasts through i18n and expand package form copy and status labels. - Remove stale KnowledgeView.vue.patch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import { UserOutlined, TagOutlined, TeamOutlined, ThunderboltOutlined } from "@ant-design/icons-vue";
|
||||
import type { KolPackageSummary } from "@geo/shared-types";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
import { resolveApiURL } from "@/lib/api";
|
||||
|
||||
const props = defineProps<{
|
||||
package: KolPackageSummary;
|
||||
}>();
|
||||
@@ -12,6 +15,7 @@ const emit = defineEmits<{
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
const coverUrl = computed(() => resolveApiURL(props.package.cover_url));
|
||||
|
||||
function handleClick() {
|
||||
emit("click", props.package.id);
|
||||
@@ -21,8 +25,8 @@ function handleClick() {
|
||||
<template>
|
||||
<a-card hoverable class="kol-package-card" @click="handleClick">
|
||||
<template #cover>
|
||||
<div v-if="props.package.cover_url" class="card-cover-image">
|
||||
<img alt="cover" :src="props.package.cover_url" />
|
||||
<div v-if="coverUrl" class="card-cover-image">
|
||||
<img alt="cover" :src="coverUrl" />
|
||||
</div>
|
||||
<div v-else class="card-cover-fallback">
|
||||
<ThunderboltOutlined class="fallback-icon" />
|
||||
|
||||
Reference in New Issue
Block a user