agentfit 0.1.2 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +4 -0
- package/README.md +0 -2
- package/app/(dashboard)/ai-insights/page.tsx +271 -0
- package/app/(dashboard)/models/page.tsx +21 -0
- package/app/(dashboard)/page.tsx +2 -0
- package/app/(dashboard)/sessions/[id]/page.tsx +16 -2
- package/app/(dashboard)/settings/page.tsx +168 -0
- package/app/api/analyze/aggregate/route.ts +88 -0
- package/app/api/analyze/estimate/route.ts +62 -0
- package/app/api/analyze/route.ts +142 -0
- package/app/api/cc-versions/route.ts +84 -0
- package/app/api/config/route.ts +35 -0
- package/bin/agentfit.mjs +22 -13
- package/components/analyze-confirm-dialog.tsx +81 -0
- package/components/app-sidebar.tsx +14 -0
- package/components/data-provider.tsx +4 -2
- package/components/model-usage-chart.tsx +216 -0
- package/components/overview-cards.tsx +1 -1
- package/components/session-ai-analysis.tsx +318 -0
- package/components/sessions-table.tsx +169 -15
- package/components/version-lag-chart.tsx +284 -0
- package/electron/main.mjs +81 -59
- package/generated/prisma/browser.ts +5 -0
- package/generated/prisma/client.ts +5 -0
- package/generated/prisma/internal/class.ts +14 -4
- package/generated/prisma/internal/prismaNamespace.ts +95 -2
- package/generated/prisma/internal/prismaNamespaceBrowser.ts +19 -1
- package/generated/prisma/models/Session.ts +57 -1
- package/generated/prisma/models/SessionAnalysis.ts +1321 -0
- package/generated/prisma/models.ts +1 -0
- package/lib/config.ts +45 -0
- package/lib/db.ts +1 -1
- package/lib/openai.ts +253 -0
- package/lib/parse-codex.ts +2 -0
- package/lib/parse-logs.ts +21 -7
- package/lib/queries.ts +5 -1
- package/lib/sync.ts +17 -5
- package/package.json +2 -1
- package/prisma/migrations/20260404151230_add_session_analysis/migration.sql +18 -0
- package/prisma/migrations/20260405230736_add_cli_version/migration.sql +41 -0
- package/prisma/migrations/20260406205546_add_model_counts/migration.sql +42 -0
- package/prisma/schema.prisma +16 -0
- package/prisma/schema.sql +20 -0
- /package/prisma/migrations/{20260401144555_add_system_prompt_edits → 20260403214556_init}/migration.sql +0 -0
|
@@ -89,6 +89,8 @@ export type SessionMinAggregateOutputType = {
|
|
|
89
89
|
userInterruptions: number | null
|
|
90
90
|
permissionModesJson: string | null
|
|
91
91
|
systemPromptEdits: number | null
|
|
92
|
+
cliVersion: string | null
|
|
93
|
+
modelCountsJson: string | null
|
|
92
94
|
createdAt: Date | null
|
|
93
95
|
}
|
|
94
96
|
|
|
@@ -119,6 +121,8 @@ export type SessionMaxAggregateOutputType = {
|
|
|
119
121
|
userInterruptions: number | null
|
|
120
122
|
permissionModesJson: string | null
|
|
121
123
|
systemPromptEdits: number | null
|
|
124
|
+
cliVersion: string | null
|
|
125
|
+
modelCountsJson: string | null
|
|
122
126
|
createdAt: Date | null
|
|
123
127
|
}
|
|
124
128
|
|
|
@@ -149,6 +153,8 @@ export type SessionCountAggregateOutputType = {
|
|
|
149
153
|
userInterruptions: number
|
|
150
154
|
permissionModesJson: number
|
|
151
155
|
systemPromptEdits: number
|
|
156
|
+
cliVersion: number
|
|
157
|
+
modelCountsJson: number
|
|
152
158
|
createdAt: number
|
|
153
159
|
_all: number
|
|
154
160
|
}
|
|
@@ -217,6 +223,8 @@ export type SessionMinAggregateInputType = {
|
|
|
217
223
|
userInterruptions?: true
|
|
218
224
|
permissionModesJson?: true
|
|
219
225
|
systemPromptEdits?: true
|
|
226
|
+
cliVersion?: true
|
|
227
|
+
modelCountsJson?: true
|
|
220
228
|
createdAt?: true
|
|
221
229
|
}
|
|
222
230
|
|
|
@@ -247,6 +255,8 @@ export type SessionMaxAggregateInputType = {
|
|
|
247
255
|
userInterruptions?: true
|
|
248
256
|
permissionModesJson?: true
|
|
249
257
|
systemPromptEdits?: true
|
|
258
|
+
cliVersion?: true
|
|
259
|
+
modelCountsJson?: true
|
|
250
260
|
createdAt?: true
|
|
251
261
|
}
|
|
252
262
|
|
|
@@ -277,6 +287,8 @@ export type SessionCountAggregateInputType = {
|
|
|
277
287
|
userInterruptions?: true
|
|
278
288
|
permissionModesJson?: true
|
|
279
289
|
systemPromptEdits?: true
|
|
290
|
+
cliVersion?: true
|
|
291
|
+
modelCountsJson?: true
|
|
280
292
|
createdAt?: true
|
|
281
293
|
_all?: true
|
|
282
294
|
}
|
|
@@ -394,6 +406,8 @@ export type SessionGroupByOutputType = {
|
|
|
394
406
|
userInterruptions: number
|
|
395
407
|
permissionModesJson: string
|
|
396
408
|
systemPromptEdits: number
|
|
409
|
+
cliVersion: string
|
|
410
|
+
modelCountsJson: string
|
|
397
411
|
createdAt: Date
|
|
398
412
|
_count: SessionCountAggregateOutputType | null
|
|
399
413
|
_avg: SessionAvgAggregateOutputType | null
|
|
@@ -447,6 +461,8 @@ export type SessionWhereInput = {
|
|
|
447
461
|
userInterruptions?: Prisma.IntFilter<"Session"> | number
|
|
448
462
|
permissionModesJson?: Prisma.StringFilter<"Session"> | string
|
|
449
463
|
systemPromptEdits?: Prisma.IntFilter<"Session"> | number
|
|
464
|
+
cliVersion?: Prisma.StringFilter<"Session"> | string
|
|
465
|
+
modelCountsJson?: Prisma.StringFilter<"Session"> | string
|
|
450
466
|
createdAt?: Prisma.DateTimeFilter<"Session"> | Date | string
|
|
451
467
|
}
|
|
452
468
|
|
|
@@ -477,6 +493,8 @@ export type SessionOrderByWithRelationInput = {
|
|
|
477
493
|
userInterruptions?: Prisma.SortOrder
|
|
478
494
|
permissionModesJson?: Prisma.SortOrder
|
|
479
495
|
systemPromptEdits?: Prisma.SortOrder
|
|
496
|
+
cliVersion?: Prisma.SortOrder
|
|
497
|
+
modelCountsJson?: Prisma.SortOrder
|
|
480
498
|
createdAt?: Prisma.SortOrder
|
|
481
499
|
}
|
|
482
500
|
|
|
@@ -510,6 +528,8 @@ export type SessionWhereUniqueInput = Prisma.AtLeast<{
|
|
|
510
528
|
userInterruptions?: Prisma.IntFilter<"Session"> | number
|
|
511
529
|
permissionModesJson?: Prisma.StringFilter<"Session"> | string
|
|
512
530
|
systemPromptEdits?: Prisma.IntFilter<"Session"> | number
|
|
531
|
+
cliVersion?: Prisma.StringFilter<"Session"> | string
|
|
532
|
+
modelCountsJson?: Prisma.StringFilter<"Session"> | string
|
|
513
533
|
createdAt?: Prisma.DateTimeFilter<"Session"> | Date | string
|
|
514
534
|
}, "id" | "sessionId">
|
|
515
535
|
|
|
@@ -540,6 +560,8 @@ export type SessionOrderByWithAggregationInput = {
|
|
|
540
560
|
userInterruptions?: Prisma.SortOrder
|
|
541
561
|
permissionModesJson?: Prisma.SortOrder
|
|
542
562
|
systemPromptEdits?: Prisma.SortOrder
|
|
563
|
+
cliVersion?: Prisma.SortOrder
|
|
564
|
+
modelCountsJson?: Prisma.SortOrder
|
|
543
565
|
createdAt?: Prisma.SortOrder
|
|
544
566
|
_count?: Prisma.SessionCountOrderByAggregateInput
|
|
545
567
|
_avg?: Prisma.SessionAvgOrderByAggregateInput
|
|
@@ -578,6 +600,8 @@ export type SessionScalarWhereWithAggregatesInput = {
|
|
|
578
600
|
userInterruptions?: Prisma.IntWithAggregatesFilter<"Session"> | number
|
|
579
601
|
permissionModesJson?: Prisma.StringWithAggregatesFilter<"Session"> | string
|
|
580
602
|
systemPromptEdits?: Prisma.IntWithAggregatesFilter<"Session"> | number
|
|
603
|
+
cliVersion?: Prisma.StringWithAggregatesFilter<"Session"> | string
|
|
604
|
+
modelCountsJson?: Prisma.StringWithAggregatesFilter<"Session"> | string
|
|
581
605
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Session"> | Date | string
|
|
582
606
|
}
|
|
583
607
|
|
|
@@ -608,6 +632,8 @@ export type SessionCreateInput = {
|
|
|
608
632
|
userInterruptions?: number
|
|
609
633
|
permissionModesJson?: string
|
|
610
634
|
systemPromptEdits?: number
|
|
635
|
+
cliVersion?: string
|
|
636
|
+
modelCountsJson?: string
|
|
611
637
|
createdAt?: Date | string
|
|
612
638
|
}
|
|
613
639
|
|
|
@@ -638,6 +664,8 @@ export type SessionUncheckedCreateInput = {
|
|
|
638
664
|
userInterruptions?: number
|
|
639
665
|
permissionModesJson?: string
|
|
640
666
|
systemPromptEdits?: number
|
|
667
|
+
cliVersion?: string
|
|
668
|
+
modelCountsJson?: string
|
|
641
669
|
createdAt?: Date | string
|
|
642
670
|
}
|
|
643
671
|
|
|
@@ -668,6 +696,8 @@ export type SessionUpdateInput = {
|
|
|
668
696
|
userInterruptions?: Prisma.IntFieldUpdateOperationsInput | number
|
|
669
697
|
permissionModesJson?: Prisma.StringFieldUpdateOperationsInput | string
|
|
670
698
|
systemPromptEdits?: Prisma.IntFieldUpdateOperationsInput | number
|
|
699
|
+
cliVersion?: Prisma.StringFieldUpdateOperationsInput | string
|
|
700
|
+
modelCountsJson?: Prisma.StringFieldUpdateOperationsInput | string
|
|
671
701
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
672
702
|
}
|
|
673
703
|
|
|
@@ -698,6 +728,8 @@ export type SessionUncheckedUpdateInput = {
|
|
|
698
728
|
userInterruptions?: Prisma.IntFieldUpdateOperationsInput | number
|
|
699
729
|
permissionModesJson?: Prisma.StringFieldUpdateOperationsInput | string
|
|
700
730
|
systemPromptEdits?: Prisma.IntFieldUpdateOperationsInput | number
|
|
731
|
+
cliVersion?: Prisma.StringFieldUpdateOperationsInput | string
|
|
732
|
+
modelCountsJson?: Prisma.StringFieldUpdateOperationsInput | string
|
|
701
733
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
702
734
|
}
|
|
703
735
|
|
|
@@ -728,6 +760,8 @@ export type SessionCreateManyInput = {
|
|
|
728
760
|
userInterruptions?: number
|
|
729
761
|
permissionModesJson?: string
|
|
730
762
|
systemPromptEdits?: number
|
|
763
|
+
cliVersion?: string
|
|
764
|
+
modelCountsJson?: string
|
|
731
765
|
createdAt?: Date | string
|
|
732
766
|
}
|
|
733
767
|
|
|
@@ -758,6 +792,8 @@ export type SessionUpdateManyMutationInput = {
|
|
|
758
792
|
userInterruptions?: Prisma.IntFieldUpdateOperationsInput | number
|
|
759
793
|
permissionModesJson?: Prisma.StringFieldUpdateOperationsInput | string
|
|
760
794
|
systemPromptEdits?: Prisma.IntFieldUpdateOperationsInput | number
|
|
795
|
+
cliVersion?: Prisma.StringFieldUpdateOperationsInput | string
|
|
796
|
+
modelCountsJson?: Prisma.StringFieldUpdateOperationsInput | string
|
|
761
797
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
762
798
|
}
|
|
763
799
|
|
|
@@ -788,6 +824,8 @@ export type SessionUncheckedUpdateManyInput = {
|
|
|
788
824
|
userInterruptions?: Prisma.IntFieldUpdateOperationsInput | number
|
|
789
825
|
permissionModesJson?: Prisma.StringFieldUpdateOperationsInput | string
|
|
790
826
|
systemPromptEdits?: Prisma.IntFieldUpdateOperationsInput | number
|
|
827
|
+
cliVersion?: Prisma.StringFieldUpdateOperationsInput | string
|
|
828
|
+
modelCountsJson?: Prisma.StringFieldUpdateOperationsInput | string
|
|
791
829
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
792
830
|
}
|
|
793
831
|
|
|
@@ -818,6 +856,8 @@ export type SessionCountOrderByAggregateInput = {
|
|
|
818
856
|
userInterruptions?: Prisma.SortOrder
|
|
819
857
|
permissionModesJson?: Prisma.SortOrder
|
|
820
858
|
systemPromptEdits?: Prisma.SortOrder
|
|
859
|
+
cliVersion?: Prisma.SortOrder
|
|
860
|
+
modelCountsJson?: Prisma.SortOrder
|
|
821
861
|
createdAt?: Prisma.SortOrder
|
|
822
862
|
}
|
|
823
863
|
|
|
@@ -866,6 +906,8 @@ export type SessionMaxOrderByAggregateInput = {
|
|
|
866
906
|
userInterruptions?: Prisma.SortOrder
|
|
867
907
|
permissionModesJson?: Prisma.SortOrder
|
|
868
908
|
systemPromptEdits?: Prisma.SortOrder
|
|
909
|
+
cliVersion?: Prisma.SortOrder
|
|
910
|
+
modelCountsJson?: Prisma.SortOrder
|
|
869
911
|
createdAt?: Prisma.SortOrder
|
|
870
912
|
}
|
|
871
913
|
|
|
@@ -896,6 +938,8 @@ export type SessionMinOrderByAggregateInput = {
|
|
|
896
938
|
userInterruptions?: Prisma.SortOrder
|
|
897
939
|
permissionModesJson?: Prisma.SortOrder
|
|
898
940
|
systemPromptEdits?: Prisma.SortOrder
|
|
941
|
+
cliVersion?: Prisma.SortOrder
|
|
942
|
+
modelCountsJson?: Prisma.SortOrder
|
|
899
943
|
createdAt?: Prisma.SortOrder
|
|
900
944
|
}
|
|
901
945
|
|
|
@@ -970,6 +1014,8 @@ export type SessionSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
|
|
970
1014
|
userInterruptions?: boolean
|
|
971
1015
|
permissionModesJson?: boolean
|
|
972
1016
|
systemPromptEdits?: boolean
|
|
1017
|
+
cliVersion?: boolean
|
|
1018
|
+
modelCountsJson?: boolean
|
|
973
1019
|
createdAt?: boolean
|
|
974
1020
|
}, ExtArgs["result"]["session"]>
|
|
975
1021
|
|
|
@@ -1000,6 +1046,8 @@ export type SessionSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Exten
|
|
|
1000
1046
|
userInterruptions?: boolean
|
|
1001
1047
|
permissionModesJson?: boolean
|
|
1002
1048
|
systemPromptEdits?: boolean
|
|
1049
|
+
cliVersion?: boolean
|
|
1050
|
+
modelCountsJson?: boolean
|
|
1003
1051
|
createdAt?: boolean
|
|
1004
1052
|
}, ExtArgs["result"]["session"]>
|
|
1005
1053
|
|
|
@@ -1030,6 +1078,8 @@ export type SessionSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Exten
|
|
|
1030
1078
|
userInterruptions?: boolean
|
|
1031
1079
|
permissionModesJson?: boolean
|
|
1032
1080
|
systemPromptEdits?: boolean
|
|
1081
|
+
cliVersion?: boolean
|
|
1082
|
+
modelCountsJson?: boolean
|
|
1033
1083
|
createdAt?: boolean
|
|
1034
1084
|
}, ExtArgs["result"]["session"]>
|
|
1035
1085
|
|
|
@@ -1060,10 +1110,12 @@ export type SessionSelectScalar = {
|
|
|
1060
1110
|
userInterruptions?: boolean
|
|
1061
1111
|
permissionModesJson?: boolean
|
|
1062
1112
|
systemPromptEdits?: boolean
|
|
1113
|
+
cliVersion?: boolean
|
|
1114
|
+
modelCountsJson?: boolean
|
|
1063
1115
|
createdAt?: boolean
|
|
1064
1116
|
}
|
|
1065
1117
|
|
|
1066
|
-
export type SessionOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "sessionId" | "project" | "projectPath" | "startTime" | "endTime" | "durationMinutes" | "userMessages" | "assistantMessages" | "totalMessages" | "inputTokens" | "outputTokens" | "cacheCreationTokens" | "cacheReadTokens" | "totalTokens" | "costUSD" | "model" | "toolCallsTotal" | "toolCallsJson" | "skillCallsJson" | "messageTimestamps" | "apiErrors" | "rateLimitErrors" | "userInterruptions" | "permissionModesJson" | "systemPromptEdits" | "createdAt", ExtArgs["result"]["session"]>
|
|
1118
|
+
export type SessionOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "sessionId" | "project" | "projectPath" | "startTime" | "endTime" | "durationMinutes" | "userMessages" | "assistantMessages" | "totalMessages" | "inputTokens" | "outputTokens" | "cacheCreationTokens" | "cacheReadTokens" | "totalTokens" | "costUSD" | "model" | "toolCallsTotal" | "toolCallsJson" | "skillCallsJson" | "messageTimestamps" | "apiErrors" | "rateLimitErrors" | "userInterruptions" | "permissionModesJson" | "systemPromptEdits" | "cliVersion" | "modelCountsJson" | "createdAt", ExtArgs["result"]["session"]>
|
|
1067
1119
|
|
|
1068
1120
|
export type $SessionPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
1069
1121
|
name: "Session"
|
|
@@ -1095,6 +1147,8 @@ export type $SessionPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
|
|
|
1095
1147
|
userInterruptions: number
|
|
1096
1148
|
permissionModesJson: string
|
|
1097
1149
|
systemPromptEdits: number
|
|
1150
|
+
cliVersion: string
|
|
1151
|
+
modelCountsJson: string
|
|
1098
1152
|
createdAt: Date
|
|
1099
1153
|
}, ExtArgs["result"]["session"]>
|
|
1100
1154
|
composites: {}
|
|
@@ -1545,6 +1599,8 @@ export interface SessionFieldRefs {
|
|
|
1545
1599
|
readonly userInterruptions: Prisma.FieldRef<"Session", 'Int'>
|
|
1546
1600
|
readonly permissionModesJson: Prisma.FieldRef<"Session", 'String'>
|
|
1547
1601
|
readonly systemPromptEdits: Prisma.FieldRef<"Session", 'Int'>
|
|
1602
|
+
readonly cliVersion: Prisma.FieldRef<"Session", 'String'>
|
|
1603
|
+
readonly modelCountsJson: Prisma.FieldRef<"Session", 'String'>
|
|
1548
1604
|
readonly createdAt: Prisma.FieldRef<"Session", 'DateTime'>
|
|
1549
1605
|
}
|
|
1550
1606
|
|