feat(3.15): AI Tools extindere si integrare

Prompt Generator:
- Search bar cu cautare in name/description/tags/category
- Filtru target type (text/image) cu toggle rapid 'Imagine'
- 4 template-uri noi imagine: Midjourney Exterior, SD Interior,
  Midjourney Infographic, SD Material Texture (18 total)
- Config v0.2.0

AI Chat  Real API Integration:
- /api/ai-chat route: multi-provider (OpenAI, Anthropic, Ollama, demo)
- System prompt default in romana pt context arhitectura
- GET: config status, POST: message routing
- use-chat.ts: sendMessage() cu fetch real, sending state,
  providerConfig fetch, updateSession() pt project linking
- UI: provider status badge (Wifi/WifiOff), Bot icon pe mesaje,
  loading spinner la generare, disable input while sending
- Config banner cu detalii provider/model/stare

AI Chat + Tag Manager:
- Project selector dropdown in chat header (useTags project)
- Session linking: projectTagId + projectName on ChatSession
- Project name display in session sidebar
- Project context injected in system prompt

Docker:
- AI env vars: AI_PROVIDER, AI_API_KEY, AI_MODEL, AI_BASE_URL, AI_MAX_TOKENS
This commit is contained in:
AI Assistant
2026-02-28 04:51:36 +02:00
parent 11b35c750f
commit d34c722167
12 changed files with 1550 additions and 189 deletions
+5 -2
View File
@@ -10,7 +10,8 @@ import {
manicTimeTagToCreateData,
} from "@/modules/tag-manager/services/manictime-service";
import type { Tag } from "@/core/tagging/types";
import { prisma } from "@/core/storage/prisma";import type { Prisma } from '@prisma/client';
import { prisma } from "@/core/storage/prisma";
import type { Prisma } from "@prisma/client";
const NAMESPACE = "tags";
/**
@@ -155,7 +156,9 @@ export async function POST(request: NextRequest) {
createdAt: new Date().toISOString(),
};
const tagJson = JSON.parse(JSON.stringify(tag)) as Prisma.InputJsonValue;
const tagJson = JSON.parse(
JSON.stringify(tag),
) as Prisma.InputJsonValue;
await prisma.keyValueStore.upsert({
where: { namespace_key: { namespace: NAMESPACE, key: id } },