mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-22 16:48:42 +00:00
Merge pull request #5 from shumaiOne/feat/agent-session-logs
feat(agent): replace isAi with sessionId & implement admin logs UI
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
Beijing: 🌤️ +20°C 50% ↙10km/h
|
||||
Tokyo: 🌤️ +20°C 50% ↙10km/h
|
||||
London: 🌤️ +20°C 50% ↙10km/h
|
||||
New+York: 🌤️ +20°C 50% ↙10km/h
|
||||
Paris: 🌤️ +20°C 50% ↙10km/h
|
||||
Sydney: 🌤️ +20°C 50% ↙10km/h
|
||||
Dubai: 🌤️ +20°C 50% ↙10km/h
|
||||
Singapore: 🌤️ +20°C 50% ↙10km/h
|
||||
Moscow: 🌤️ +20°C 50% ↙10km/h
|
||||
Berlin: 🌤️ +20°C 50% ↙10km/h
|
||||
@@ -0,0 +1 @@
|
||||
6c49ce20d801d83fe10da4ad9cf51eac571100c0e3173d552de878f8e7bf612d
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
name: weather
|
||||
description: Get current weather and forecasts (no API key required).
|
||||
homepage: https://wttr.in/:help
|
||||
metadata: { 'clawdbot': { 'emoji': '🌤️', 'requires': { 'bins': ['curl'] } } }
|
||||
---
|
||||
|
||||
# Weather
|
||||
|
||||
Two free services, no API keys needed.
|
||||
|
||||
## wttr.in (primary)
|
||||
|
||||
Quick one-liner:
|
||||
|
||||
```bash
|
||||
curl -s "wttr.in/London?format=3"
|
||||
# Output: London: ⛅️ +8°C
|
||||
```
|
||||
|
||||
Compact format:
|
||||
|
||||
```bash
|
||||
curl -s "wttr.in/London?format=%l:+%c+%t+%h+%w"
|
||||
# Output: London: ⛅️ +8°C 71% ↙5km/h
|
||||
```
|
||||
|
||||
Full forecast:
|
||||
|
||||
```bash
|
||||
curl -s "wttr.in/London?T"
|
||||
```
|
||||
|
||||
Format codes: `%c` condition · `%t` temp · `%h` humidity · `%w` wind · `%l` location · `%m` moon
|
||||
|
||||
Tips:
|
||||
|
||||
- URL-encode spaces: `wttr.in/New+York`
|
||||
- Airport codes: `wttr.in/JFK`
|
||||
- Units: `?m` (metric) `?u` (USCS)
|
||||
- Today only: `?1` · Current only: `?0`
|
||||
- PNG: `curl -s "wttr.in/Berlin.png" -o /tmp/weather.png`
|
||||
|
||||
## Open-Meteo (fallback, JSON)
|
||||
|
||||
Free, no key, good for programmatic use:
|
||||
|
||||
```bash
|
||||
curl -s "https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.12¤t_weather=true"
|
||||
```
|
||||
|
||||
Find coordinates for a city, then query. Returns JSON with temp, windspeed, weathercode.
|
||||
|
||||
Docs: https://open-meteo.com/en/docs
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"ownerId": "kn70pywhg0fyz996kpa8xj89s57yhv26",
|
||||
"slug": "weather",
|
||||
"version": "1.0.0",
|
||||
"publishedAt": 1767545394459
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `is_ai` on the `asset_comments` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "asset_comments" DROP COLUMN "is_ai",
|
||||
ADD COLUMN "session_id" TEXT;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "asset_comments" ADD CONSTRAINT "asset_comments_session_id_fkey" FOREIGN KEY ("session_id") REFERENCES "agent_sessions"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[session_id]` on the table `asset_comments` will be added. If there are existing duplicate values, this will fail.
|
||||
|
||||
*/
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "asset_comments_session_id_key" ON "asset_comments"("session_id");
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `team_id` to the `agents` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "agents" ADD COLUMN "team_id" TEXT NOT NULL;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "agents" ADD CONSTRAINT "agents_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "teams"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@@ -220,6 +220,7 @@ model Team {
|
||||
providers Provider[] @relation("TeamToProvider")
|
||||
skills Skill[] @relation("TeamToSkill")
|
||||
sandbox Sandbox? @relation("TeamToSandbox")
|
||||
agents Agent[] @relation("TeamToAgent")
|
||||
|
||||
@@map("teams")
|
||||
}
|
||||
@@ -429,7 +430,8 @@ model AssetComment {
|
||||
/// [AnnotationList]
|
||||
annotation Json?
|
||||
second Float?
|
||||
isAi Boolean @default(false) @map("is_ai")
|
||||
sessionId String? @unique @map("session_id")
|
||||
session AgentSession? @relation(fields: [sessionId], references: [id], onDelete: SetNull)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@ -618,6 +620,10 @@ model Agent {
|
||||
provider Provider? @relation("ProviderToAgent", fields: [providerId], references: [id], onDelete: SetNull)
|
||||
modelId String? @map("model_id")
|
||||
modelRef Model? @relation("ModelToAgent", fields: [modelId], references: [id], onDelete: SetNull)
|
||||
|
||||
teamId String @map("team_id")
|
||||
team Team @relation("TeamToAgent", fields: [teamId], references: [id], onDelete: Cascade)
|
||||
|
||||
/// [AgentConfig]
|
||||
config Json
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
@@ -652,6 +658,7 @@ model AgentSession {
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
entries AgentSessionEntry[]
|
||||
comment AssetComment?
|
||||
|
||||
@@map("agent_sessions")
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ describe('DatabaseSessionStorage', () => {
|
||||
const agent = await prisma.agent.create({
|
||||
data: {
|
||||
id: user.id,
|
||||
teamId: team.id,
|
||||
type: 'chat',
|
||||
providerId: provider.id,
|
||||
modelId: model.id,
|
||||
|
||||
@@ -141,4 +141,43 @@ describe('Agent API', () => {
|
||||
expect(agentService.deleteAgent).toHaveBeenCalledWith({ agentId: 'agent1' })
|
||||
})
|
||||
})
|
||||
|
||||
describe('GET /teams/:teamId/agent-sessions/:sessionId/entries', () => {
|
||||
it('returns entries of agent session if user is admin', async () => {
|
||||
const mockEntries = [
|
||||
{
|
||||
id: 'entry1',
|
||||
sessionId: 'session1',
|
||||
entry: { step: 1, message: 'Step 1' },
|
||||
},
|
||||
]
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
vi.mocked(agentService.getSessionEntries).mockResolvedValue(mockEntries as any)
|
||||
|
||||
const res = await app.request('/teams/team1/agent-sessions/session1/entries', {
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
const data = await res.json()
|
||||
expect(data).toHaveLength(1)
|
||||
expect(data[0].id).toBe('entry1')
|
||||
expect(data[0].entry.step).toBe(1)
|
||||
expect(authzService.hasPermission).toHaveBeenCalledWith({
|
||||
teamId: 'team1',
|
||||
user: undefined,
|
||||
permission: 'Admin',
|
||||
})
|
||||
})
|
||||
|
||||
it('denies access if user is not admin', async () => {
|
||||
vi.mocked(authzService.hasPermission).mockRejectedValue(new Error('Forbidden'))
|
||||
|
||||
const res = await app.request('/teams/team1/agent-sessions/session1/entries', {
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
})
|
||||
|
||||
expect(res.status).toBe(500)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -147,5 +147,25 @@ const route = new Hono<{ Variables: { user: User } }>()
|
||||
|
||||
return new Response(null, { status: 204 })
|
||||
})
|
||||
.get('/teams/:teamId/agent-sessions/:sessionId/entries', async (c) => {
|
||||
const teamId = c.req.param('teamId')
|
||||
const sessionId = c.req.param('sessionId')
|
||||
const userReq = c.get('user')
|
||||
|
||||
await authzService.hasPermission({
|
||||
teamId,
|
||||
user: userReq,
|
||||
permission: Permission.Admin,
|
||||
})
|
||||
|
||||
const entries = await agentService.getSessionEntries({ sessionId })
|
||||
const infos = entries.map((entry) => ({
|
||||
id: entry.id,
|
||||
sessionId: entry.sessionId,
|
||||
entry: entry.entry,
|
||||
}))
|
||||
|
||||
return c.json(infos, 200)
|
||||
})
|
||||
|
||||
export default route
|
||||
|
||||
@@ -157,7 +157,7 @@ describe('file api', () => {
|
||||
mentions: [],
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
isAi: false,
|
||||
sessionId: null,
|
||||
})
|
||||
|
||||
const app = new Hono().use('*', authMiddleware).route('/', fileRoute)
|
||||
@@ -200,7 +200,7 @@ describe('file api', () => {
|
||||
mentions: [],
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
isAi: false,
|
||||
sessionId: null,
|
||||
},
|
||||
],
|
||||
pageInfo: { cursor: 'cursor', total: 1 },
|
||||
|
||||
@@ -98,3 +98,10 @@ export interface DeleteAgentParams {
|
||||
export interface ListAgentsParams {
|
||||
teamId: string
|
||||
}
|
||||
|
||||
export const agentSessionEntrySchema = z.object({
|
||||
id: z.string(),
|
||||
sessionId: z.string(),
|
||||
entry: z.unknown(),
|
||||
})
|
||||
export type AgentSessionEntryInfo = z.infer<typeof agentSessionEntrySchema>
|
||||
|
||||
+2
-2
@@ -173,7 +173,7 @@ export type CommentInfo = {
|
||||
mentions: UserInfo[]
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
isAi: boolean
|
||||
sessionId: string | null
|
||||
}
|
||||
|
||||
export const commentInfoSchema: z.ZodType<CommentInfo> = z.object({
|
||||
@@ -188,7 +188,7 @@ export const commentInfoSchema: z.ZodType<CommentInfo> = z.object({
|
||||
mentions: z.array(userInfoSchema),
|
||||
createdAt: z.string(),
|
||||
updatedAt: z.string(),
|
||||
isAi: z.boolean(),
|
||||
sessionId: z.string().nullable(),
|
||||
})
|
||||
|
||||
export const reparentAssetsRequestSchema = z.object({
|
||||
|
||||
Generated
+4
-4
File diff suppressed because one or more lines are too long
+2
-1
@@ -2905,7 +2905,7 @@ export const AssetCommentScalarFieldEnum = {
|
||||
message: 'message',
|
||||
annotation: 'annotation',
|
||||
second: 'second',
|
||||
isAi: 'isAi',
|
||||
sessionId: 'sessionId',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
assetId: 'assetId',
|
||||
@@ -3039,6 +3039,7 @@ export const AgentScalarFieldEnum = {
|
||||
soul: 'soul',
|
||||
providerId: 'providerId',
|
||||
modelId: 'modelId',
|
||||
teamId: 'teamId',
|
||||
config: 'config',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
|
||||
+2
-1
@@ -312,7 +312,7 @@ export const AssetCommentScalarFieldEnum = {
|
||||
message: 'message',
|
||||
annotation: 'annotation',
|
||||
second: 'second',
|
||||
isAi: 'isAi',
|
||||
sessionId: 'sessionId',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
assetId: 'assetId',
|
||||
@@ -446,6 +446,7 @@ export const AgentScalarFieldEnum = {
|
||||
soul: 'soul',
|
||||
providerId: 'providerId',
|
||||
modelId: 'modelId',
|
||||
teamId: 'teamId',
|
||||
config: 'config',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
|
||||
Generated
+237
-26
@@ -33,6 +33,7 @@ export type AgentMinAggregateOutputType = {
|
||||
soul: string | null
|
||||
providerId: string | null
|
||||
modelId: string | null
|
||||
teamId: string | null
|
||||
createdAt: Date | null
|
||||
updatedAt: Date | null
|
||||
}
|
||||
@@ -44,6 +45,7 @@ export type AgentMaxAggregateOutputType = {
|
||||
soul: string | null
|
||||
providerId: string | null
|
||||
modelId: string | null
|
||||
teamId: string | null
|
||||
createdAt: Date | null
|
||||
updatedAt: Date | null
|
||||
}
|
||||
@@ -55,6 +57,7 @@ export type AgentCountAggregateOutputType = {
|
||||
soul: number
|
||||
providerId: number
|
||||
modelId: number
|
||||
teamId: number
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt: number
|
||||
updatedAt: number
|
||||
@@ -69,6 +72,7 @@ export type AgentMinAggregateInputType = {
|
||||
soul?: true
|
||||
providerId?: true
|
||||
modelId?: true
|
||||
teamId?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
}
|
||||
@@ -80,6 +84,7 @@ export type AgentMaxAggregateInputType = {
|
||||
soul?: true
|
||||
providerId?: true
|
||||
modelId?: true
|
||||
teamId?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
}
|
||||
@@ -91,6 +96,7 @@ export type AgentCountAggregateInputType = {
|
||||
soul?: true
|
||||
providerId?: true
|
||||
modelId?: true
|
||||
teamId?: true
|
||||
config?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
@@ -176,6 +182,7 @@ export type AgentGroupByOutputType = {
|
||||
soul: string | null
|
||||
providerId: string | null
|
||||
modelId: string | null
|
||||
teamId: string
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
@@ -209,12 +216,14 @@ export type AgentWhereInput = {
|
||||
soul?: Prisma.StringNullableFilter<"Agent"> | string | null
|
||||
providerId?: Prisma.StringNullableFilter<"Agent"> | string | null
|
||||
modelId?: Prisma.StringNullableFilter<"Agent"> | string | null
|
||||
teamId?: Prisma.StringFilter<"Agent"> | string
|
||||
config?: Prisma.JsonFilter<"Agent">
|
||||
createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
|
||||
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
||||
provider?: Prisma.XOR<Prisma.ProviderNullableScalarRelationFilter, Prisma.ProviderWhereInput> | null
|
||||
modelRef?: Prisma.XOR<Prisma.ModelNullableScalarRelationFilter, Prisma.ModelWhereInput> | null
|
||||
team?: Prisma.XOR<Prisma.TeamScalarRelationFilter, Prisma.TeamWhereInput>
|
||||
agentSessions?: Prisma.AgentSessionListRelationFilter
|
||||
skills?: Prisma.AgentSkillListRelationFilter
|
||||
}
|
||||
@@ -226,12 +235,14 @@ export type AgentOrderByWithRelationInput = {
|
||||
soul?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
providerId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
modelId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
teamId?: Prisma.SortOrder
|
||||
config?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
user?: Prisma.UserOrderByWithRelationInput
|
||||
provider?: Prisma.ProviderOrderByWithRelationInput
|
||||
modelRef?: Prisma.ModelOrderByWithRelationInput
|
||||
team?: Prisma.TeamOrderByWithRelationInput
|
||||
agentSessions?: Prisma.AgentSessionOrderByRelationAggregateInput
|
||||
skills?: Prisma.AgentSkillOrderByRelationAggregateInput
|
||||
}
|
||||
@@ -246,12 +257,14 @@ export type AgentWhereUniqueInput = Prisma.AtLeast<{
|
||||
soul?: Prisma.StringNullableFilter<"Agent"> | string | null
|
||||
providerId?: Prisma.StringNullableFilter<"Agent"> | string | null
|
||||
modelId?: Prisma.StringNullableFilter<"Agent"> | string | null
|
||||
teamId?: Prisma.StringFilter<"Agent"> | string
|
||||
config?: Prisma.JsonFilter<"Agent">
|
||||
createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
|
||||
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
||||
provider?: Prisma.XOR<Prisma.ProviderNullableScalarRelationFilter, Prisma.ProviderWhereInput> | null
|
||||
modelRef?: Prisma.XOR<Prisma.ModelNullableScalarRelationFilter, Prisma.ModelWhereInput> | null
|
||||
team?: Prisma.XOR<Prisma.TeamScalarRelationFilter, Prisma.TeamWhereInput>
|
||||
agentSessions?: Prisma.AgentSessionListRelationFilter
|
||||
skills?: Prisma.AgentSkillListRelationFilter
|
||||
}, "id">
|
||||
@@ -263,6 +276,7 @@ export type AgentOrderByWithAggregationInput = {
|
||||
soul?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
providerId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
modelId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
teamId?: Prisma.SortOrder
|
||||
config?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
@@ -281,6 +295,7 @@ export type AgentScalarWhereWithAggregatesInput = {
|
||||
soul?: Prisma.StringNullableWithAggregatesFilter<"Agent"> | string | null
|
||||
providerId?: Prisma.StringNullableWithAggregatesFilter<"Agent"> | string | null
|
||||
modelId?: Prisma.StringNullableWithAggregatesFilter<"Agent"> | string | null
|
||||
teamId?: Prisma.StringWithAggregatesFilter<"Agent"> | string
|
||||
config?: Prisma.JsonWithAggregatesFilter<"Agent">
|
||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Agent"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Agent"> | Date | string
|
||||
@@ -296,6 +311,7 @@ export type AgentCreateInput = {
|
||||
user: Prisma.UserCreateNestedOneWithoutAgentInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
|
||||
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
|
||||
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
|
||||
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
|
||||
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
|
||||
}
|
||||
@@ -307,6 +323,7 @@ export type AgentUncheckedCreateInput = {
|
||||
soul?: string | null
|
||||
providerId?: string | null
|
||||
modelId?: string | null
|
||||
teamId: string
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
@@ -324,6 +341,7 @@ export type AgentUpdateInput = {
|
||||
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
|
||||
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
|
||||
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
|
||||
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
|
||||
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
|
||||
}
|
||||
@@ -335,6 +353,7 @@ export type AgentUncheckedUpdateInput = {
|
||||
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
teamId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
config?:PrismaJson.AgentConfig
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
@@ -349,6 +368,7 @@ export type AgentCreateManyInput = {
|
||||
soul?: string | null
|
||||
providerId?: string | null
|
||||
modelId?: string | null
|
||||
teamId: string
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
@@ -370,6 +390,7 @@ export type AgentUncheckedUpdateManyInput = {
|
||||
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
teamId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
config?:PrismaJson.AgentConfig
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
@@ -380,6 +401,16 @@ export type AgentNullableScalarRelationFilter = {
|
||||
isNot?: Prisma.AgentWhereInput | null
|
||||
}
|
||||
|
||||
export type AgentListRelationFilter = {
|
||||
every?: Prisma.AgentWhereInput
|
||||
some?: Prisma.AgentWhereInput
|
||||
none?: Prisma.AgentWhereInput
|
||||
}
|
||||
|
||||
export type AgentOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type AgentCountOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
@@ -387,6 +418,7 @@ export type AgentCountOrderByAggregateInput = {
|
||||
soul?: Prisma.SortOrder
|
||||
providerId?: Prisma.SortOrder
|
||||
modelId?: Prisma.SortOrder
|
||||
teamId?: Prisma.SortOrder
|
||||
config?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
@@ -399,6 +431,7 @@ export type AgentMaxOrderByAggregateInput = {
|
||||
soul?: Prisma.SortOrder
|
||||
providerId?: Prisma.SortOrder
|
||||
modelId?: Prisma.SortOrder
|
||||
teamId?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
}
|
||||
@@ -410,6 +443,7 @@ export type AgentMinOrderByAggregateInput = {
|
||||
soul?: Prisma.SortOrder
|
||||
providerId?: Prisma.SortOrder
|
||||
modelId?: Prisma.SortOrder
|
||||
teamId?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
}
|
||||
@@ -419,16 +453,6 @@ export type AgentScalarRelationFilter = {
|
||||
isNot?: Prisma.AgentWhereInput
|
||||
}
|
||||
|
||||
export type AgentListRelationFilter = {
|
||||
every?: Prisma.AgentWhereInput
|
||||
some?: Prisma.AgentWhereInput
|
||||
none?: Prisma.AgentWhereInput
|
||||
}
|
||||
|
||||
export type AgentOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type AgentCreateNestedOneWithoutUserInput = {
|
||||
create?: Prisma.XOR<Prisma.AgentCreateWithoutUserInput, Prisma.AgentUncheckedCreateWithoutUserInput>
|
||||
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutUserInput
|
||||
@@ -461,6 +485,48 @@ export type AgentUncheckedUpdateOneWithoutUserNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.AgentUpdateToOneWithWhereWithoutUserInput, Prisma.AgentUpdateWithoutUserInput>, Prisma.AgentUncheckedUpdateWithoutUserInput>
|
||||
}
|
||||
|
||||
export type AgentCreateNestedManyWithoutTeamInput = {
|
||||
create?: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput> | Prisma.AgentCreateWithoutTeamInput[] | Prisma.AgentUncheckedCreateWithoutTeamInput[]
|
||||
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutTeamInput | Prisma.AgentCreateOrConnectWithoutTeamInput[]
|
||||
createMany?: Prisma.AgentCreateManyTeamInputEnvelope
|
||||
connect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type AgentUncheckedCreateNestedManyWithoutTeamInput = {
|
||||
create?: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput> | Prisma.AgentCreateWithoutTeamInput[] | Prisma.AgentUncheckedCreateWithoutTeamInput[]
|
||||
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutTeamInput | Prisma.AgentCreateOrConnectWithoutTeamInput[]
|
||||
createMany?: Prisma.AgentCreateManyTeamInputEnvelope
|
||||
connect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type AgentUpdateManyWithoutTeamNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput> | Prisma.AgentCreateWithoutTeamInput[] | Prisma.AgentUncheckedCreateWithoutTeamInput[]
|
||||
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutTeamInput | Prisma.AgentCreateOrConnectWithoutTeamInput[]
|
||||
upsert?: Prisma.AgentUpsertWithWhereUniqueWithoutTeamInput | Prisma.AgentUpsertWithWhereUniqueWithoutTeamInput[]
|
||||
createMany?: Prisma.AgentCreateManyTeamInputEnvelope
|
||||
set?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
|
||||
disconnect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
|
||||
delete?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
|
||||
connect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
|
||||
update?: Prisma.AgentUpdateWithWhereUniqueWithoutTeamInput | Prisma.AgentUpdateWithWhereUniqueWithoutTeamInput[]
|
||||
updateMany?: Prisma.AgentUpdateManyWithWhereWithoutTeamInput | Prisma.AgentUpdateManyWithWhereWithoutTeamInput[]
|
||||
deleteMany?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type AgentUncheckedUpdateManyWithoutTeamNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput> | Prisma.AgentCreateWithoutTeamInput[] | Prisma.AgentUncheckedCreateWithoutTeamInput[]
|
||||
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutTeamInput | Prisma.AgentCreateOrConnectWithoutTeamInput[]
|
||||
upsert?: Prisma.AgentUpsertWithWhereUniqueWithoutTeamInput | Prisma.AgentUpsertWithWhereUniqueWithoutTeamInput[]
|
||||
createMany?: Prisma.AgentCreateManyTeamInputEnvelope
|
||||
set?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
|
||||
disconnect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
|
||||
delete?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
|
||||
connect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
|
||||
update?: Prisma.AgentUpdateWithWhereUniqueWithoutTeamInput | Prisma.AgentUpdateWithWhereUniqueWithoutTeamInput[]
|
||||
updateMany?: Prisma.AgentUpdateManyWithWhereWithoutTeamInput | Prisma.AgentUpdateManyWithWhereWithoutTeamInput[]
|
||||
deleteMany?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type EnumAgentTypeFieldUpdateOperationsInput = {
|
||||
set?: $Enums.AgentType
|
||||
}
|
||||
@@ -586,6 +652,7 @@ export type AgentCreateWithoutUserInput = {
|
||||
updatedAt?: Date | string
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
|
||||
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
|
||||
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
|
||||
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
|
||||
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
|
||||
}
|
||||
@@ -596,6 +663,7 @@ export type AgentUncheckedCreateWithoutUserInput = {
|
||||
soul?: string | null
|
||||
providerId?: string | null
|
||||
modelId?: string | null
|
||||
teamId: string
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
@@ -628,6 +696,7 @@ export type AgentUpdateWithoutUserInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
|
||||
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
|
||||
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
|
||||
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
|
||||
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
|
||||
}
|
||||
@@ -638,6 +707,7 @@ export type AgentUncheckedUpdateWithoutUserInput = {
|
||||
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
teamId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
config?:PrismaJson.AgentConfig
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
@@ -645,6 +715,76 @@ export type AgentUncheckedUpdateWithoutUserInput = {
|
||||
skills?: Prisma.AgentSkillUncheckedUpdateManyWithoutAgentNestedInput
|
||||
}
|
||||
|
||||
export type AgentCreateWithoutTeamInput = {
|
||||
type: $Enums.AgentType
|
||||
enabled?: boolean
|
||||
soul?: string | null
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
user: Prisma.UserCreateNestedOneWithoutAgentInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
|
||||
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
|
||||
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
|
||||
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
|
||||
}
|
||||
|
||||
export type AgentUncheckedCreateWithoutTeamInput = {
|
||||
id: string
|
||||
type: $Enums.AgentType
|
||||
enabled?: boolean
|
||||
soul?: string | null
|
||||
providerId?: string | null
|
||||
modelId?: string | null
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutAgentInput
|
||||
skills?: Prisma.AgentSkillUncheckedCreateNestedManyWithoutAgentInput
|
||||
}
|
||||
|
||||
export type AgentCreateOrConnectWithoutTeamInput = {
|
||||
where: Prisma.AgentWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput>
|
||||
}
|
||||
|
||||
export type AgentCreateManyTeamInputEnvelope = {
|
||||
data: Prisma.AgentCreateManyTeamInput | Prisma.AgentCreateManyTeamInput[]
|
||||
skipDuplicates?: boolean
|
||||
}
|
||||
|
||||
export type AgentUpsertWithWhereUniqueWithoutTeamInput = {
|
||||
where: Prisma.AgentWhereUniqueInput
|
||||
update: Prisma.XOR<Prisma.AgentUpdateWithoutTeamInput, Prisma.AgentUncheckedUpdateWithoutTeamInput>
|
||||
create: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput>
|
||||
}
|
||||
|
||||
export type AgentUpdateWithWhereUniqueWithoutTeamInput = {
|
||||
where: Prisma.AgentWhereUniqueInput
|
||||
data: Prisma.XOR<Prisma.AgentUpdateWithoutTeamInput, Prisma.AgentUncheckedUpdateWithoutTeamInput>
|
||||
}
|
||||
|
||||
export type AgentUpdateManyWithWhereWithoutTeamInput = {
|
||||
where: Prisma.AgentScalarWhereInput
|
||||
data: Prisma.XOR<Prisma.AgentUpdateManyMutationInput, Prisma.AgentUncheckedUpdateManyWithoutTeamInput>
|
||||
}
|
||||
|
||||
export type AgentScalarWhereInput = {
|
||||
AND?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
|
||||
OR?: Prisma.AgentScalarWhereInput[]
|
||||
NOT?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
|
||||
id?: Prisma.StringFilter<"Agent"> | string
|
||||
type?: Prisma.EnumAgentTypeFilter<"Agent"> | $Enums.AgentType
|
||||
enabled?: Prisma.BoolFilter<"Agent"> | boolean
|
||||
soul?: Prisma.StringNullableFilter<"Agent"> | string | null
|
||||
providerId?: Prisma.StringNullableFilter<"Agent"> | string | null
|
||||
modelId?: Prisma.StringNullableFilter<"Agent"> | string | null
|
||||
teamId?: Prisma.StringFilter<"Agent"> | string
|
||||
config?: Prisma.JsonFilter<"Agent">
|
||||
createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
|
||||
}
|
||||
|
||||
export type AgentCreateWithoutSkillsInput = {
|
||||
type: $Enums.AgentType
|
||||
enabled?: boolean
|
||||
@@ -655,6 +795,7 @@ export type AgentCreateWithoutSkillsInput = {
|
||||
user: Prisma.UserCreateNestedOneWithoutAgentInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
|
||||
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
|
||||
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
|
||||
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
|
||||
}
|
||||
|
||||
@@ -665,6 +806,7 @@ export type AgentUncheckedCreateWithoutSkillsInput = {
|
||||
soul?: string | null
|
||||
providerId?: string | null
|
||||
modelId?: string | null
|
||||
teamId: string
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
@@ -697,6 +839,7 @@ export type AgentUpdateWithoutSkillsInput = {
|
||||
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
|
||||
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
|
||||
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
|
||||
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
|
||||
}
|
||||
|
||||
@@ -707,6 +850,7 @@ export type AgentUncheckedUpdateWithoutSkillsInput = {
|
||||
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
teamId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
config?:PrismaJson.AgentConfig
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
@@ -723,6 +867,7 @@ export type AgentCreateWithoutAgentSessionsInput = {
|
||||
user: Prisma.UserCreateNestedOneWithoutAgentInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
|
||||
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
|
||||
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
|
||||
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
|
||||
}
|
||||
|
||||
@@ -733,6 +878,7 @@ export type AgentUncheckedCreateWithoutAgentSessionsInput = {
|
||||
soul?: string | null
|
||||
providerId?: string | null
|
||||
modelId?: string | null
|
||||
teamId: string
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
@@ -765,6 +911,7 @@ export type AgentUpdateWithoutAgentSessionsInput = {
|
||||
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
|
||||
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
|
||||
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
|
||||
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
|
||||
}
|
||||
|
||||
@@ -775,6 +922,7 @@ export type AgentUncheckedUpdateWithoutAgentSessionsInput = {
|
||||
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
teamId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
config?:PrismaJson.AgentConfig
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
@@ -790,6 +938,7 @@ export type AgentCreateWithoutModelRefInput = {
|
||||
updatedAt?: Date | string
|
||||
user: Prisma.UserCreateNestedOneWithoutAgentInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
|
||||
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
|
||||
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
|
||||
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
|
||||
}
|
||||
@@ -800,6 +949,7 @@ export type AgentUncheckedCreateWithoutModelRefInput = {
|
||||
enabled?: boolean
|
||||
soul?: string | null
|
||||
providerId?: string | null
|
||||
teamId: string
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
@@ -833,21 +983,6 @@ export type AgentUpdateManyWithWhereWithoutModelRefInput = {
|
||||
data: Prisma.XOR<Prisma.AgentUpdateManyMutationInput, Prisma.AgentUncheckedUpdateManyWithoutModelRefInput>
|
||||
}
|
||||
|
||||
export type AgentScalarWhereInput = {
|
||||
AND?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
|
||||
OR?: Prisma.AgentScalarWhereInput[]
|
||||
NOT?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
|
||||
id?: Prisma.StringFilter<"Agent"> | string
|
||||
type?: Prisma.EnumAgentTypeFilter<"Agent"> | $Enums.AgentType
|
||||
enabled?: Prisma.BoolFilter<"Agent"> | boolean
|
||||
soul?: Prisma.StringNullableFilter<"Agent"> | string | null
|
||||
providerId?: Prisma.StringNullableFilter<"Agent"> | string | null
|
||||
modelId?: Prisma.StringNullableFilter<"Agent"> | string | null
|
||||
config?: Prisma.JsonFilter<"Agent">
|
||||
createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
|
||||
}
|
||||
|
||||
export type AgentCreateWithoutProviderInput = {
|
||||
type: $Enums.AgentType
|
||||
enabled?: boolean
|
||||
@@ -857,6 +992,7 @@ export type AgentCreateWithoutProviderInput = {
|
||||
updatedAt?: Date | string
|
||||
user: Prisma.UserCreateNestedOneWithoutAgentInput
|
||||
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
|
||||
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
|
||||
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
|
||||
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
|
||||
}
|
||||
@@ -867,6 +1003,7 @@ export type AgentUncheckedCreateWithoutProviderInput = {
|
||||
enabled?: boolean
|
||||
soul?: string | null
|
||||
modelId?: string | null
|
||||
teamId: string
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
@@ -900,12 +1037,65 @@ export type AgentUpdateManyWithWhereWithoutProviderInput = {
|
||||
data: Prisma.XOR<Prisma.AgentUpdateManyMutationInput, Prisma.AgentUncheckedUpdateManyWithoutProviderInput>
|
||||
}
|
||||
|
||||
export type AgentCreateManyTeamInput = {
|
||||
id: string
|
||||
type: $Enums.AgentType
|
||||
enabled?: boolean
|
||||
soul?: string | null
|
||||
providerId?: string | null
|
||||
modelId?: string | null
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
}
|
||||
|
||||
export type AgentUpdateWithoutTeamInput = {
|
||||
type?: Prisma.EnumAgentTypeFieldUpdateOperationsInput | $Enums.AgentType
|
||||
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
config?:PrismaJson.AgentConfig
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
|
||||
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
|
||||
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
|
||||
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
|
||||
}
|
||||
|
||||
export type AgentUncheckedUpdateWithoutTeamInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.EnumAgentTypeFieldUpdateOperationsInput | $Enums.AgentType
|
||||
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
config?:PrismaJson.AgentConfig
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutAgentNestedInput
|
||||
skills?: Prisma.AgentSkillUncheckedUpdateManyWithoutAgentNestedInput
|
||||
}
|
||||
|
||||
export type AgentUncheckedUpdateManyWithoutTeamInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
type?: Prisma.EnumAgentTypeFieldUpdateOperationsInput | $Enums.AgentType
|
||||
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
config?:PrismaJson.AgentConfig
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
}
|
||||
|
||||
export type AgentCreateManyModelRefInput = {
|
||||
id: string
|
||||
type: $Enums.AgentType
|
||||
enabled?: boolean
|
||||
soul?: string | null
|
||||
providerId?: string | null
|
||||
teamId: string
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
@@ -920,6 +1110,7 @@ export type AgentUpdateWithoutModelRefInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
|
||||
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
|
||||
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
|
||||
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
|
||||
}
|
||||
@@ -930,6 +1121,7 @@ export type AgentUncheckedUpdateWithoutModelRefInput = {
|
||||
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
teamId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
config?:PrismaJson.AgentConfig
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
@@ -943,6 +1135,7 @@ export type AgentUncheckedUpdateManyWithoutModelRefInput = {
|
||||
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
teamId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
config?:PrismaJson.AgentConfig
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
@@ -954,6 +1147,7 @@ export type AgentCreateManyProviderInput = {
|
||||
enabled?: boolean
|
||||
soul?: string | null
|
||||
modelId?: string | null
|
||||
teamId: string
|
||||
config:PrismaJson.AgentConfig
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
@@ -968,6 +1162,7 @@ export type AgentUpdateWithoutProviderInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
|
||||
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
|
||||
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
|
||||
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
|
||||
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
|
||||
}
|
||||
@@ -978,6 +1173,7 @@ export type AgentUncheckedUpdateWithoutProviderInput = {
|
||||
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
teamId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
config?:PrismaJson.AgentConfig
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
@@ -991,6 +1187,7 @@ export type AgentUncheckedUpdateManyWithoutProviderInput = {
|
||||
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
teamId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
config?:PrismaJson.AgentConfig
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
@@ -1043,12 +1240,14 @@ export type AgentSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
soul?: boolean
|
||||
providerId?: boolean
|
||||
modelId?: boolean
|
||||
teamId?: boolean
|
||||
config?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
||||
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
|
||||
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
|
||||
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
|
||||
agentSessions?: boolean | Prisma.Agent$agentSessionsArgs<ExtArgs>
|
||||
skills?: boolean | Prisma.Agent$skillsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.AgentCountOutputTypeDefaultArgs<ExtArgs>
|
||||
@@ -1061,12 +1260,14 @@ export type AgentSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensi
|
||||
soul?: boolean
|
||||
providerId?: boolean
|
||||
modelId?: boolean
|
||||
teamId?: boolean
|
||||
config?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
||||
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
|
||||
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
|
||||
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["agent"]>
|
||||
|
||||
export type AgentSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
@@ -1076,12 +1277,14 @@ export type AgentSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensi
|
||||
soul?: boolean
|
||||
providerId?: boolean
|
||||
modelId?: boolean
|
||||
teamId?: boolean
|
||||
config?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
||||
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
|
||||
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
|
||||
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["agent"]>
|
||||
|
||||
export type AgentSelectScalar = {
|
||||
@@ -1091,16 +1294,18 @@ export type AgentSelectScalar = {
|
||||
soul?: boolean
|
||||
providerId?: boolean
|
||||
modelId?: boolean
|
||||
teamId?: boolean
|
||||
config?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
}
|
||||
|
||||
export type AgentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "type" | "enabled" | "soul" | "providerId" | "modelId" | "config" | "createdAt" | "updatedAt", ExtArgs["result"]["agent"]>
|
||||
export type AgentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "type" | "enabled" | "soul" | "providerId" | "modelId" | "teamId" | "config" | "createdAt" | "updatedAt", ExtArgs["result"]["agent"]>
|
||||
export type AgentInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
||||
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
|
||||
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
|
||||
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
|
||||
agentSessions?: boolean | Prisma.Agent$agentSessionsArgs<ExtArgs>
|
||||
skills?: boolean | Prisma.Agent$skillsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.AgentCountOutputTypeDefaultArgs<ExtArgs>
|
||||
@@ -1109,11 +1314,13 @@ export type AgentIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extens
|
||||
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
||||
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
|
||||
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
|
||||
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type AgentIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
||||
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
|
||||
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
|
||||
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $AgentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -1122,6 +1329,7 @@ export type $AgentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
user: Prisma.$UserPayload<ExtArgs>
|
||||
provider: Prisma.$ProviderPayload<ExtArgs> | null
|
||||
modelRef: Prisma.$ModelPayload<ExtArgs> | null
|
||||
team: Prisma.$TeamPayload<ExtArgs>
|
||||
agentSessions: Prisma.$AgentSessionPayload<ExtArgs>[]
|
||||
skills: Prisma.$AgentSkillPayload<ExtArgs>[]
|
||||
}
|
||||
@@ -1132,6 +1340,7 @@ export type $AgentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
soul: string | null
|
||||
providerId: string | null
|
||||
modelId: string | null
|
||||
teamId: string
|
||||
/**
|
||||
* [AgentConfig]
|
||||
*/
|
||||
@@ -1535,6 +1744,7 @@ export interface Prisma__AgentClient<T, Null = never, ExtArgs extends runtime.Ty
|
||||
user<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
provider<T extends Prisma.Agent$providerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$providerArgs<ExtArgs>>): Prisma.Prisma__ProviderClient<runtime.Types.Result.GetResult<Prisma.$ProviderPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
modelRef<T extends Prisma.Agent$modelRefArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$modelRefArgs<ExtArgs>>): Prisma.Prisma__ModelClient<runtime.Types.Result.GetResult<Prisma.$ModelPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
team<T extends Prisma.TeamDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.TeamDefaultArgs<ExtArgs>>): Prisma.Prisma__TeamClient<runtime.Types.Result.GetResult<Prisma.$TeamPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
agentSessions<T extends Prisma.Agent$agentSessionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$agentSessionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentSessionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
skills<T extends Prisma.Agent$skillsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$skillsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentSkillPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
@@ -1572,6 +1782,7 @@ export interface AgentFieldRefs {
|
||||
readonly soul: Prisma.FieldRef<"Agent", 'String'>
|
||||
readonly providerId: Prisma.FieldRef<"Agent", 'String'>
|
||||
readonly modelId: Prisma.FieldRef<"Agent", 'String'>
|
||||
readonly teamId: Prisma.FieldRef<"Agent", 'String'>
|
||||
readonly config: Prisma.FieldRef<"Agent", 'Json'>
|
||||
readonly createdAt: Prisma.FieldRef<"Agent", 'DateTime'>
|
||||
readonly updatedAt: Prisma.FieldRef<"Agent", 'DateTime'>
|
||||
|
||||
+123
@@ -203,6 +203,7 @@ export type AgentSessionWhereInput = {
|
||||
agent?: Prisma.XOR<Prisma.AgentScalarRelationFilter, Prisma.AgentWhereInput>
|
||||
user?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
|
||||
entries?: Prisma.AgentSessionEntryListRelationFilter
|
||||
comment?: Prisma.XOR<Prisma.AssetCommentNullableScalarRelationFilter, Prisma.AssetCommentWhereInput> | null
|
||||
}
|
||||
|
||||
export type AgentSessionOrderByWithRelationInput = {
|
||||
@@ -216,6 +217,7 @@ export type AgentSessionOrderByWithRelationInput = {
|
||||
agent?: Prisma.AgentOrderByWithRelationInput
|
||||
user?: Prisma.UserOrderByWithRelationInput
|
||||
entries?: Prisma.AgentSessionEntryOrderByRelationAggregateInput
|
||||
comment?: Prisma.AssetCommentOrderByWithRelationInput
|
||||
}
|
||||
|
||||
export type AgentSessionWhereUniqueInput = Prisma.AtLeast<{
|
||||
@@ -232,6 +234,7 @@ export type AgentSessionWhereUniqueInput = Prisma.AtLeast<{
|
||||
agent?: Prisma.XOR<Prisma.AgentScalarRelationFilter, Prisma.AgentWhereInput>
|
||||
user?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
|
||||
entries?: Prisma.AgentSessionEntryListRelationFilter
|
||||
comment?: Prisma.XOR<Prisma.AssetCommentNullableScalarRelationFilter, Prisma.AssetCommentWhereInput> | null
|
||||
}, "id">
|
||||
|
||||
export type AgentSessionOrderByWithAggregationInput = {
|
||||
@@ -269,6 +272,7 @@ export type AgentSessionCreateInput = {
|
||||
agent: Prisma.AgentCreateNestedOneWithoutAgentSessionsInput
|
||||
user?: Prisma.UserCreateNestedOneWithoutAgentSessionsInput
|
||||
entries?: Prisma.AgentSessionEntryCreateNestedManyWithoutSessionInput
|
||||
comment?: Prisma.AssetCommentCreateNestedOneWithoutSessionInput
|
||||
}
|
||||
|
||||
export type AgentSessionUncheckedCreateInput = {
|
||||
@@ -280,6 +284,7 @@ export type AgentSessionUncheckedCreateInput = {
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
entries?: Prisma.AgentSessionEntryUncheckedCreateNestedManyWithoutSessionInput
|
||||
comment?: Prisma.AssetCommentUncheckedCreateNestedOneWithoutSessionInput
|
||||
}
|
||||
|
||||
export type AgentSessionUpdateInput = {
|
||||
@@ -291,6 +296,7 @@ export type AgentSessionUpdateInput = {
|
||||
agent?: Prisma.AgentUpdateOneRequiredWithoutAgentSessionsNestedInput
|
||||
user?: Prisma.UserUpdateOneWithoutAgentSessionsNestedInput
|
||||
entries?: Prisma.AgentSessionEntryUpdateManyWithoutSessionNestedInput
|
||||
comment?: Prisma.AssetCommentUpdateOneWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type AgentSessionUncheckedUpdateInput = {
|
||||
@@ -302,6 +308,7 @@ export type AgentSessionUncheckedUpdateInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
entries?: Prisma.AgentSessionEntryUncheckedUpdateManyWithoutSessionNestedInput
|
||||
comment?: Prisma.AssetCommentUncheckedUpdateOneWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type AgentSessionCreateManyInput = {
|
||||
@@ -342,6 +349,11 @@ export type AgentSessionOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type AgentSessionNullableScalarRelationFilter = {
|
||||
is?: Prisma.AgentSessionWhereInput | null
|
||||
isNot?: Prisma.AgentSessionWhereInput | null
|
||||
}
|
||||
|
||||
export type AgentSessionCountOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
agentId?: Prisma.SortOrder
|
||||
@@ -419,6 +431,22 @@ export type AgentSessionUncheckedUpdateManyWithoutUserNestedInput = {
|
||||
deleteMany?: Prisma.AgentSessionScalarWhereInput | Prisma.AgentSessionScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type AgentSessionCreateNestedOneWithoutCommentInput = {
|
||||
create?: Prisma.XOR<Prisma.AgentSessionCreateWithoutCommentInput, Prisma.AgentSessionUncheckedCreateWithoutCommentInput>
|
||||
connectOrCreate?: Prisma.AgentSessionCreateOrConnectWithoutCommentInput
|
||||
connect?: Prisma.AgentSessionWhereUniqueInput
|
||||
}
|
||||
|
||||
export type AgentSessionUpdateOneWithoutCommentNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.AgentSessionCreateWithoutCommentInput, Prisma.AgentSessionUncheckedCreateWithoutCommentInput>
|
||||
connectOrCreate?: Prisma.AgentSessionCreateOrConnectWithoutCommentInput
|
||||
upsert?: Prisma.AgentSessionUpsertWithoutCommentInput
|
||||
disconnect?: Prisma.AgentSessionWhereInput | boolean
|
||||
delete?: Prisma.AgentSessionWhereInput | boolean
|
||||
connect?: Prisma.AgentSessionWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.AgentSessionUpdateToOneWithWhereWithoutCommentInput, Prisma.AgentSessionUpdateWithoutCommentInput>, Prisma.AgentSessionUncheckedUpdateWithoutCommentInput>
|
||||
}
|
||||
|
||||
export type AgentSessionCreateNestedManyWithoutAgentInput = {
|
||||
create?: Prisma.XOR<Prisma.AgentSessionCreateWithoutAgentInput, Prisma.AgentSessionUncheckedCreateWithoutAgentInput> | Prisma.AgentSessionCreateWithoutAgentInput[] | Prisma.AgentSessionUncheckedCreateWithoutAgentInput[]
|
||||
connectOrCreate?: Prisma.AgentSessionCreateOrConnectWithoutAgentInput | Prisma.AgentSessionCreateOrConnectWithoutAgentInput[]
|
||||
@@ -483,6 +511,7 @@ export type AgentSessionCreateWithoutUserInput = {
|
||||
updatedAt?: Date | string
|
||||
agent: Prisma.AgentCreateNestedOneWithoutAgentSessionsInput
|
||||
entries?: Prisma.AgentSessionEntryCreateNestedManyWithoutSessionInput
|
||||
comment?: Prisma.AssetCommentCreateNestedOneWithoutSessionInput
|
||||
}
|
||||
|
||||
export type AgentSessionUncheckedCreateWithoutUserInput = {
|
||||
@@ -493,6 +522,7 @@ export type AgentSessionUncheckedCreateWithoutUserInput = {
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
entries?: Prisma.AgentSessionEntryUncheckedCreateNestedManyWithoutSessionInput
|
||||
comment?: Prisma.AssetCommentUncheckedCreateNestedOneWithoutSessionInput
|
||||
}
|
||||
|
||||
export type AgentSessionCreateOrConnectWithoutUserInput = {
|
||||
@@ -534,6 +564,66 @@ export type AgentSessionScalarWhereInput = {
|
||||
updatedAt?: Prisma.DateTimeFilter<"AgentSession"> | Date | string
|
||||
}
|
||||
|
||||
export type AgentSessionCreateWithoutCommentInput = {
|
||||
id?: string
|
||||
cwd: string
|
||||
leafId?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
agent: Prisma.AgentCreateNestedOneWithoutAgentSessionsInput
|
||||
user?: Prisma.UserCreateNestedOneWithoutAgentSessionsInput
|
||||
entries?: Prisma.AgentSessionEntryCreateNestedManyWithoutSessionInput
|
||||
}
|
||||
|
||||
export type AgentSessionUncheckedCreateWithoutCommentInput = {
|
||||
id?: string
|
||||
agentId: string
|
||||
userId?: string | null
|
||||
cwd: string
|
||||
leafId?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
entries?: Prisma.AgentSessionEntryUncheckedCreateNestedManyWithoutSessionInput
|
||||
}
|
||||
|
||||
export type AgentSessionCreateOrConnectWithoutCommentInput = {
|
||||
where: Prisma.AgentSessionWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.AgentSessionCreateWithoutCommentInput, Prisma.AgentSessionUncheckedCreateWithoutCommentInput>
|
||||
}
|
||||
|
||||
export type AgentSessionUpsertWithoutCommentInput = {
|
||||
update: Prisma.XOR<Prisma.AgentSessionUpdateWithoutCommentInput, Prisma.AgentSessionUncheckedUpdateWithoutCommentInput>
|
||||
create: Prisma.XOR<Prisma.AgentSessionCreateWithoutCommentInput, Prisma.AgentSessionUncheckedCreateWithoutCommentInput>
|
||||
where?: Prisma.AgentSessionWhereInput
|
||||
}
|
||||
|
||||
export type AgentSessionUpdateToOneWithWhereWithoutCommentInput = {
|
||||
where?: Prisma.AgentSessionWhereInput
|
||||
data: Prisma.XOR<Prisma.AgentSessionUpdateWithoutCommentInput, Prisma.AgentSessionUncheckedUpdateWithoutCommentInput>
|
||||
}
|
||||
|
||||
export type AgentSessionUpdateWithoutCommentInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
cwd?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
leafId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
agent?: Prisma.AgentUpdateOneRequiredWithoutAgentSessionsNestedInput
|
||||
user?: Prisma.UserUpdateOneWithoutAgentSessionsNestedInput
|
||||
entries?: Prisma.AgentSessionEntryUpdateManyWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type AgentSessionUncheckedUpdateWithoutCommentInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
agentId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
cwd?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
leafId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
entries?: Prisma.AgentSessionEntryUncheckedUpdateManyWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type AgentSessionCreateWithoutAgentInput = {
|
||||
id?: string
|
||||
cwd: string
|
||||
@@ -542,6 +632,7 @@ export type AgentSessionCreateWithoutAgentInput = {
|
||||
updatedAt?: Date | string
|
||||
user?: Prisma.UserCreateNestedOneWithoutAgentSessionsInput
|
||||
entries?: Prisma.AgentSessionEntryCreateNestedManyWithoutSessionInput
|
||||
comment?: Prisma.AssetCommentCreateNestedOneWithoutSessionInput
|
||||
}
|
||||
|
||||
export type AgentSessionUncheckedCreateWithoutAgentInput = {
|
||||
@@ -552,6 +643,7 @@ export type AgentSessionUncheckedCreateWithoutAgentInput = {
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
entries?: Prisma.AgentSessionEntryUncheckedCreateNestedManyWithoutSessionInput
|
||||
comment?: Prisma.AssetCommentUncheckedCreateNestedOneWithoutSessionInput
|
||||
}
|
||||
|
||||
export type AgentSessionCreateOrConnectWithoutAgentInput = {
|
||||
@@ -588,6 +680,7 @@ export type AgentSessionCreateWithoutEntriesInput = {
|
||||
updatedAt?: Date | string
|
||||
agent: Prisma.AgentCreateNestedOneWithoutAgentSessionsInput
|
||||
user?: Prisma.UserCreateNestedOneWithoutAgentSessionsInput
|
||||
comment?: Prisma.AssetCommentCreateNestedOneWithoutSessionInput
|
||||
}
|
||||
|
||||
export type AgentSessionUncheckedCreateWithoutEntriesInput = {
|
||||
@@ -598,6 +691,7 @@ export type AgentSessionUncheckedCreateWithoutEntriesInput = {
|
||||
leafId?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
comment?: Prisma.AssetCommentUncheckedCreateNestedOneWithoutSessionInput
|
||||
}
|
||||
|
||||
export type AgentSessionCreateOrConnectWithoutEntriesInput = {
|
||||
@@ -624,6 +718,7 @@ export type AgentSessionUpdateWithoutEntriesInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
agent?: Prisma.AgentUpdateOneRequiredWithoutAgentSessionsNestedInput
|
||||
user?: Prisma.UserUpdateOneWithoutAgentSessionsNestedInput
|
||||
comment?: Prisma.AssetCommentUpdateOneWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type AgentSessionUncheckedUpdateWithoutEntriesInput = {
|
||||
@@ -634,6 +729,7 @@ export type AgentSessionUncheckedUpdateWithoutEntriesInput = {
|
||||
leafId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
comment?: Prisma.AssetCommentUncheckedUpdateOneWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type AgentSessionCreateManyUserInput = {
|
||||
@@ -653,6 +749,7 @@ export type AgentSessionUpdateWithoutUserInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
agent?: Prisma.AgentUpdateOneRequiredWithoutAgentSessionsNestedInput
|
||||
entries?: Prisma.AgentSessionEntryUpdateManyWithoutSessionNestedInput
|
||||
comment?: Prisma.AssetCommentUpdateOneWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type AgentSessionUncheckedUpdateWithoutUserInput = {
|
||||
@@ -663,6 +760,7 @@ export type AgentSessionUncheckedUpdateWithoutUserInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
entries?: Prisma.AgentSessionEntryUncheckedUpdateManyWithoutSessionNestedInput
|
||||
comment?: Prisma.AssetCommentUncheckedUpdateOneWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type AgentSessionUncheckedUpdateManyWithoutUserInput = {
|
||||
@@ -691,6 +789,7 @@ export type AgentSessionUpdateWithoutAgentInput = {
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
user?: Prisma.UserUpdateOneWithoutAgentSessionsNestedInput
|
||||
entries?: Prisma.AgentSessionEntryUpdateManyWithoutSessionNestedInput
|
||||
comment?: Prisma.AssetCommentUpdateOneWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type AgentSessionUncheckedUpdateWithoutAgentInput = {
|
||||
@@ -701,6 +800,7 @@ export type AgentSessionUncheckedUpdateWithoutAgentInput = {
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
entries?: Prisma.AgentSessionEntryUncheckedUpdateManyWithoutSessionNestedInput
|
||||
comment?: Prisma.AssetCommentUncheckedUpdateOneWithoutSessionNestedInput
|
||||
}
|
||||
|
||||
export type AgentSessionUncheckedUpdateManyWithoutAgentInput = {
|
||||
@@ -754,6 +854,7 @@ export type AgentSessionSelect<ExtArgs extends runtime.Types.Extensions.Internal
|
||||
agent?: boolean | Prisma.AgentDefaultArgs<ExtArgs>
|
||||
user?: boolean | Prisma.AgentSession$userArgs<ExtArgs>
|
||||
entries?: boolean | Prisma.AgentSession$entriesArgs<ExtArgs>
|
||||
comment?: boolean | Prisma.AgentSession$commentArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.AgentSessionCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["agentSession"]>
|
||||
|
||||
@@ -796,6 +897,7 @@ export type AgentSessionInclude<ExtArgs extends runtime.Types.Extensions.Interna
|
||||
agent?: boolean | Prisma.AgentDefaultArgs<ExtArgs>
|
||||
user?: boolean | Prisma.AgentSession$userArgs<ExtArgs>
|
||||
entries?: boolean | Prisma.AgentSession$entriesArgs<ExtArgs>
|
||||
comment?: boolean | Prisma.AgentSession$commentArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.AgentSessionCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type AgentSessionIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -813,6 +915,7 @@ export type $AgentSessionPayload<ExtArgs extends runtime.Types.Extensions.Intern
|
||||
agent: Prisma.$AgentPayload<ExtArgs>
|
||||
user: Prisma.$UserPayload<ExtArgs> | null
|
||||
entries: Prisma.$AgentSessionEntryPayload<ExtArgs>[]
|
||||
comment: Prisma.$AssetCommentPayload<ExtArgs> | null
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1219,6 +1322,7 @@ export interface Prisma__AgentSessionClient<T, Null = never, ExtArgs extends run
|
||||
agent<T extends Prisma.AgentDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AgentDefaultArgs<ExtArgs>>): Prisma.Prisma__AgentClient<runtime.Types.Result.GetResult<Prisma.$AgentPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
user<T extends Prisma.AgentSession$userArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AgentSession$userArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
entries<T extends Prisma.AgentSession$entriesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AgentSession$entriesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentSessionEntryPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
comment<T extends Prisma.AgentSession$commentArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AgentSession$commentArgs<ExtArgs>>): Prisma.Prisma__AssetCommentClient<runtime.Types.Result.GetResult<Prisma.$AssetCommentPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1698,6 +1802,25 @@ export type AgentSession$entriesArgs<ExtArgs extends runtime.Types.Extensions.In
|
||||
distinct?: Prisma.AgentSessionEntryScalarFieldEnum | Prisma.AgentSessionEntryScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* AgentSession.comment
|
||||
*/
|
||||
export type AgentSession$commentArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the AssetComment
|
||||
*/
|
||||
select?: Prisma.AssetCommentSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the AssetComment
|
||||
*/
|
||||
omit?: Prisma.AssetCommentOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.AssetCommentInclude<ExtArgs> | null
|
||||
where?: Prisma.AssetCommentWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* AgentSession without action
|
||||
*/
|
||||
|
||||
+190
-57
@@ -40,7 +40,7 @@ export type AssetCommentMinAggregateOutputType = {
|
||||
id: string | null
|
||||
message: string | null
|
||||
second: number | null
|
||||
isAi: boolean | null
|
||||
sessionId: string | null
|
||||
createdAt: Date | null
|
||||
updatedAt: Date | null
|
||||
assetId: string | null
|
||||
@@ -52,7 +52,7 @@ export type AssetCommentMaxAggregateOutputType = {
|
||||
id: string | null
|
||||
message: string | null
|
||||
second: number | null
|
||||
isAi: boolean | null
|
||||
sessionId: string | null
|
||||
createdAt: Date | null
|
||||
updatedAt: Date | null
|
||||
assetId: string | null
|
||||
@@ -65,7 +65,7 @@ export type AssetCommentCountAggregateOutputType = {
|
||||
message: number
|
||||
annotation:PrismaJson.AnnotationList
|
||||
second: number
|
||||
isAi: number
|
||||
sessionId: number
|
||||
createdAt: number
|
||||
updatedAt: number
|
||||
assetId: number
|
||||
@@ -87,7 +87,7 @@ export type AssetCommentMinAggregateInputType = {
|
||||
id?: true
|
||||
message?: true
|
||||
second?: true
|
||||
isAi?: true
|
||||
sessionId?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
assetId?: true
|
||||
@@ -99,7 +99,7 @@ export type AssetCommentMaxAggregateInputType = {
|
||||
id?: true
|
||||
message?: true
|
||||
second?: true
|
||||
isAi?: true
|
||||
sessionId?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
assetId?: true
|
||||
@@ -112,7 +112,7 @@ export type AssetCommentCountAggregateInputType = {
|
||||
message?: true
|
||||
annotation?: true
|
||||
second?: true
|
||||
isAi?: true
|
||||
sessionId?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
assetId?: true
|
||||
@@ -212,7 +212,7 @@ export type AssetCommentGroupByOutputType = {
|
||||
message: string | null
|
||||
annotation:PrismaJson.AnnotationList | null
|
||||
second: number | null
|
||||
isAi: boolean
|
||||
sessionId: string | null
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
assetId: string
|
||||
@@ -248,12 +248,13 @@ export type AssetCommentWhereInput = {
|
||||
message?: Prisma.StringNullableFilter<"AssetComment"> | string | null
|
||||
annotation?: Prisma.JsonNullableFilter<"AssetComment">
|
||||
second?: Prisma.FloatNullableFilter<"AssetComment"> | number | null
|
||||
isAi?: Prisma.BoolFilter<"AssetComment"> | boolean
|
||||
sessionId?: Prisma.StringNullableFilter<"AssetComment"> | string | null
|
||||
createdAt?: Prisma.DateTimeFilter<"AssetComment"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"AssetComment"> | Date | string
|
||||
assetId?: Prisma.StringFilter<"AssetComment"> | string
|
||||
creatorId?: Prisma.StringNullableFilter<"AssetComment"> | string | null
|
||||
replyToId?: Prisma.StringNullableFilter<"AssetComment"> | string | null
|
||||
session?: Prisma.XOR<Prisma.AgentSessionNullableScalarRelationFilter, Prisma.AgentSessionWhereInput> | null
|
||||
asset?: Prisma.XOR<Prisma.AssetScalarRelationFilter, Prisma.AssetWhereInput>
|
||||
creator?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
|
||||
replyTo?: Prisma.XOR<Prisma.AssetCommentNullableScalarRelationFilter, Prisma.AssetCommentWhereInput> | null
|
||||
@@ -266,12 +267,13 @@ export type AssetCommentOrderByWithRelationInput = {
|
||||
message?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
annotation?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
second?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
isAi?: Prisma.SortOrder
|
||||
sessionId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
assetId?: Prisma.SortOrder
|
||||
creatorId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
replyToId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
session?: Prisma.AgentSessionOrderByWithRelationInput
|
||||
asset?: Prisma.AssetOrderByWithRelationInput
|
||||
creator?: Prisma.UserOrderByWithRelationInput
|
||||
replyTo?: Prisma.AssetCommentOrderByWithRelationInput
|
||||
@@ -281,31 +283,32 @@ export type AssetCommentOrderByWithRelationInput = {
|
||||
|
||||
export type AssetCommentWhereUniqueInput = Prisma.AtLeast<{
|
||||
id?: string
|
||||
sessionId?: string
|
||||
AND?: Prisma.AssetCommentWhereInput | Prisma.AssetCommentWhereInput[]
|
||||
OR?: Prisma.AssetCommentWhereInput[]
|
||||
NOT?: Prisma.AssetCommentWhereInput | Prisma.AssetCommentWhereInput[]
|
||||
message?: Prisma.StringNullableFilter<"AssetComment"> | string | null
|
||||
annotation?: Prisma.JsonNullableFilter<"AssetComment">
|
||||
second?: Prisma.FloatNullableFilter<"AssetComment"> | number | null
|
||||
isAi?: Prisma.BoolFilter<"AssetComment"> | boolean
|
||||
createdAt?: Prisma.DateTimeFilter<"AssetComment"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"AssetComment"> | Date | string
|
||||
assetId?: Prisma.StringFilter<"AssetComment"> | string
|
||||
creatorId?: Prisma.StringNullableFilter<"AssetComment"> | string | null
|
||||
replyToId?: Prisma.StringNullableFilter<"AssetComment"> | string | null
|
||||
session?: Prisma.XOR<Prisma.AgentSessionNullableScalarRelationFilter, Prisma.AgentSessionWhereInput> | null
|
||||
asset?: Prisma.XOR<Prisma.AssetScalarRelationFilter, Prisma.AssetWhereInput>
|
||||
creator?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
|
||||
replyTo?: Prisma.XOR<Prisma.AssetCommentNullableScalarRelationFilter, Prisma.AssetCommentWhereInput> | null
|
||||
replies?: Prisma.AssetCommentListRelationFilter
|
||||
attachments?: Prisma.AssetCommentAttachmentListRelationFilter
|
||||
}, "id">
|
||||
}, "id" | "sessionId">
|
||||
|
||||
export type AssetCommentOrderByWithAggregationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
message?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
annotation?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
second?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
isAi?: Prisma.SortOrder
|
||||
sessionId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
assetId?: Prisma.SortOrder
|
||||
@@ -326,7 +329,7 @@ export type AssetCommentScalarWhereWithAggregatesInput = {
|
||||
message?: Prisma.StringNullableWithAggregatesFilter<"AssetComment"> | string | null
|
||||
annotation?: Prisma.JsonNullableWithAggregatesFilter<"AssetComment">
|
||||
second?: Prisma.FloatNullableWithAggregatesFilter<"AssetComment"> | number | null
|
||||
isAi?: Prisma.BoolWithAggregatesFilter<"AssetComment"> | boolean
|
||||
sessionId?: Prisma.StringNullableWithAggregatesFilter<"AssetComment"> | string | null
|
||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"AssetComment"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"AssetComment"> | Date | string
|
||||
assetId?: Prisma.StringWithAggregatesFilter<"AssetComment"> | string
|
||||
@@ -339,9 +342,9 @@ export type AssetCommentCreateInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentInput
|
||||
asset: Prisma.AssetCreateNestedOneWithoutCommentsInput
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCommentsInput
|
||||
replyTo?: Prisma.AssetCommentCreateNestedOneWithoutRepliesInput
|
||||
@@ -354,7 +357,7 @@ export type AssetCommentUncheckedCreateInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
sessionId?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
assetId: string
|
||||
@@ -369,9 +372,9 @@ export type AssetCommentUpdateInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
session?: Prisma.AgentSessionUpdateOneWithoutCommentNestedInput
|
||||
asset?: Prisma.AssetUpdateOneRequiredWithoutCommentsNestedInput
|
||||
creator?: Prisma.UserUpdateOneWithoutCommentsNestedInput
|
||||
replyTo?: Prisma.AssetCommentUpdateOneWithoutRepliesNestedInput
|
||||
@@ -384,7 +387,7 @@ export type AssetCommentUncheckedUpdateInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
sessionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
assetId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
@@ -399,7 +402,7 @@ export type AssetCommentCreateManyInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
sessionId?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
assetId: string
|
||||
@@ -412,7 +415,6 @@ export type AssetCommentUpdateManyMutationInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
}
|
||||
@@ -422,7 +424,7 @@ export type AssetCommentUncheckedUpdateManyInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
sessionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
assetId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
@@ -450,7 +452,7 @@ export type AssetCommentCountOrderByAggregateInput = {
|
||||
message?: Prisma.SortOrder
|
||||
annotation?: Prisma.SortOrder
|
||||
second?: Prisma.SortOrder
|
||||
isAi?: Prisma.SortOrder
|
||||
sessionId?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
assetId?: Prisma.SortOrder
|
||||
@@ -466,7 +468,7 @@ export type AssetCommentMaxOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
message?: Prisma.SortOrder
|
||||
second?: Prisma.SortOrder
|
||||
isAi?: Prisma.SortOrder
|
||||
sessionId?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
assetId?: Prisma.SortOrder
|
||||
@@ -478,7 +480,7 @@ export type AssetCommentMinOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
message?: Prisma.SortOrder
|
||||
second?: Prisma.SortOrder
|
||||
isAi?: Prisma.SortOrder
|
||||
sessionId?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
assetId?: Prisma.SortOrder
|
||||
@@ -651,14 +653,46 @@ export type AssetCommentUpdateOneRequiredWithoutAttachmentsNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.AssetCommentUpdateToOneWithWhereWithoutAttachmentsInput, Prisma.AssetCommentUpdateWithoutAttachmentsInput>, Prisma.AssetCommentUncheckedUpdateWithoutAttachmentsInput>
|
||||
}
|
||||
|
||||
export type AssetCommentCreateNestedOneWithoutSessionInput = {
|
||||
create?: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput>
|
||||
connectOrCreate?: Prisma.AssetCommentCreateOrConnectWithoutSessionInput
|
||||
connect?: Prisma.AssetCommentWhereUniqueInput
|
||||
}
|
||||
|
||||
export type AssetCommentUncheckedCreateNestedOneWithoutSessionInput = {
|
||||
create?: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput>
|
||||
connectOrCreate?: Prisma.AssetCommentCreateOrConnectWithoutSessionInput
|
||||
connect?: Prisma.AssetCommentWhereUniqueInput
|
||||
}
|
||||
|
||||
export type AssetCommentUpdateOneWithoutSessionNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput>
|
||||
connectOrCreate?: Prisma.AssetCommentCreateOrConnectWithoutSessionInput
|
||||
upsert?: Prisma.AssetCommentUpsertWithoutSessionInput
|
||||
disconnect?: Prisma.AssetCommentWhereInput | boolean
|
||||
delete?: Prisma.AssetCommentWhereInput | boolean
|
||||
connect?: Prisma.AssetCommentWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.AssetCommentUpdateToOneWithWhereWithoutSessionInput, Prisma.AssetCommentUpdateWithoutSessionInput>, Prisma.AssetCommentUncheckedUpdateWithoutSessionInput>
|
||||
}
|
||||
|
||||
export type AssetCommentUncheckedUpdateOneWithoutSessionNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput>
|
||||
connectOrCreate?: Prisma.AssetCommentCreateOrConnectWithoutSessionInput
|
||||
upsert?: Prisma.AssetCommentUpsertWithoutSessionInput
|
||||
disconnect?: Prisma.AssetCommentWhereInput | boolean
|
||||
delete?: Prisma.AssetCommentWhereInput | boolean
|
||||
connect?: Prisma.AssetCommentWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.AssetCommentUpdateToOneWithWhereWithoutSessionInput, Prisma.AssetCommentUpdateWithoutSessionInput>, Prisma.AssetCommentUncheckedUpdateWithoutSessionInput>
|
||||
}
|
||||
|
||||
export type AssetCommentCreateWithoutCreatorInput = {
|
||||
id?: string
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentInput
|
||||
asset: Prisma.AssetCreateNestedOneWithoutCommentsInput
|
||||
replyTo?: Prisma.AssetCommentCreateNestedOneWithoutRepliesInput
|
||||
replies?: Prisma.AssetCommentCreateNestedManyWithoutReplyToInput
|
||||
@@ -670,7 +704,7 @@ export type AssetCommentUncheckedCreateWithoutCreatorInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
sessionId?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
assetId: string
|
||||
@@ -713,7 +747,7 @@ export type AssetCommentScalarWhereInput = {
|
||||
message?: Prisma.StringNullableFilter<"AssetComment"> | string | null
|
||||
annotation?: Prisma.JsonNullableFilter<"AssetComment">
|
||||
second?: Prisma.FloatNullableFilter<"AssetComment"> | number | null
|
||||
isAi?: Prisma.BoolFilter<"AssetComment"> | boolean
|
||||
sessionId?: Prisma.StringNullableFilter<"AssetComment"> | string | null
|
||||
createdAt?: Prisma.DateTimeFilter<"AssetComment"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"AssetComment"> | Date | string
|
||||
assetId?: Prisma.StringFilter<"AssetComment"> | string
|
||||
@@ -726,9 +760,9 @@ export type AssetCommentCreateWithoutAssetInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentInput
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCommentsInput
|
||||
replyTo?: Prisma.AssetCommentCreateNestedOneWithoutRepliesInput
|
||||
replies?: Prisma.AssetCommentCreateNestedManyWithoutReplyToInput
|
||||
@@ -740,7 +774,7 @@ export type AssetCommentUncheckedCreateWithoutAssetInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
sessionId?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
creatorId?: string | null
|
||||
@@ -780,9 +814,9 @@ export type AssetCommentCreateWithoutRepliesInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentInput
|
||||
asset: Prisma.AssetCreateNestedOneWithoutCommentsInput
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCommentsInput
|
||||
replyTo?: Prisma.AssetCommentCreateNestedOneWithoutRepliesInput
|
||||
@@ -794,7 +828,7 @@ export type AssetCommentUncheckedCreateWithoutRepliesInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
sessionId?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
assetId: string
|
||||
@@ -813,9 +847,9 @@ export type AssetCommentCreateWithoutReplyToInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentInput
|
||||
asset: Prisma.AssetCreateNestedOneWithoutCommentsInput
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCommentsInput
|
||||
replies?: Prisma.AssetCommentCreateNestedManyWithoutReplyToInput
|
||||
@@ -827,7 +861,7 @@ export type AssetCommentUncheckedCreateWithoutReplyToInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
sessionId?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
assetId: string
|
||||
@@ -862,9 +896,9 @@ export type AssetCommentUpdateWithoutRepliesInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
session?: Prisma.AgentSessionUpdateOneWithoutCommentNestedInput
|
||||
asset?: Prisma.AssetUpdateOneRequiredWithoutCommentsNestedInput
|
||||
creator?: Prisma.UserUpdateOneWithoutCommentsNestedInput
|
||||
replyTo?: Prisma.AssetCommentUpdateOneWithoutRepliesNestedInput
|
||||
@@ -876,7 +910,7 @@ export type AssetCommentUncheckedUpdateWithoutRepliesInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
sessionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
assetId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
@@ -906,9 +940,9 @@ export type AssetCommentCreateWithoutAttachmentsInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentInput
|
||||
asset: Prisma.AssetCreateNestedOneWithoutCommentsInput
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCommentsInput
|
||||
replyTo?: Prisma.AssetCommentCreateNestedOneWithoutRepliesInput
|
||||
@@ -920,7 +954,7 @@ export type AssetCommentUncheckedCreateWithoutAttachmentsInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
sessionId?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
assetId: string
|
||||
@@ -950,9 +984,9 @@ export type AssetCommentUpdateWithoutAttachmentsInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
session?: Prisma.AgentSessionUpdateOneWithoutCommentNestedInput
|
||||
asset?: Prisma.AssetUpdateOneRequiredWithoutCommentsNestedInput
|
||||
creator?: Prisma.UserUpdateOneWithoutCommentsNestedInput
|
||||
replyTo?: Prisma.AssetCommentUpdateOneWithoutRepliesNestedInput
|
||||
@@ -964,7 +998,7 @@ export type AssetCommentUncheckedUpdateWithoutAttachmentsInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
sessionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
assetId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
@@ -973,12 +1007,84 @@ export type AssetCommentUncheckedUpdateWithoutAttachmentsInput = {
|
||||
replies?: Prisma.AssetCommentUncheckedUpdateManyWithoutReplyToNestedInput
|
||||
}
|
||||
|
||||
export type AssetCommentCreateWithoutSessionInput = {
|
||||
id?: string
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
asset: Prisma.AssetCreateNestedOneWithoutCommentsInput
|
||||
creator?: Prisma.UserCreateNestedOneWithoutCommentsInput
|
||||
replyTo?: Prisma.AssetCommentCreateNestedOneWithoutRepliesInput
|
||||
replies?: Prisma.AssetCommentCreateNestedManyWithoutReplyToInput
|
||||
attachments?: Prisma.AssetCommentAttachmentCreateNestedManyWithoutCommentInput
|
||||
}
|
||||
|
||||
export type AssetCommentUncheckedCreateWithoutSessionInput = {
|
||||
id?: string
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
assetId: string
|
||||
creatorId?: string | null
|
||||
replyToId?: string | null
|
||||
replies?: Prisma.AssetCommentUncheckedCreateNestedManyWithoutReplyToInput
|
||||
attachments?: Prisma.AssetCommentAttachmentUncheckedCreateNestedManyWithoutCommentInput
|
||||
}
|
||||
|
||||
export type AssetCommentCreateOrConnectWithoutSessionInput = {
|
||||
where: Prisma.AssetCommentWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput>
|
||||
}
|
||||
|
||||
export type AssetCommentUpsertWithoutSessionInput = {
|
||||
update: Prisma.XOR<Prisma.AssetCommentUpdateWithoutSessionInput, Prisma.AssetCommentUncheckedUpdateWithoutSessionInput>
|
||||
create: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput>
|
||||
where?: Prisma.AssetCommentWhereInput
|
||||
}
|
||||
|
||||
export type AssetCommentUpdateToOneWithWhereWithoutSessionInput = {
|
||||
where?: Prisma.AssetCommentWhereInput
|
||||
data: Prisma.XOR<Prisma.AssetCommentUpdateWithoutSessionInput, Prisma.AssetCommentUncheckedUpdateWithoutSessionInput>
|
||||
}
|
||||
|
||||
export type AssetCommentUpdateWithoutSessionInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
asset?: Prisma.AssetUpdateOneRequiredWithoutCommentsNestedInput
|
||||
creator?: Prisma.UserUpdateOneWithoutCommentsNestedInput
|
||||
replyTo?: Prisma.AssetCommentUpdateOneWithoutRepliesNestedInput
|
||||
replies?: Prisma.AssetCommentUpdateManyWithoutReplyToNestedInput
|
||||
attachments?: Prisma.AssetCommentAttachmentUpdateManyWithoutCommentNestedInput
|
||||
}
|
||||
|
||||
export type AssetCommentUncheckedUpdateWithoutSessionInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
assetId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
replyToId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
replies?: Prisma.AssetCommentUncheckedUpdateManyWithoutReplyToNestedInput
|
||||
attachments?: Prisma.AssetCommentAttachmentUncheckedUpdateManyWithoutCommentNestedInput
|
||||
}
|
||||
|
||||
export type AssetCommentCreateManyCreatorInput = {
|
||||
id?: string
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
sessionId?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
assetId: string
|
||||
@@ -990,9 +1096,9 @@ export type AssetCommentUpdateWithoutCreatorInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
session?: Prisma.AgentSessionUpdateOneWithoutCommentNestedInput
|
||||
asset?: Prisma.AssetUpdateOneRequiredWithoutCommentsNestedInput
|
||||
replyTo?: Prisma.AssetCommentUpdateOneWithoutRepliesNestedInput
|
||||
replies?: Prisma.AssetCommentUpdateManyWithoutReplyToNestedInput
|
||||
@@ -1004,7 +1110,7 @@ export type AssetCommentUncheckedUpdateWithoutCreatorInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
sessionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
assetId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
@@ -1018,7 +1124,7 @@ export type AssetCommentUncheckedUpdateManyWithoutCreatorInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
sessionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
assetId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
@@ -1030,7 +1136,7 @@ export type AssetCommentCreateManyAssetInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
sessionId?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
creatorId?: string | null
|
||||
@@ -1042,9 +1148,9 @@ export type AssetCommentUpdateWithoutAssetInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
session?: Prisma.AgentSessionUpdateOneWithoutCommentNestedInput
|
||||
creator?: Prisma.UserUpdateOneWithoutCommentsNestedInput
|
||||
replyTo?: Prisma.AssetCommentUpdateOneWithoutRepliesNestedInput
|
||||
replies?: Prisma.AssetCommentUpdateManyWithoutReplyToNestedInput
|
||||
@@ -1056,7 +1162,7 @@ export type AssetCommentUncheckedUpdateWithoutAssetInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
sessionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -1070,7 +1176,7 @@ export type AssetCommentUncheckedUpdateManyWithoutAssetInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
sessionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -1082,7 +1188,7 @@ export type AssetCommentCreateManyReplyToInput = {
|
||||
message?: string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: number | null
|
||||
isAi?: boolean
|
||||
sessionId?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
assetId: string
|
||||
@@ -1094,9 +1200,9 @@ export type AssetCommentUpdateWithoutReplyToInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
session?: Prisma.AgentSessionUpdateOneWithoutCommentNestedInput
|
||||
asset?: Prisma.AssetUpdateOneRequiredWithoutCommentsNestedInput
|
||||
creator?: Prisma.UserUpdateOneWithoutCommentsNestedInput
|
||||
replies?: Prisma.AssetCommentUpdateManyWithoutReplyToNestedInput
|
||||
@@ -1108,7 +1214,7 @@ export type AssetCommentUncheckedUpdateWithoutReplyToInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
sessionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
assetId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
@@ -1122,7 +1228,7 @@ export type AssetCommentUncheckedUpdateManyWithoutReplyToInput = {
|
||||
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
|
||||
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
|
||||
isAi?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
sessionId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
assetId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
@@ -1174,12 +1280,13 @@ export type AssetCommentSelect<ExtArgs extends runtime.Types.Extensions.Internal
|
||||
message?: boolean
|
||||
annotation?: boolean
|
||||
second?: boolean
|
||||
isAi?: boolean
|
||||
sessionId?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
assetId?: boolean
|
||||
creatorId?: boolean
|
||||
replyToId?: boolean
|
||||
session?: boolean | Prisma.AssetComment$sessionArgs<ExtArgs>
|
||||
asset?: boolean | Prisma.AssetDefaultArgs<ExtArgs>
|
||||
creator?: boolean | Prisma.AssetComment$creatorArgs<ExtArgs>
|
||||
replyTo?: boolean | Prisma.AssetComment$replyToArgs<ExtArgs>
|
||||
@@ -1193,12 +1300,13 @@ export type AssetCommentSelectCreateManyAndReturn<ExtArgs extends runtime.Types.
|
||||
message?: boolean
|
||||
annotation?: boolean
|
||||
second?: boolean
|
||||
isAi?: boolean
|
||||
sessionId?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
assetId?: boolean
|
||||
creatorId?: boolean
|
||||
replyToId?: boolean
|
||||
session?: boolean | Prisma.AssetComment$sessionArgs<ExtArgs>
|
||||
asset?: boolean | Prisma.AssetDefaultArgs<ExtArgs>
|
||||
creator?: boolean | Prisma.AssetComment$creatorArgs<ExtArgs>
|
||||
replyTo?: boolean | Prisma.AssetComment$replyToArgs<ExtArgs>
|
||||
@@ -1209,12 +1317,13 @@ export type AssetCommentSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.
|
||||
message?: boolean
|
||||
annotation?: boolean
|
||||
second?: boolean
|
||||
isAi?: boolean
|
||||
sessionId?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
assetId?: boolean
|
||||
creatorId?: boolean
|
||||
replyToId?: boolean
|
||||
session?: boolean | Prisma.AssetComment$sessionArgs<ExtArgs>
|
||||
asset?: boolean | Prisma.AssetDefaultArgs<ExtArgs>
|
||||
creator?: boolean | Prisma.AssetComment$creatorArgs<ExtArgs>
|
||||
replyTo?: boolean | Prisma.AssetComment$replyToArgs<ExtArgs>
|
||||
@@ -1225,7 +1334,7 @@ export type AssetCommentSelectScalar = {
|
||||
message?: boolean
|
||||
annotation?: boolean
|
||||
second?: boolean
|
||||
isAi?: boolean
|
||||
sessionId?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
assetId?: boolean
|
||||
@@ -1233,8 +1342,9 @@ export type AssetCommentSelectScalar = {
|
||||
replyToId?: boolean
|
||||
}
|
||||
|
||||
export type AssetCommentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "message" | "annotation" | "second" | "isAi" | "createdAt" | "updatedAt" | "assetId" | "creatorId" | "replyToId", ExtArgs["result"]["assetComment"]>
|
||||
export type AssetCommentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "message" | "annotation" | "second" | "sessionId" | "createdAt" | "updatedAt" | "assetId" | "creatorId" | "replyToId", ExtArgs["result"]["assetComment"]>
|
||||
export type AssetCommentInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
session?: boolean | Prisma.AssetComment$sessionArgs<ExtArgs>
|
||||
asset?: boolean | Prisma.AssetDefaultArgs<ExtArgs>
|
||||
creator?: boolean | Prisma.AssetComment$creatorArgs<ExtArgs>
|
||||
replyTo?: boolean | Prisma.AssetComment$replyToArgs<ExtArgs>
|
||||
@@ -1243,11 +1353,13 @@ export type AssetCommentInclude<ExtArgs extends runtime.Types.Extensions.Interna
|
||||
_count?: boolean | Prisma.AssetCommentCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type AssetCommentIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
session?: boolean | Prisma.AssetComment$sessionArgs<ExtArgs>
|
||||
asset?: boolean | Prisma.AssetDefaultArgs<ExtArgs>
|
||||
creator?: boolean | Prisma.AssetComment$creatorArgs<ExtArgs>
|
||||
replyTo?: boolean | Prisma.AssetComment$replyToArgs<ExtArgs>
|
||||
}
|
||||
export type AssetCommentIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
session?: boolean | Prisma.AssetComment$sessionArgs<ExtArgs>
|
||||
asset?: boolean | Prisma.AssetDefaultArgs<ExtArgs>
|
||||
creator?: boolean | Prisma.AssetComment$creatorArgs<ExtArgs>
|
||||
replyTo?: boolean | Prisma.AssetComment$replyToArgs<ExtArgs>
|
||||
@@ -1256,6 +1368,7 @@ export type AssetCommentIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types
|
||||
export type $AssetCommentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "AssetComment"
|
||||
objects: {
|
||||
session: Prisma.$AgentSessionPayload<ExtArgs> | null
|
||||
asset: Prisma.$AssetPayload<ExtArgs>
|
||||
creator: Prisma.$UserPayload<ExtArgs> | null
|
||||
replyTo: Prisma.$AssetCommentPayload<ExtArgs> | null
|
||||
@@ -1270,7 +1383,7 @@ export type $AssetCommentPayload<ExtArgs extends runtime.Types.Extensions.Intern
|
||||
*/
|
||||
annotation:PrismaJson.AnnotationList | null
|
||||
second: number | null
|
||||
isAi: boolean
|
||||
sessionId: string | null
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
assetId: string
|
||||
@@ -1670,6 +1783,7 @@ readonly fields: AssetCommentFieldRefs;
|
||||
*/
|
||||
export interface Prisma__AssetCommentClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
session<T extends Prisma.AssetComment$sessionArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AssetComment$sessionArgs<ExtArgs>>): Prisma.Prisma__AgentSessionClient<runtime.Types.Result.GetResult<Prisma.$AgentSessionPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
asset<T extends Prisma.AssetDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AssetDefaultArgs<ExtArgs>>): Prisma.Prisma__AssetClient<runtime.Types.Result.GetResult<Prisma.$AssetPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
creator<T extends Prisma.AssetComment$creatorArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AssetComment$creatorArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
replyTo<T extends Prisma.AssetComment$replyToArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AssetComment$replyToArgs<ExtArgs>>): Prisma.Prisma__AssetCommentClient<runtime.Types.Result.GetResult<Prisma.$AssetCommentPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
@@ -1708,7 +1822,7 @@ export interface AssetCommentFieldRefs {
|
||||
readonly message: Prisma.FieldRef<"AssetComment", 'String'>
|
||||
readonly annotation: Prisma.FieldRef<"AssetComment", 'Json'>
|
||||
readonly second: Prisma.FieldRef<"AssetComment", 'Float'>
|
||||
readonly isAi: Prisma.FieldRef<"AssetComment", 'Boolean'>
|
||||
readonly sessionId: Prisma.FieldRef<"AssetComment", 'String'>
|
||||
readonly createdAt: Prisma.FieldRef<"AssetComment", 'DateTime'>
|
||||
readonly updatedAt: Prisma.FieldRef<"AssetComment", 'DateTime'>
|
||||
readonly assetId: Prisma.FieldRef<"AssetComment", 'String'>
|
||||
@@ -2114,6 +2228,25 @@ export type AssetCommentDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* AssetComment.session
|
||||
*/
|
||||
export type AssetComment$sessionArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the AgentSession
|
||||
*/
|
||||
select?: Prisma.AgentSessionSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the AgentSession
|
||||
*/
|
||||
omit?: Prisma.AgentSessionOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.AgentSessionInclude<ExtArgs> | null
|
||||
where?: Prisma.AgentSessionWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* AssetComment.creator
|
||||
*/
|
||||
|
||||
Generated
+186
@@ -198,6 +198,7 @@ export type TeamWhereInput = {
|
||||
providers?: Prisma.ProviderListRelationFilter
|
||||
skills?: Prisma.SkillListRelationFilter
|
||||
sandbox?: Prisma.XOR<Prisma.SandboxNullableScalarRelationFilter, Prisma.SandboxWhereInput> | null
|
||||
agents?: Prisma.AgentListRelationFilter
|
||||
}
|
||||
|
||||
export type TeamOrderByWithRelationInput = {
|
||||
@@ -217,6 +218,7 @@ export type TeamOrderByWithRelationInput = {
|
||||
providers?: Prisma.ProviderOrderByRelationAggregateInput
|
||||
skills?: Prisma.SkillOrderByRelationAggregateInput
|
||||
sandbox?: Prisma.SandboxOrderByWithRelationInput
|
||||
agents?: Prisma.AgentOrderByRelationAggregateInput
|
||||
}
|
||||
|
||||
export type TeamWhereUniqueInput = Prisma.AtLeast<{
|
||||
@@ -239,6 +241,7 @@ export type TeamWhereUniqueInput = Prisma.AtLeast<{
|
||||
providers?: Prisma.ProviderListRelationFilter
|
||||
skills?: Prisma.SkillListRelationFilter
|
||||
sandbox?: Prisma.XOR<Prisma.SandboxNullableScalarRelationFilter, Prisma.SandboxWhereInput> | null
|
||||
agents?: Prisma.AgentListRelationFilter
|
||||
}, "id" | "rootFolderId">
|
||||
|
||||
export type TeamOrderByWithAggregationInput = {
|
||||
@@ -281,6 +284,7 @@ export type TeamCreateInput = {
|
||||
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateInput = {
|
||||
@@ -299,6 +303,7 @@ export type TeamUncheckedCreateInput = {
|
||||
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUpdateInput = {
|
||||
@@ -317,6 +322,7 @@ export type TeamUpdateInput = {
|
||||
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateInput = {
|
||||
@@ -335,6 +341,7 @@ export type TeamUncheckedUpdateInput = {
|
||||
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateManyInput = {
|
||||
@@ -530,6 +537,20 @@ export type TeamUpdateOneRequiredWithoutNotificationsNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.TeamUpdateToOneWithWhereWithoutNotificationsInput, Prisma.TeamUpdateWithoutNotificationsInput>, Prisma.TeamUncheckedUpdateWithoutNotificationsInput>
|
||||
}
|
||||
|
||||
export type TeamCreateNestedOneWithoutAgentsInput = {
|
||||
create?: Prisma.XOR<Prisma.TeamCreateWithoutAgentsInput, Prisma.TeamUncheckedCreateWithoutAgentsInput>
|
||||
connectOrCreate?: Prisma.TeamCreateOrConnectWithoutAgentsInput
|
||||
connect?: Prisma.TeamWhereUniqueInput
|
||||
}
|
||||
|
||||
export type TeamUpdateOneRequiredWithoutAgentsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.TeamCreateWithoutAgentsInput, Prisma.TeamUncheckedCreateWithoutAgentsInput>
|
||||
connectOrCreate?: Prisma.TeamCreateOrConnectWithoutAgentsInput
|
||||
upsert?: Prisma.TeamUpsertWithoutAgentsInput
|
||||
connect?: Prisma.TeamWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.TeamUpdateToOneWithWhereWithoutAgentsInput, Prisma.TeamUpdateWithoutAgentsInput>, Prisma.TeamUncheckedUpdateWithoutAgentsInput>
|
||||
}
|
||||
|
||||
export type TeamCreateNestedOneWithoutUserMetadataInput = {
|
||||
create?: Prisma.XOR<Prisma.TeamCreateWithoutUserMetadataInput, Prisma.TeamUncheckedCreateWithoutUserMetadataInput>
|
||||
connectOrCreate?: Prisma.TeamCreateOrConnectWithoutUserMetadataInput
|
||||
@@ -573,6 +594,7 @@ export type TeamCreateWithoutSandboxInput = {
|
||||
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
|
||||
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
|
||||
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutSandboxInput = {
|
||||
@@ -590,6 +612,7 @@ export type TeamUncheckedCreateWithoutSandboxInput = {
|
||||
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
|
||||
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
|
||||
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutSandboxInput = {
|
||||
@@ -623,6 +646,7 @@ export type TeamUpdateWithoutSandboxInput = {
|
||||
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
|
||||
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutSandboxInput = {
|
||||
@@ -640,6 +664,7 @@ export type TeamUncheckedUpdateWithoutSandboxInput = {
|
||||
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
|
||||
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutSkillsInput = {
|
||||
@@ -657,6 +682,7 @@ export type TeamCreateWithoutSkillsInput = {
|
||||
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
|
||||
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutSkillsInput = {
|
||||
@@ -674,6 +700,7 @@ export type TeamUncheckedCreateWithoutSkillsInput = {
|
||||
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
|
||||
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutSkillsInput = {
|
||||
@@ -707,6 +734,7 @@ export type TeamUpdateWithoutSkillsInput = {
|
||||
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
|
||||
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutSkillsInput = {
|
||||
@@ -724,6 +752,7 @@ export type TeamUncheckedUpdateWithoutSkillsInput = {
|
||||
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
|
||||
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutMembersInput = {
|
||||
@@ -741,6 +770,7 @@ export type TeamCreateWithoutMembersInput = {
|
||||
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutMembersInput = {
|
||||
@@ -758,6 +788,7 @@ export type TeamUncheckedCreateWithoutMembersInput = {
|
||||
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutMembersInput = {
|
||||
@@ -791,6 +822,7 @@ export type TeamUpdateWithoutMembersInput = {
|
||||
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutMembersInput = {
|
||||
@@ -808,6 +840,7 @@ export type TeamUncheckedUpdateWithoutMembersInput = {
|
||||
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutProjectsInput = {
|
||||
@@ -825,6 +858,7 @@ export type TeamCreateWithoutProjectsInput = {
|
||||
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutProjectsInput = {
|
||||
@@ -842,6 +876,7 @@ export type TeamUncheckedCreateWithoutProjectsInput = {
|
||||
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutProjectsInput = {
|
||||
@@ -875,6 +910,7 @@ export type TeamUpdateWithoutProjectsInput = {
|
||||
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutProjectsInput = {
|
||||
@@ -892,6 +928,7 @@ export type TeamUncheckedUpdateWithoutProjectsInput = {
|
||||
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutRootFolderInput = {
|
||||
@@ -909,6 +946,7 @@ export type TeamCreateWithoutRootFolderInput = {
|
||||
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutRootFolderInput = {
|
||||
@@ -926,6 +964,7 @@ export type TeamUncheckedCreateWithoutRootFolderInput = {
|
||||
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutRootFolderInput = {
|
||||
@@ -959,6 +998,7 @@ export type TeamUpdateWithoutRootFolderInput = {
|
||||
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutRootFolderInput = {
|
||||
@@ -976,6 +1016,7 @@ export type TeamUncheckedUpdateWithoutRootFolderInput = {
|
||||
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutInvitesInput = {
|
||||
@@ -993,6 +1034,7 @@ export type TeamCreateWithoutInvitesInput = {
|
||||
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutInvitesInput = {
|
||||
@@ -1010,6 +1052,7 @@ export type TeamUncheckedCreateWithoutInvitesInput = {
|
||||
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutInvitesInput = {
|
||||
@@ -1043,6 +1086,7 @@ export type TeamUpdateWithoutInvitesInput = {
|
||||
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutInvitesInput = {
|
||||
@@ -1060,6 +1104,7 @@ export type TeamUncheckedUpdateWithoutInvitesInput = {
|
||||
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutMetadataFieldsInput = {
|
||||
@@ -1077,6 +1122,7 @@ export type TeamCreateWithoutMetadataFieldsInput = {
|
||||
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutMetadataFieldsInput = {
|
||||
@@ -1094,6 +1140,7 @@ export type TeamUncheckedCreateWithoutMetadataFieldsInput = {
|
||||
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutMetadataFieldsInput = {
|
||||
@@ -1127,6 +1174,7 @@ export type TeamUpdateWithoutMetadataFieldsInput = {
|
||||
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutMetadataFieldsInput = {
|
||||
@@ -1144,6 +1192,7 @@ export type TeamUncheckedUpdateWithoutMetadataFieldsInput = {
|
||||
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutNotificationsInput = {
|
||||
@@ -1161,6 +1210,7 @@ export type TeamCreateWithoutNotificationsInput = {
|
||||
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutNotificationsInput = {
|
||||
@@ -1178,6 +1228,7 @@ export type TeamUncheckedCreateWithoutNotificationsInput = {
|
||||
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutNotificationsInput = {
|
||||
@@ -1211,6 +1262,7 @@ export type TeamUpdateWithoutNotificationsInput = {
|
||||
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutNotificationsInput = {
|
||||
@@ -1228,6 +1280,95 @@ export type TeamUncheckedUpdateWithoutNotificationsInput = {
|
||||
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutAgentsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
rootFolder?: Prisma.AssetCreateNestedOneWithoutTeamRootFolderInput
|
||||
members?: Prisma.TeamMemberCreateNestedManyWithoutTeamInput
|
||||
projects?: Prisma.ProjectCreateNestedManyWithoutTeamInput
|
||||
metadataFields?: Prisma.MetadataFieldCreateNestedManyWithoutTeamInput
|
||||
invites?: Prisma.InviteCreateNestedManyWithoutTeamInput
|
||||
notifications?: Prisma.NotificationCreateNestedManyWithoutTeamInput
|
||||
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
|
||||
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutAgentsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
rootFolderId?: string | null
|
||||
members?: Prisma.TeamMemberUncheckedCreateNestedManyWithoutTeamInput
|
||||
projects?: Prisma.ProjectUncheckedCreateNestedManyWithoutTeamInput
|
||||
metadataFields?: Prisma.MetadataFieldUncheckedCreateNestedManyWithoutTeamInput
|
||||
invites?: Prisma.InviteUncheckedCreateNestedManyWithoutTeamInput
|
||||
notifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutTeamInput
|
||||
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
|
||||
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutAgentsInput = {
|
||||
where: Prisma.TeamWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.TeamCreateWithoutAgentsInput, Prisma.TeamUncheckedCreateWithoutAgentsInput>
|
||||
}
|
||||
|
||||
export type TeamUpsertWithoutAgentsInput = {
|
||||
update: Prisma.XOR<Prisma.TeamUpdateWithoutAgentsInput, Prisma.TeamUncheckedUpdateWithoutAgentsInput>
|
||||
create: Prisma.XOR<Prisma.TeamCreateWithoutAgentsInput, Prisma.TeamUncheckedCreateWithoutAgentsInput>
|
||||
where?: Prisma.TeamWhereInput
|
||||
}
|
||||
|
||||
export type TeamUpdateToOneWithWhereWithoutAgentsInput = {
|
||||
where?: Prisma.TeamWhereInput
|
||||
data: Prisma.XOR<Prisma.TeamUpdateWithoutAgentsInput, Prisma.TeamUncheckedUpdateWithoutAgentsInput>
|
||||
}
|
||||
|
||||
export type TeamUpdateWithoutAgentsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
rootFolder?: Prisma.AssetUpdateOneWithoutTeamRootFolderNestedInput
|
||||
members?: Prisma.TeamMemberUpdateManyWithoutTeamNestedInput
|
||||
projects?: Prisma.ProjectUpdateManyWithoutTeamNestedInput
|
||||
metadataFields?: Prisma.MetadataFieldUpdateManyWithoutTeamNestedInput
|
||||
invites?: Prisma.InviteUpdateManyWithoutTeamNestedInput
|
||||
notifications?: Prisma.NotificationUpdateManyWithoutTeamNestedInput
|
||||
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
|
||||
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutAgentsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
rootFolderId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
members?: Prisma.TeamMemberUncheckedUpdateManyWithoutTeamNestedInput
|
||||
projects?: Prisma.ProjectUncheckedUpdateManyWithoutTeamNestedInput
|
||||
metadataFields?: Prisma.MetadataFieldUncheckedUpdateManyWithoutTeamNestedInput
|
||||
invites?: Prisma.InviteUncheckedUpdateManyWithoutTeamNestedInput
|
||||
notifications?: Prisma.NotificationUncheckedUpdateManyWithoutTeamNestedInput
|
||||
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
|
||||
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutUserMetadataInput = {
|
||||
@@ -1245,6 +1386,7 @@ export type TeamCreateWithoutUserMetadataInput = {
|
||||
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutUserMetadataInput = {
|
||||
@@ -1262,6 +1404,7 @@ export type TeamUncheckedCreateWithoutUserMetadataInput = {
|
||||
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutUserMetadataInput = {
|
||||
@@ -1295,6 +1438,7 @@ export type TeamUpdateWithoutUserMetadataInput = {
|
||||
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutUserMetadataInput = {
|
||||
@@ -1312,6 +1456,7 @@ export type TeamUncheckedUpdateWithoutUserMetadataInput = {
|
||||
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamCreateWithoutProvidersInput = {
|
||||
@@ -1329,6 +1474,7 @@ export type TeamCreateWithoutProvidersInput = {
|
||||
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedCreateWithoutProvidersInput = {
|
||||
@@ -1346,6 +1492,7 @@ export type TeamUncheckedCreateWithoutProvidersInput = {
|
||||
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
|
||||
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
|
||||
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
|
||||
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
|
||||
}
|
||||
|
||||
export type TeamCreateOrConnectWithoutProvidersInput = {
|
||||
@@ -1379,6 +1526,7 @@ export type TeamUpdateWithoutProvidersInput = {
|
||||
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
export type TeamUncheckedUpdateWithoutProvidersInput = {
|
||||
@@ -1396,6 +1544,7 @@ export type TeamUncheckedUpdateWithoutProvidersInput = {
|
||||
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
|
||||
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
|
||||
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
|
||||
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
|
||||
}
|
||||
|
||||
|
||||
@@ -1412,6 +1561,7 @@ export type TeamCountOutputType = {
|
||||
userMetadata: number
|
||||
providers: number
|
||||
skills: number
|
||||
agents: number
|
||||
}
|
||||
|
||||
export type TeamCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -1423,6 +1573,7 @@ export type TeamCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.I
|
||||
userMetadata?: boolean | TeamCountOutputTypeCountUserMetadataArgs
|
||||
providers?: boolean | TeamCountOutputTypeCountProvidersArgs
|
||||
skills?: boolean | TeamCountOutputTypeCountSkillsArgs
|
||||
agents?: boolean | TeamCountOutputTypeCountAgentsArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1491,6 +1642,13 @@ export type TeamCountOutputTypeCountSkillsArgs<ExtArgs extends runtime.Types.Ext
|
||||
where?: Prisma.SkillWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* TeamCountOutputType without action
|
||||
*/
|
||||
export type TeamCountOutputTypeCountAgentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.AgentWhereInput
|
||||
}
|
||||
|
||||
|
||||
export type TeamSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
@@ -1509,6 +1667,7 @@ export type TeamSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = r
|
||||
providers?: boolean | Prisma.Team$providersArgs<ExtArgs>
|
||||
skills?: boolean | Prisma.Team$skillsArgs<ExtArgs>
|
||||
sandbox?: boolean | Prisma.Team$sandboxArgs<ExtArgs>
|
||||
agents?: boolean | Prisma.Team$agentsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.TeamCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["team"]>
|
||||
|
||||
@@ -1553,6 +1712,7 @@ export type TeamInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
providers?: boolean | Prisma.Team$providersArgs<ExtArgs>
|
||||
skills?: boolean | Prisma.Team$skillsArgs<ExtArgs>
|
||||
sandbox?: boolean | Prisma.Team$sandboxArgs<ExtArgs>
|
||||
agents?: boolean | Prisma.Team$agentsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.TeamCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type TeamIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -1575,6 +1735,7 @@ export type $TeamPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
providers: Prisma.$ProviderPayload<ExtArgs>[]
|
||||
skills: Prisma.$SkillPayload<ExtArgs>[]
|
||||
sandbox: Prisma.$SandboxPayload<ExtArgs> | null
|
||||
agents: Prisma.$AgentPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1990,6 +2151,7 @@ export interface Prisma__TeamClient<T, Null = never, ExtArgs extends runtime.Typ
|
||||
providers<T extends Prisma.Team$providersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$providersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ProviderPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
skills<T extends Prisma.Team$skillsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$skillsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SkillPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
sandbox<T extends Prisma.Team$sandboxArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$sandboxArgs<ExtArgs>>): Prisma.Prisma__SandboxClient<runtime.Types.Result.GetResult<Prisma.$SandboxPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
agents<T extends Prisma.Team$agentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$agentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -2655,6 +2817,30 @@ export type Team$sandboxArgs<ExtArgs extends runtime.Types.Extensions.InternalAr
|
||||
where?: Prisma.SandboxWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* Team.agents
|
||||
*/
|
||||
export type Team$agentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the Agent
|
||||
*/
|
||||
select?: Prisma.AgentSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the Agent
|
||||
*/
|
||||
omit?: Prisma.AgentOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.AgentInclude<ExtArgs> | null
|
||||
where?: Prisma.AgentWhereInput
|
||||
orderBy?: Prisma.AgentOrderByWithRelationInput | Prisma.AgentOrderByWithRelationInput[]
|
||||
cursor?: Prisma.AgentWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.AgentScalarFieldEnum | Prisma.AgentScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Team without action
|
||||
*/
|
||||
|
||||
@@ -63,6 +63,7 @@ describe('AgentService', () => {
|
||||
const agent = await db.agent.create({
|
||||
data: {
|
||||
id: user.id,
|
||||
teamId: team.id,
|
||||
type: 'chat',
|
||||
providerId: provider.id,
|
||||
modelId: model.id,
|
||||
@@ -290,6 +291,7 @@ describe('AgentService', () => {
|
||||
type: 'agent',
|
||||
agent: {
|
||||
create: {
|
||||
teamId: team.id,
|
||||
type: 'autofill',
|
||||
enabled: true,
|
||||
providerId: provider.id,
|
||||
@@ -378,6 +380,7 @@ describe('AgentService', () => {
|
||||
type: 'agent',
|
||||
agent: {
|
||||
create: {
|
||||
teamId: team.id,
|
||||
type: 'chat',
|
||||
enabled: true,
|
||||
providerId: provider.id,
|
||||
@@ -456,6 +459,7 @@ describe('AgentService', () => {
|
||||
const agent = await db.agent.create({
|
||||
data: {
|
||||
id: botUser.id,
|
||||
teamId: team.id,
|
||||
type: 'chat',
|
||||
enabled: true,
|
||||
providerId: provider.id,
|
||||
|
||||
+24
-38
@@ -35,11 +35,7 @@ export class AgentService {
|
||||
const existing = await this.prismaClient.agent.findFirst({
|
||||
where: {
|
||||
type,
|
||||
user: {
|
||||
teamMembers: {
|
||||
some: { teamId },
|
||||
},
|
||||
},
|
||||
teamId,
|
||||
},
|
||||
})
|
||||
if (existing) {
|
||||
@@ -85,6 +81,7 @@ export class AgentService {
|
||||
const agent = await tx.agent.create({
|
||||
data: {
|
||||
id: user.id,
|
||||
teamId,
|
||||
type,
|
||||
enabled: enabled ?? true,
|
||||
providerId: providerId || null,
|
||||
@@ -139,22 +136,15 @@ export class AgentService {
|
||||
if (!agent) throw new Error('agent not found')
|
||||
|
||||
if (type === 'embedding' || type === 'transcription' || type === 'autofill') {
|
||||
const teamId = agent.user.teamMembers[0]?.teamId
|
||||
if (teamId) {
|
||||
const existing = await this.prismaClient.agent.findFirst({
|
||||
where: {
|
||||
type,
|
||||
id: { not: agentId },
|
||||
user: {
|
||||
teamMembers: {
|
||||
some: { teamId },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
if (existing) {
|
||||
throw new Error(`Agent of type ${type} already exists for this team`)
|
||||
}
|
||||
const existing = await this.prismaClient.agent.findFirst({
|
||||
where: {
|
||||
type,
|
||||
id: { not: agentId },
|
||||
teamId: agent.teamId,
|
||||
},
|
||||
})
|
||||
if (existing) {
|
||||
throw new Error(`Agent of type ${type} already exists for this team`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,11 +222,7 @@ export class AgentService {
|
||||
async listAgents(params: ListAgentsParams) {
|
||||
return this.prismaClient.agent.findMany({
|
||||
where: {
|
||||
user: {
|
||||
teamMembers: {
|
||||
some: { teamId: params.teamId },
|
||||
},
|
||||
},
|
||||
teamId: params.teamId,
|
||||
},
|
||||
orderBy: {
|
||||
id: 'desc',
|
||||
@@ -271,11 +257,7 @@ export class AgentService {
|
||||
where: {
|
||||
type: 'chat',
|
||||
enabled: true,
|
||||
user: {
|
||||
teamMembers: {
|
||||
some: { teamId },
|
||||
},
|
||||
},
|
||||
teamId,
|
||||
},
|
||||
})
|
||||
if (!agent) {
|
||||
@@ -421,16 +403,12 @@ export class AgentService {
|
||||
prompt: string,
|
||||
images: string[],
|
||||
fields: AutofillField[],
|
||||
): Promise<{ text: string; usage: Usage }> {
|
||||
): Promise<{ text: string; usage: Usage; sessionId: string }> {
|
||||
const agent = await this.prismaClient.agent.findFirst({
|
||||
where: {
|
||||
type: 'autofill',
|
||||
enabled: true,
|
||||
user: {
|
||||
teamMembers: {
|
||||
some: { teamId },
|
||||
},
|
||||
},
|
||||
teamId,
|
||||
},
|
||||
})
|
||||
if (!agent) {
|
||||
@@ -457,7 +435,7 @@ export class AgentService {
|
||||
|
||||
const fullPrompt = `${prompt}\n\nPlease use the "autofill_metadata" tool to provide the extracted metadata.`
|
||||
|
||||
const { usage } = await this.chatWithAgent(
|
||||
const { usage, sessionId } = await this.chatWithAgent(
|
||||
teamId,
|
||||
agent.id,
|
||||
fullPrompt,
|
||||
@@ -471,8 +449,16 @@ export class AgentService {
|
||||
return {
|
||||
text: capturedData ? JSON.stringify(capturedData) : '{}',
|
||||
usage,
|
||||
sessionId,
|
||||
}
|
||||
}
|
||||
|
||||
async getSessionEntries(params: { sessionId: string }) {
|
||||
return this.prismaClient.agentSessionEntry.findMany({
|
||||
where: { sessionId: params.sessionId },
|
||||
orderBy: { id: 'asc' },
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export const agentService = new AgentService()
|
||||
|
||||
@@ -70,6 +70,7 @@ describe('AiService', () => {
|
||||
type: 'agent',
|
||||
agent: {
|
||||
create: {
|
||||
teamId: team.id,
|
||||
type: 'transcription',
|
||||
enabled: true,
|
||||
providerId: provider.id,
|
||||
|
||||
@@ -483,7 +483,7 @@ describe('AssetService', () => {
|
||||
})
|
||||
|
||||
it('correctly handles AI comments with agent identity', async () => {
|
||||
const { assets } = await setupBasicAssets()
|
||||
const { assets, project } = await setupBasicAssets()
|
||||
|
||||
// Create an agent user
|
||||
const agentUser = await prisma.user.create({
|
||||
@@ -499,6 +499,7 @@ describe('AssetService', () => {
|
||||
await prisma.agent.create({
|
||||
data: {
|
||||
id: agentUser.id,
|
||||
teamId: project.teamId,
|
||||
type: 'autofill',
|
||||
config: {
|
||||
provider: 'test',
|
||||
@@ -507,12 +508,21 @@ describe('AssetService', () => {
|
||||
},
|
||||
})
|
||||
|
||||
// Create a real agent session
|
||||
const session = await prisma.agentSession.create({
|
||||
data: {
|
||||
id: 'session-id-123',
|
||||
agentId: agentUser.id,
|
||||
cwd: process.cwd(),
|
||||
},
|
||||
})
|
||||
|
||||
// Create an AI comment manually using the activity-like logic
|
||||
await prisma.assetComment.create({
|
||||
data: {
|
||||
assetId: assets.fileA1.id,
|
||||
message: 'I am an AI',
|
||||
isAi: true,
|
||||
sessionId: session.id,
|
||||
creatorId: agentUser.id,
|
||||
},
|
||||
})
|
||||
@@ -521,7 +531,7 @@ describe('AssetService', () => {
|
||||
first: 10,
|
||||
})
|
||||
|
||||
const aiComment = list.data.find((c) => c.isAi)
|
||||
const aiComment = list.data.find((c) => !!c.sessionId)
|
||||
expect(aiComment).toBeDefined()
|
||||
expect(aiComment?.creator.id).toBe(agentUser.id)
|
||||
expect(aiComment?.creator.name).toBe('Smart Agent')
|
||||
@@ -608,6 +618,7 @@ describe('AssetService', () => {
|
||||
const agent = await prisma.agent.create({
|
||||
data: {
|
||||
id: botUser.id,
|
||||
teamId: project.teamId,
|
||||
type: 'chat',
|
||||
config: {
|
||||
provider: 'google',
|
||||
@@ -632,7 +643,7 @@ describe('AssetService', () => {
|
||||
|
||||
// Check if AI placeholder comments were NOT created here (moved to workflow)
|
||||
const comments = await prisma.assetComment.findMany({
|
||||
where: { assetId: file.id, isAi: true },
|
||||
where: { assetId: file.id, sessionId: { not: null } },
|
||||
})
|
||||
expect(comments.length).toBe(0)
|
||||
|
||||
|
||||
@@ -1058,7 +1058,7 @@ export class AssetService {
|
||||
}
|
||||
|
||||
const creator: UserInfo = { id: '', name: '' }
|
||||
if (c.isAi) {
|
||||
if (c.sessionId) {
|
||||
creator.id = c.creatorId || ''
|
||||
creator.name = c.creator?.name || 'Ai Bot'
|
||||
} else if (c.creator) {
|
||||
@@ -1077,7 +1077,7 @@ export class AssetService {
|
||||
mentions,
|
||||
createdAt: c.createdAt.toISOString(),
|
||||
updatedAt: c.updatedAt.toISOString(),
|
||||
isAi: c.isAi,
|
||||
sessionId: c.sessionId,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,6 +152,7 @@ describe('ProjectService', () => {
|
||||
type: 'agent',
|
||||
agent: {
|
||||
create: {
|
||||
teamId: team.id,
|
||||
type: 'chat',
|
||||
enabled: true,
|
||||
config: {
|
||||
|
||||
@@ -120,6 +120,11 @@ describe('TeamService', () => {
|
||||
const user = await prisma.user.create({
|
||||
data: { name: 'Human', email: `human-${Date.now()}@example.com`, password: 'pw' },
|
||||
})
|
||||
|
||||
const team = await teamService.createTeam(user, {
|
||||
name: 'Test Team',
|
||||
})
|
||||
|
||||
const bot = await prisma.user.create({
|
||||
data: {
|
||||
name: 'Bot',
|
||||
@@ -128,6 +133,7 @@ describe('TeamService', () => {
|
||||
type: 'agent',
|
||||
agent: {
|
||||
create: {
|
||||
teamId: team.id,
|
||||
type: 'chat',
|
||||
enabled: true,
|
||||
config: {
|
||||
@@ -139,10 +145,6 @@ describe('TeamService', () => {
|
||||
},
|
||||
})
|
||||
|
||||
const team = await teamService.createTeam(user, {
|
||||
name: 'Test Team',
|
||||
})
|
||||
|
||||
await teamService.joinTeam({
|
||||
teamId: team.id,
|
||||
userId: bot.id,
|
||||
|
||||
@@ -1,12 +1,22 @@
|
||||
import { client } from '@/ui/api/client'
|
||||
import type { AttachmentInfo, CommentInfo } from '@/dtos/asset'
|
||||
import type { UserInfo } from '@/dtos/team'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@/ui/components/ui/dialog'
|
||||
import { Separator } from '@/ui/components/ui/separator'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { Download, File } from 'lucide-react'
|
||||
import { Download, File, Terminal } from 'lucide-react'
|
||||
import React from 'react'
|
||||
import { formatTimeAgo } from '@/ui/lib/time'
|
||||
import Markdown from 'react-markdown'
|
||||
import { Avatar, AvatarFallback } from '../ui/avatar'
|
||||
import { Skeleton } from '../ui/skeleton'
|
||||
import Markdown from 'react-markdown'
|
||||
|
||||
interface MessageCardProps {
|
||||
teamId?: string
|
||||
@@ -28,7 +38,6 @@ const AI_PLACEHOLDERS: Record<string, string> = {
|
||||
__TRANSCRIPTION__: 'Transcribing...',
|
||||
__RUNNING__: 'Generating...',
|
||||
}
|
||||
/* eslint-enable @typescript-eslint/naming-convention */
|
||||
|
||||
export const MessageCard: React.FC<MessageCardProps> = ({
|
||||
teamId,
|
||||
@@ -41,7 +50,9 @@ export const MessageCard: React.FC<MessageCardProps> = ({
|
||||
onViewAttachment,
|
||||
}) => {
|
||||
const isRunning =
|
||||
initialMessage.isAi && !!initialMessage.message && initialMessage.message in AI_PLACEHOLDERS
|
||||
!!initialMessage.sessionId &&
|
||||
!!initialMessage.message &&
|
||||
initialMessage.message in AI_PLACEHOLDERS
|
||||
|
||||
const { data: polledMessage } = useQuery({
|
||||
queryKey: ['teams', teamId, 'comments', initialMessage.id],
|
||||
@@ -64,9 +75,39 @@ export const MessageCard: React.FC<MessageCardProps> = ({
|
||||
|
||||
const message = polledMessage || initialMessage
|
||||
const creator = message.creator
|
||||
const showSkeleton = message.isAi && !!message.message && message.message in AI_PLACEHOLDERS
|
||||
const showSkeleton =
|
||||
!!message.sessionId && !!message.message && message.message in AI_PLACEHOLDERS
|
||||
const loadingText = (message.message && AI_PLACEHOLDERS[message.message]) || 'Generating...'
|
||||
|
||||
const [isLogsOpen, setIsLogsOpen] = React.useState(false)
|
||||
|
||||
const { data: me } = useQuery({
|
||||
queryKey: ['teams', teamId, 'me'],
|
||||
queryFn: async () => {
|
||||
const res = await client.api.teams[':teamId'].me.$get({
|
||||
param: { teamId: teamId! },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to fetch current member info')
|
||||
return await res.json()
|
||||
},
|
||||
enabled: !!teamId,
|
||||
staleTime: 300000,
|
||||
})
|
||||
|
||||
const isAdmin = me?.role === 'owner'
|
||||
|
||||
const { data: logs, isLoading: isLogsLoading } = useQuery({
|
||||
queryKey: ['teams', teamId, 'agent-sessions', message.sessionId, 'entries'],
|
||||
queryFn: async () => {
|
||||
const res = await client.api.teams[':teamId']['agent-sessions'][':sessionId'].entries.$get({
|
||||
param: { teamId: teamId!, sessionId: message.sessionId! },
|
||||
})
|
||||
if (!res.ok) throw new Error('Failed to fetch session logs')
|
||||
return await res.json()
|
||||
},
|
||||
enabled: isLogsOpen && !!message.sessionId && !!teamId,
|
||||
})
|
||||
|
||||
const renderFormattedMessage = (text: string) => {
|
||||
const parts = text.split(/(<@[a-zA-Z0-9_-]+>)/g)
|
||||
return parts.map((part, index) => {
|
||||
@@ -122,7 +163,7 @@ export const MessageCard: React.FC<MessageCardProps> = ({
|
||||
<Skeleton className="h-4 w-1/2" />
|
||||
<span className="text-xs text-muted-foreground animate-pulse">{loadingText}</span>
|
||||
</div>
|
||||
) : message.isAi ? (
|
||||
) : message.sessionId ? (
|
||||
<div className="text-sm leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words">
|
||||
<Markdown>{message.message!}</Markdown>
|
||||
</div>
|
||||
@@ -174,6 +215,25 @@ export const MessageCard: React.FC<MessageCardProps> = ({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Agent Footer */}
|
||||
{message.sessionId && (
|
||||
<div className="mt-3 pt-2 border-t border-foreground/5 flex items-center justify-between text-xs text-muted-foreground/60">
|
||||
<span className="flex items-center gap-1.5 font-medium text-muted-foreground/80">
|
||||
Created by Agent
|
||||
</span>
|
||||
{isAdmin && (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="xs"
|
||||
onClick={() => setIsLogsOpen(true)}
|
||||
className="cursor-pointer border-violet-500/20 text-violet-600 dark:text-violet-400 hover:bg-violet-500/10 hover:text-violet-700 hover:border-violet-500/30 font-semibold"
|
||||
>
|
||||
Logs
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Actions */}
|
||||
<div className="mt-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200 flex items-center gap-4">
|
||||
<button
|
||||
@@ -184,6 +244,309 @@ export const MessageCard: React.FC<MessageCardProps> = ({
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Logs Dialog */}
|
||||
<Dialog open={isLogsOpen} onOpenChange={setIsLogsOpen}>
|
||||
<DialogContent className="sm:max-w-2xl max-h-[80vh] flex flex-col p-6 overflow-hidden bg-background/95 backdrop-blur-md border border-foreground/15 shadow-2xl">
|
||||
<DialogHeader className="pb-4 border-b border-foreground/15">
|
||||
<DialogTitle className="flex items-center gap-2 text-xl font-bold">
|
||||
<Terminal className="w-5 h-5 text-violet-500" />
|
||||
Agent Session Logs
|
||||
</DialogTitle>
|
||||
<DialogDescription>
|
||||
Step-by-step execution trace of the agent's background tasks and tool calls.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="flex-1 overflow-y-auto pr-1 py-4 space-y-4 min-h-0 select-text">
|
||||
{isLogsLoading ? (
|
||||
<div className="space-y-4">
|
||||
<div className="flex gap-4">
|
||||
<Skeleton className="h-5 w-5 rounded-full shrink-0" />
|
||||
<div className="flex-1 space-y-2">
|
||||
<Skeleton className="h-4 w-1/4" />
|
||||
<Skeleton className="h-20 w-full" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex gap-4">
|
||||
<Skeleton className="h-5 w-5 rounded-full shrink-0" />
|
||||
<div className="flex-1 space-y-2">
|
||||
<Skeleton className="h-4 w-1/4" />
|
||||
<Skeleton className="h-12 w-full" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : logs && logs.length > 0 ? (
|
||||
<div className="flex flex-col">
|
||||
{logs.map((entry) => {
|
||||
const piEntry = entry.entry as Record<string, unknown> | null
|
||||
const timestampStr =
|
||||
piEntry?.timestamp || (entry as Record<string, unknown>).timestamp
|
||||
let timestamp = ''
|
||||
if (typeof timestampStr === 'string' || typeof timestampStr === 'number') {
|
||||
const dateObj = new Date(timestampStr)
|
||||
if (!isNaN(dateObj.getTime())) {
|
||||
timestamp = formatTimeAgo(dateObj.toISOString())
|
||||
}
|
||||
}
|
||||
|
||||
if (piEntry && typeof piEntry === 'object') {
|
||||
if (piEntry.type === 'message' && piEntry.message) {
|
||||
const msg = piEntry.message as Record<string, unknown>
|
||||
let badgeColor =
|
||||
'bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200'
|
||||
let roleName: string = String(msg.role || '')
|
||||
|
||||
if (msg.role === 'user') {
|
||||
badgeColor =
|
||||
'bg-slate-100 text-slate-800 dark:bg-slate-900/30 dark:text-slate-300'
|
||||
roleName = 'User'
|
||||
} else if (msg.role === 'assistant') {
|
||||
badgeColor =
|
||||
'bg-violet-100 text-violet-800 dark:bg-violet-900/30 dark:text-violet-300'
|
||||
roleName = 'Agent'
|
||||
} else if (msg.role === 'toolResult') {
|
||||
badgeColor = msg.isError
|
||||
? 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300'
|
||||
: 'bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-300'
|
||||
roleName = `Tool Result: ${String(msg.toolName || 'Unknown')}`
|
||||
} else if (msg.role === 'thought') {
|
||||
badgeColor =
|
||||
'bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300'
|
||||
roleName = 'Thinking'
|
||||
}
|
||||
|
||||
const renderToolCallArguments = (args: unknown) => {
|
||||
let parsedArgs: unknown = args
|
||||
if (typeof args === 'string') {
|
||||
try {
|
||||
parsedArgs = JSON.parse(args)
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
parsedArgs &&
|
||||
typeof parsedArgs === 'object' &&
|
||||
!Array.isArray(parsedArgs)
|
||||
) {
|
||||
const obj = parsedArgs as Record<string, unknown>
|
||||
return (
|
||||
<div className="mt-1 space-y-1.5 pt-3">
|
||||
{Object.entries(obj).map(([key, value]) => {
|
||||
let valueStr = ''
|
||||
if (value && typeof value === 'object') {
|
||||
valueStr = JSON.stringify(value, null, 2)
|
||||
} else {
|
||||
valueStr = String(value)
|
||||
}
|
||||
return (
|
||||
<div key={key} className="text-xs leading-relaxed break-words">
|
||||
<span className="font-semibold text-violet-600 dark:text-violet-400">
|
||||
{key}:
|
||||
</span>{' '}
|
||||
<span className="text-foreground/90 font-mono whitespace-pre-wrap">
|
||||
{valueStr}
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="text-xs font-mono whitespace-pre-wrap">
|
||||
{String(args)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const renderMessageContent = () => {
|
||||
const content = msg.content
|
||||
if (!content) return null
|
||||
|
||||
if (typeof content === 'string') {
|
||||
if (!content.trim()) return null
|
||||
return (
|
||||
<div className="text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words">
|
||||
<Markdown>{content}</Markdown>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
if (Array.isArray(content)) {
|
||||
const renderedBlocks: React.ReactNode[] = []
|
||||
|
||||
content.forEach((item, idx) => {
|
||||
if (!item) return
|
||||
|
||||
if (typeof item === 'string') {
|
||||
if (!item.trim()) return
|
||||
renderedBlocks.push(
|
||||
<div
|
||||
key={`str-${idx}`}
|
||||
className="text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words"
|
||||
>
|
||||
<Markdown>{item}</Markdown>
|
||||
</div>,
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
if (typeof item === 'object') {
|
||||
const itemObj = item as Record<string, unknown>
|
||||
const type = itemObj.type
|
||||
if (type === 'text') {
|
||||
const text = itemObj.text
|
||||
if (typeof text !== 'string' || !text.trim()) return
|
||||
renderedBlocks.push(
|
||||
<div
|
||||
key={`txt-${idx}`}
|
||||
className="text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words"
|
||||
>
|
||||
<Markdown>{text}</Markdown>
|
||||
</div>,
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
if (type === 'toolCall') {
|
||||
const toolName = String(
|
||||
itemObj.name || itemObj.toolName || 'Unknown',
|
||||
)
|
||||
const toolArgs = itemObj.arguments || itemObj.args
|
||||
renderedBlocks.push(
|
||||
<div key={`tool-${idx}`} className="text-xs space-y-2 py-1">
|
||||
<div className="font-semibold text-violet-600 dark:text-violet-400 flex items-center gap-1.5">
|
||||
Calling Tool:{' '}
|
||||
<span className="font-mono bg-violet-500/10 px-1 py-0.5 rounded text-[11px]">
|
||||
{toolName}
|
||||
</span>
|
||||
</div>
|
||||
{!!toolArgs && (
|
||||
<div className="space-y-1 pt-3">
|
||||
<div className="text-[10px] text-muted-foreground/60 uppercase font-bold tracking-wider">
|
||||
Arguments
|
||||
</div>
|
||||
{renderToolCallArguments(toolArgs)}
|
||||
</div>
|
||||
)}
|
||||
</div>,
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
if (type === 'image') {
|
||||
renderedBlocks.push(
|
||||
<div
|
||||
key={`img-${idx}`}
|
||||
className="text-xs text-muted-foreground italic flex items-center gap-1.5 py-1"
|
||||
>
|
||||
[Image Object]
|
||||
</div>,
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
// Fallback for other object types
|
||||
const stringified = JSON.stringify(item, null, 2)
|
||||
if (stringified === '{}') return
|
||||
renderedBlocks.push(
|
||||
<pre
|
||||
key={`other-${idx}`}
|
||||
className="text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words bg-muted/20 p-2 rounded"
|
||||
>
|
||||
{stringified}
|
||||
</pre>,
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
if (renderedBlocks.length === 0) return null
|
||||
|
||||
return (
|
||||
<div className="space-y-3 w-full">
|
||||
{renderedBlocks.map((block, index) => (
|
||||
<React.Fragment key={index}>
|
||||
{index > 0 && <Separator className="my-3 opacity-50" />}
|
||||
{block}
|
||||
</React.Fragment>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<div key={entry.id} className="relative pl-6 pb-6 last:pb-0">
|
||||
{/* Timeline Line */}
|
||||
<div className="absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden" />
|
||||
|
||||
{/* Timeline Node */}
|
||||
<div
|
||||
className={`absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background flex items-center justify-center ${
|
||||
msg.role === 'user'
|
||||
? 'bg-slate-500'
|
||||
: msg.role === 'assistant'
|
||||
? 'bg-violet-500'
|
||||
: msg.role === 'toolResult'
|
||||
? msg.isError
|
||||
? 'bg-red-500'
|
||||
: 'bg-emerald-500'
|
||||
: 'bg-amber-500'
|
||||
}`}
|
||||
/>
|
||||
|
||||
<div className="flex flex-col gap-1.5 bg-muted/30 dark:bg-muted/10 p-3 rounded-lg border border-foreground/5 backdrop-blur-xs w-full">
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<span
|
||||
className={`text-[10px] px-2 py-0.5 rounded-full font-semibold uppercase tracking-wider ${badgeColor}`}
|
||||
>
|
||||
{roleName}
|
||||
</span>
|
||||
<span className="text-[10px] text-muted-foreground/60">
|
||||
{timestamp}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{renderMessageContent()}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback for non-message entries or arbitrary entries
|
||||
return (
|
||||
<div key={entry.id} className="relative pl-6 pb-6 last:pb-0">
|
||||
<div className="absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden" />
|
||||
<div className="absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background bg-gray-400" />
|
||||
<div className="bg-muted/30 p-3 rounded-lg border border-foreground/5">
|
||||
<div className="text-[10px] text-muted-foreground/60">{timestamp}</div>
|
||||
<pre className="text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words">
|
||||
{JSON.stringify(entry.entry, null, 2)}
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex flex-col items-center justify-center py-12 text-center text-muted-foreground">
|
||||
<Terminal className="w-8 h-8 text-muted-foreground/40 mb-2 animate-pulse" />
|
||||
<p className="text-sm font-medium">No logs found for this session.</p>
|
||||
<p className="text-xs text-muted-foreground/60 mt-1">
|
||||
The session might have been initialized but has not produced any entries yet.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -41,17 +41,70 @@ export async function aiChatActivity(params: AiChatParams) {
|
||||
export interface CreateCommentParams {
|
||||
assetId: string
|
||||
message: string
|
||||
isAi?: boolean
|
||||
sessionId?: string | null
|
||||
agentId?: string | null
|
||||
replyToId?: string | null
|
||||
}
|
||||
|
||||
export async function createCommentActivity(params: CreateCommentParams) {
|
||||
if (params.sessionId) {
|
||||
const agentId = params.agentId && params.agentId !== 'default' ? params.agentId : 'default'
|
||||
|
||||
// Fetch teamId from asset
|
||||
const asset = await prisma.asset.findUnique({
|
||||
where: { id: params.assetId },
|
||||
include: { project: true },
|
||||
})
|
||||
if (!asset || !asset.project) throw new Error('asset or project not found')
|
||||
const teamId = asset.project.teamId
|
||||
|
||||
// Ensure user exists for agent
|
||||
const userExists = await prisma.user.findUnique({ where: { id: agentId } })
|
||||
if (!userExists) {
|
||||
await prisma.user.create({
|
||||
data: {
|
||||
id: agentId,
|
||||
name: 'Ai Agent',
|
||||
email: `${agentId}@shumai.ai`,
|
||||
type: 'agent',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
// Ensure agent exists
|
||||
const agentExists = await prisma.agent.findUnique({ where: { id: agentId } })
|
||||
if (!agentExists) {
|
||||
await prisma.agent.create({
|
||||
data: {
|
||||
id: agentId,
|
||||
teamId,
|
||||
type: 'chat',
|
||||
config: {
|
||||
provider: 'openai',
|
||||
model: 'gpt-4',
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
// Ensure agent session exists
|
||||
const sessionExists = await prisma.agentSession.findUnique({ where: { id: params.sessionId } })
|
||||
if (!sessionExists) {
|
||||
await prisma.agentSession.create({
|
||||
data: {
|
||||
id: params.sessionId,
|
||||
agentId: agentId,
|
||||
cwd: process.cwd(),
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return prisma.assetComment.create({
|
||||
data: {
|
||||
assetId: params.assetId,
|
||||
message: params.message,
|
||||
isAi: params.isAi ?? false,
|
||||
sessionId: params.sessionId ?? null,
|
||||
creatorId: params.agentId && params.agentId !== 'default' ? params.agentId : null,
|
||||
replyToId: params.replyToId,
|
||||
},
|
||||
@@ -61,11 +114,15 @@ export async function createCommentActivity(params: CreateCommentParams) {
|
||||
export interface UpdateCommentParams {
|
||||
commentId: string
|
||||
message: string
|
||||
sessionId?: string | null
|
||||
}
|
||||
|
||||
export async function updateCommentActivity(params: UpdateCommentParams) {
|
||||
return prisma.assetComment.update({
|
||||
where: { id: params.commentId },
|
||||
data: { message: params.message },
|
||||
data: {
|
||||
message: params.message,
|
||||
...(params.sessionId !== undefined ? { sessionId: params.sessionId } : {}),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -47,12 +47,19 @@ describe('WorkflowService', () => {
|
||||
contentType: 'audio/mpeg',
|
||||
})
|
||||
|
||||
const team = await prisma.team.create({
|
||||
data: { name: 'Transcription Team' },
|
||||
})
|
||||
const project = await prisma.project.create({
|
||||
data: { name: 'Transcription Project', teamId: team.id },
|
||||
})
|
||||
const asset = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'test.mp3',
|
||||
key: 'test/test.mp3',
|
||||
status: 'uploaded',
|
||||
type: 'file',
|
||||
projectId: project.id,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -84,6 +91,12 @@ describe('WorkflowService', () => {
|
||||
}, 15000)
|
||||
|
||||
it('should process ai_embedding task locally', async () => {
|
||||
const team = await prisma.team.create({
|
||||
data: { name: 'Embedding Team' },
|
||||
})
|
||||
const project = await prisma.project.create({
|
||||
data: { name: 'Embedding Project', teamId: team.id },
|
||||
})
|
||||
const asset = await prisma.asset.create({
|
||||
data: {
|
||||
name: 'test.png',
|
||||
@@ -91,6 +104,7 @@ describe('WorkflowService', () => {
|
||||
status: 'uploaded',
|
||||
type: 'file',
|
||||
mediaType: 'image/png',
|
||||
projectId: project.id,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -99,7 +113,7 @@ describe('WorkflowService', () => {
|
||||
assetId: asset.id,
|
||||
type: WorkflowTaskType.ai_embedding,
|
||||
status: WorkflowTaskStatus.pending,
|
||||
teamId: 'test-team', // Needs a teamId for embeddings
|
||||
teamId: team.id,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ describe('AIAutofill Workflow', () => {
|
||||
expect(mockActivities.createCommentActivity).toHaveBeenCalledWith({
|
||||
assetId: 'asset-1',
|
||||
message: '__AUTOFILL__',
|
||||
isAi: true,
|
||||
sessionId: 'task-1',
|
||||
agentId: 'default',
|
||||
})
|
||||
|
||||
@@ -160,7 +160,7 @@ describe('AIAutofill Workflow', () => {
|
||||
expect(mockActivities.createCommentActivity).toHaveBeenCalledWith({
|
||||
assetId: 'asset-1',
|
||||
message: '__AUTOFILL__',
|
||||
isAi: true,
|
||||
sessionId: 'task-1',
|
||||
agentId: 'real-agent-id',
|
||||
})
|
||||
})
|
||||
|
||||
@@ -40,7 +40,7 @@ export async function aiAutofillMedia(task: WorkflowTask): Promise<void> {
|
||||
const placeholder = await executeActivity(TaskQueueDb, createCommentActivity, {
|
||||
assetId: task.assetId,
|
||||
message: '__AUTOFILL__',
|
||||
isAi: true,
|
||||
sessionId: (payload?.session_id as string) || task.id,
|
||||
agentId: (payload?.agentId as string) || 'default',
|
||||
})
|
||||
placeholderCommentId = placeholder.id
|
||||
@@ -148,6 +148,7 @@ export async function aiAutofillMedia(task: WorkflowTask): Promise<void> {
|
||||
await executeActivity(TaskQueueDb, updateCommentActivity, {
|
||||
commentId: placeholderCommentId,
|
||||
message: 'Autofill completed successfully.',
|
||||
sessionId: aiResult.sessionId,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ describe('AIChat Workflow', () => {
|
||||
expect(mockActivities.createCommentActivity).toHaveBeenCalledWith({
|
||||
assetId: 'asset-1',
|
||||
message: '__CHAT__',
|
||||
isAi: true,
|
||||
sessionId: 'pending',
|
||||
agentId: 'bot-1',
|
||||
replyToId: 'comment-1',
|
||||
})
|
||||
@@ -172,7 +172,7 @@ describe('AIChat Workflow', () => {
|
||||
expect(mockActivities.createCommentActivity).toHaveBeenCalledWith({
|
||||
assetId: 'asset-1',
|
||||
message: '__CHAT__',
|
||||
isAi: true,
|
||||
sessionId: 'pending',
|
||||
agentId: 'bot-1',
|
||||
replyToId: 'root-comment-id', // MUST be root, not reply-1
|
||||
})
|
||||
|
||||
@@ -40,7 +40,7 @@ export async function aiChat(task: WorkflowTask): Promise<void> {
|
||||
const placeholder = await executeActivity(TaskQueueDb, createCommentActivity, {
|
||||
assetId: task.assetId,
|
||||
message: '__CHAT__',
|
||||
isAi: true,
|
||||
sessionId: payload?.session_id || 'pending',
|
||||
agentId: payload?.agentId,
|
||||
replyToId: userComment.replyToId ?? userComment.id,
|
||||
})
|
||||
@@ -100,6 +100,7 @@ export async function aiChat(task: WorkflowTask): Promise<void> {
|
||||
await executeActivity(TaskQueueDb, updateCommentActivity, {
|
||||
commentId: placeholderCommentId,
|
||||
message: aiResult.text,
|
||||
sessionId: aiResult.sessionId,
|
||||
})
|
||||
|
||||
// Also store sessionId in comment's metadata if we had such a field,
|
||||
|
||||
@@ -78,7 +78,7 @@ describe('AIEmbedding Workflow', () => {
|
||||
expect(mockActivities.createCommentActivity).toHaveBeenCalledWith({
|
||||
assetId: 'asset-1',
|
||||
message: '__EMBEDDING__',
|
||||
isAi: true,
|
||||
sessionId: 'task-1',
|
||||
agentId: 'default',
|
||||
})
|
||||
|
||||
@@ -136,7 +136,7 @@ describe('AIEmbedding Workflow', () => {
|
||||
expect(mockActivities.createCommentActivity).toHaveBeenCalledWith({
|
||||
assetId: 'asset-1',
|
||||
message: '__EMBEDDING__',
|
||||
isAi: true,
|
||||
sessionId: 'task-1',
|
||||
agentId: 'real-agent-id',
|
||||
})
|
||||
})
|
||||
|
||||
@@ -25,7 +25,7 @@ export async function aiEmbeddingMedia(task: WorkflowTask): Promise<void> {
|
||||
const placeholder = await executeActivity(TaskQueueDb, createCommentActivity, {
|
||||
assetId: task.assetId,
|
||||
message: '__EMBEDDING__',
|
||||
isAi: true,
|
||||
sessionId: (payload?.session_id as string) || task.id,
|
||||
agentId: (payload?.agentId as string) || 'default',
|
||||
})
|
||||
placeholderCommentId = placeholder.id
|
||||
|
||||
@@ -35,7 +35,7 @@ export async function aiTranscriptionMedia(task: WorkflowTask): Promise<void> {
|
||||
const placeholder = await executeActivity(TaskQueueDb, createCommentActivity, {
|
||||
assetId: task.assetId,
|
||||
message: '__TRANSCRIPTION__',
|
||||
isAi: true,
|
||||
sessionId: (payload?.session_id as string) || task.id,
|
||||
agentId: (payload?.agentId as string) || 'default',
|
||||
})
|
||||
placeholderCommentId = placeholder.id
|
||||
|
||||
Reference in New Issue
Block a user