dhti-cli 1.3.3 → 1.3.6

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/README.md CHANGED
@@ -116,7 +116,8 @@ You will see the new **patient context aware chatbot** in the patient summary pa
116
116
  * [CDS Hooks Sandbox for testing](https://github.com/dermatologist/cds-hooks-sandbox)
117
117
 
118
118
  ## Presentations
119
- ⭐️ **Pitched at [Falling Walls Lab Illinois](https://falling-walls.com/falling-walls-lab-illinois) and released on 2025-09-12.**
119
+ * ⭐️ **Pitched at the [Falling Walls Lab Illinois](https://falling-walls.com/falling-walls-lab-illinois) and released on 2025-09-12.**
120
+ * ⭐️ **Version 1 will be introduced at the [Medical Informatics Europe Conference 2026 (Genoa, Italy)](https://mie2026.efmi.org/), taking place May 26-28, 2026.**
120
121
 
121
122
  ## 🔧 What problems do DHTI solve?
122
123
 
@@ -17,6 +17,7 @@ export default class Copilot extends Command {
17
17
  run(): Promise<void>;
18
18
  /**
19
19
  * Clears the conversation history
20
+ * @returns void
20
21
  */
21
22
  private clearConversationHistory;
22
23
  /**
@@ -50,6 +51,7 @@ export default class Copilot extends Command {
50
51
  /**
51
52
  * Saves conversation history to file
52
53
  * @param history - Array of conversation turns to save
54
+ * @returns void
53
55
  */
54
56
  private saveConversationHistory;
55
57
  }
@@ -1,4 +1,3 @@
1
- import { CopilotClient } from '@github/copilot-sdk';
2
1
  import { Command, Flags } from '@oclif/core';
3
2
  import chalk from 'chalk';
4
3
  import fs from 'node:fs';
@@ -124,14 +123,20 @@ export default class Copilot extends Command {
124
123
  systemMessageContent += 'Continue the conversation naturally based on this context.';
125
124
  }
126
125
  this.log(chalk.green('Initializing GitHub Copilot SDK...'));
126
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
127
127
  let client = null;
128
128
  let assistantResponse = '';
129
129
  try {
130
+ // Dynamically import CopilotClient to avoid module resolution issues during manifest generation
131
+ const { CopilotClient } = await import('@github/copilot-sdk');
130
132
  // Create copilot client
131
133
  client = new CopilotClient();
132
134
  // Create a session with streaming enabled
133
135
  const session = await client.createSession({
134
136
  model: flags.model,
137
+ onPermissionRequest: async () => ({
138
+ kind: 'approved',
139
+ }),
135
140
  streaming: true,
136
141
  systemMessage: {
137
142
  content: systemMessageContent,
@@ -143,6 +148,7 @@ export default class Copilot extends Command {
143
148
  this.log(chalk.blue('\n--- Copilot Response ---\n'));
144
149
  // Handle streaming responses
145
150
  let responseStarted = false;
151
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
146
152
  session.on('assistant.message_delta', (event) => {
147
153
  if (!responseStarted) {
148
154
  responseStarted = true;
@@ -152,6 +158,7 @@ export default class Copilot extends Command {
152
158
  assistantResponse += content;
153
159
  });
154
160
  // Handle session errors
161
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
155
162
  session.on('session.error', (error) => {
156
163
  this.warn(chalk.yellow(`Session error: ${error}`));
157
164
  });
@@ -205,6 +212,7 @@ export default class Copilot extends Command {
205
212
  }
206
213
  /**
207
214
  * Clears the conversation history
215
+ * @returns void
208
216
  */
209
217
  clearConversationHistory() {
210
218
  try {
@@ -327,6 +335,7 @@ export default class Copilot extends Command {
327
335
  /**
328
336
  * Saves conversation history to file
329
337
  * @param history - Array of conversation turns to save
338
+ * @returns void
330
339
  */
331
340
  saveConversationHistory(history) {
332
341
  try {
@@ -893,5 +893,5 @@
893
893
  ]
894
894
  }
895
895
  },
896
- "version": "1.3.3"
896
+ "version": "1.3.6"
897
897
  }
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "dhti-cli",
3
3
  "description": "DHTI CLI",
4
- "version": "1.3.3",
4
+ "version": "1.3.6",
5
5
  "author": "Bell Eapen",
6
6
  "bin": {
7
7
  "dhti-cli": "bin/run.js"
8
8
  },
9
9
  "bugs": "https://github.com/dermatologist/dhti/issues",
10
10
  "dependencies": {
11
- "@github/copilot-sdk": "^0.1.23",
11
+ "@github/copilot-sdk": "0.1.30",
12
12
  "@langchain/community": "^0.3.53",
13
13
  "@langchain/ollama": "^0.2.3",
14
14
  "@oclif/core": "^4",