Skip to content

Commit 6ec7356

Browse files
committed
live-demo: add checkpoint resource and update agent plugin
AdminForth/1786/ability-to-edit-agent-prompt-a
1 parent 7c7fdb8 commit 6ec7356

6 files changed

Lines changed: 26 additions & 11 deletions

File tree

live-demo/app/globalPlugins.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export const adminForthAgent = new AdminForthAgent({
6262
createdAtField: 'created_at',
6363
promptField: 'prompt',
6464
responseField: 'response',
65+
checkpointIdField: 'checkpoint_id',
6566
},
6667
checkpointResource: {
6768
resourceId: 'agent_checkpoints',
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- AlterTable
2+
ALTER TABLE "turns" ADD COLUMN "checkpoint_id" TEXT;

live-demo/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"author": "",
1818
"description": "",
1919
"dependencies": {
20-
"@adminforth/agent": "^2.2.5",
20+
"@adminforth/agent": "^2.3.1",
2121
"@adminforth/audio-adapter-openai": "^1.3.1",
2222
"@adminforth/audit-log": "^1.9.29",
2323
"@adminforth/auto-remove": "^1.0.19",

live-demo/app/pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

live-demo/app/resources/agent_resources/turns.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ const turnsResource: AdminForthResourceInput = {
4343
name: 'response',
4444
type: AdminForthDataTypes.TEXT,
4545
},
46+
{
47+
name: 'checkpoint_id',
48+
type: AdminForthDataTypes.STRING,
49+
showIn: {
50+
list: false,
51+
show: true,
52+
edit: false,
53+
create: false,
54+
filter: false,
55+
},
56+
},
4657
],
4758
options: {
4859
allowedActions: {

live-demo/app/schema.prisma

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,12 @@ model sessions {
6969
}
7070

7171
model turns {
72-
id String @id
73-
session_id String
74-
created_at DateTime
75-
prompt String?
76-
response String?
72+
id String @id
73+
session_id String
74+
created_at DateTime
75+
prompt String?
76+
response String?
77+
checkpoint_id String?
7778
}
7879

7980
model agent_checkpoints {

0 commit comments

Comments
 (0)