mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-11 12:05:33 +08:00
Add session timeline logging and admin sessions view
This commit is contained in:
@@ -19,6 +19,8 @@ export interface DecisionFlowDocument extends mongoose.Document {
|
||||
phases: string[]
|
||||
layout?: DecisionFlowLayout
|
||||
metadata?: DecisionFlowMetadata
|
||||
entryMode?: 'parallel' | 'linear'
|
||||
isMain?: boolean
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
}
|
||||
@@ -37,6 +39,8 @@ const decisionFlowSchema = new mongoose.Schema<DecisionFlowDocument>(
|
||||
hooks: { type: mongoose.Schema.Types.Mixed, default: () => ({}) },
|
||||
roles: { type: [String], default: () => [] },
|
||||
phases: { type: [String], default: () => [] },
|
||||
entryMode: { type: String, enum: ['parallel', 'linear'], default: 'parallel' },
|
||||
isMain: { type: Boolean, default: false },
|
||||
layout: {
|
||||
type: new mongoose.Schema<DecisionFlowLayout>(
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ export interface TransmissionLogDocument extends mongoose.Document {
|
||||
text: string
|
||||
normalized?: string
|
||||
metadata?: Record<string, any>
|
||||
sessionId?: string
|
||||
createdAt: Date
|
||||
}
|
||||
|
||||
@@ -21,6 +22,7 @@ const transmissionSchema = new mongoose.Schema<TransmissionLogDocument>({
|
||||
text: { type: String, required: true },
|
||||
normalized: { type: String },
|
||||
metadata: { type: Schema.Types.Mixed },
|
||||
sessionId: { type: String, index: true },
|
||||
createdAt: { type: Date, default: () => new Date() },
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user