mirror of
https://github.com/EthanMarti/infio-copilot.git
synced 2026-05-09 00:20:09 +00:00
add tool use, update system prompt
This commit is contained in:
@@ -94,6 +94,7 @@ export class DBManager {
|
||||
// return drizzle(this.pgClient)
|
||||
} catch (error) {
|
||||
console.error('Error loading database:', error)
|
||||
console.log(this.dbPath)
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { SerializedLexicalNode } from 'lexical'
|
||||
|
||||
import { SUPPORT_EMBEDDING_SIMENTION } from '../constants'
|
||||
import { ApplyStatus } from '../types/apply'
|
||||
// import { EmbeddingModelId } from '../types/embedding'
|
||||
|
||||
// PostgreSQL column types
|
||||
@@ -123,6 +124,7 @@ export type Conversation = {
|
||||
export type Message = {
|
||||
id: string // uuid
|
||||
conversationId: string // uuid
|
||||
applyStatus: number
|
||||
role: 'user' | 'assistant'
|
||||
content: string | null
|
||||
reasoningContent?: string | null
|
||||
@@ -151,6 +153,7 @@ export type InsertMessage = {
|
||||
id: string
|
||||
conversationId: string
|
||||
role: 'user' | 'assistant'
|
||||
apply_status: number
|
||||
content: string | null
|
||||
reasoningContent?: string | null
|
||||
promptContent?: string | null
|
||||
@@ -163,6 +166,7 @@ export type InsertMessage = {
|
||||
export type SelectMessage = {
|
||||
id: string // uuid
|
||||
conversation_id: string // uuid
|
||||
apply_status: number
|
||||
role: 'user' | 'assistant'
|
||||
content: string | null
|
||||
reasoning_content?: string | null
|
||||
|
||||
@@ -102,20 +102,10 @@ export const migrations: Record<string, SqlMigration> = {
|
||||
"updated_at" timestamp DEFAULT now() NOT NULL
|
||||
);
|
||||
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT 1 FROM information_schema.columns
|
||||
WHERE table_name = 'messages'
|
||||
AND column_name = 'reasoning_content'
|
||||
) THEN
|
||||
ALTER TABLE "messages" ADD COLUMN "reasoning_content" text;
|
||||
END IF;
|
||||
END $$;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "messages" (
|
||||
"id" uuid PRIMARY KEY NOT NULL,
|
||||
"conversation_id" uuid NOT NULL REFERENCES "conversations"("id") ON DELETE CASCADE,
|
||||
"apply_status" integer NOT NULL DEFAULT 0,
|
||||
"role" text NOT NULL,
|
||||
"content" text,
|
||||
"reasoning_content" text,
|
||||
|
||||
Reference in New Issue
Block a user