@@ -2,50 +2,86 @@ import { io } from 'socket.io-client';
22import AIClient , { Callbacks } from './aiClient' ;
33import { getConfiguration } from './loadConfiguration' ;
44
5+ /**
6+ * When a conversation is created, the AppMap service reports the permissions assigned to the user,
7+ * directly or through an organization to which they belong.
8+ */
59export type Permissions = {
610 useNavieAIProxy : boolean ;
711} ;
812
13+ /**
14+ * An activity record for the user, indicating how many conversations were created over a given
15+ * time period.
16+ */
917export type ConversationCount = {
1018 daysAgo : number ;
1119 count : number ;
1220} ;
1321
22+ /**
23+ * The usage report for a given user, which is reported back to the user when a conversation is
24+ * created.
25+ */
1426export type Usage = {
1527 conversationCounts : ConversationCount [ ] ;
1628} ;
1729
30+ /**
31+ * Model parameters are reported to the AppMap service when a conversation is created.
32+ */
1833export type ModelParameters = {
1934 baseUrl ?: string ;
2035 model ?: string ;
2136 aiKeyName ?: string ;
2237} ;
2338
39+ /**
40+ * Project directory information is reported to the AppMap service when a conversation is created.
41+ */
2442export type ProjectDirectory = {
2543 hasAppMapConfig : boolean ;
2644 language ?: string ;
2745} ;
2846
47+ /**
48+ * The parameters for a project, which are reported to the AppMap service when a conversation is
49+ * created.
50+ */
2951export type ProjectParameters = {
3052 directoryCount : number ;
3153 codeEditor ?: string ;
3254 directories : ProjectDirectory [ ] ;
3355} ;
3456
57+ /**
58+ * A specific product to which the user is subscribed.
59+ */
3560export type SubscriptionItem = {
3661 productName : string ;
3762} ;
3863
64+ /**
65+ * A record of all subscriptions for a given user, along with the date on which they were first
66+ * enrolled.
67+ */
3968export type Subscription = {
4069 enrollmentDate : Date ;
4170 subscriptions : SubscriptionItem [ ] ;
4271} ;
4372
73+ /**
74+ * These parameters are passed from Navie Client to the Navie Service when a new conversation is
75+ * created.
76+ */
4477export type CreateConversationThread = {
4578 modelParameters : ModelParameters ;
4679 projectParameters : ProjectParameters ;
4780} ;
4881
82+ /**
83+ * This information is reported back to the Navie Client when a conversation is created.
84+ */
4985export type ConversationThread = {
5086 id : string ;
5187 permissions : Permissions ;
@@ -71,6 +107,17 @@ export type CreateUserMessage = {
71107 codeSelectionLength ?: number ;
72108} ;
73109
110+ /**
111+ * When a user message is reported to the AppMap service, the agent name (aka command name) and
112+ * automatically assigned classifications are reported.
113+ *
114+ * The agent name will be one of the published Navie commands, such as @explain, @diagram, @plan,
115+ * @generate , @test, @search, @review, and @help.
116+ *
117+ * Classifications are question categories that are assigned by Navie to help the AI respond
118+ * in the most appropriate way. Classifications are single words like overview, architecture,
119+ * troubleshoot, feature, generate-diagram, generate-code, explain, and help.
120+ */
74121export type UpdateUserMessage = {
75122 agentName ?: string ;
76123 classification ?: Classification [ ] ;
0 commit comments