Skip to content

Commit 3a3c429

Browse files
committed
Address CR comments
1 parent e18573c commit 3a3c429

File tree

3 files changed

+18
-22
lines changed

3 files changed

+18
-22
lines changed

.vscode/launch.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@
4242
]
4343
},
4444
{
45-
"name": "Run Tests",
46-
"type": "extensionHost",
47-
"request": "launch",
48-
"runtimeExecutable": "${execPath}",
49-
"args": [
50-
"${workspaceFolder}/out/test/suite", // TODO: remove suite
51-
"--disable-extensions",
52-
"--extensionDevelopmentPath=${workspaceFolder}",
53-
"--extensionTestsPath=${workspaceFolder}/out/test/suite"
54-
],
55-
"outFiles": ["${workspaceFolder}/out/**/*.js"],
56-
"preLaunchTask": "npm: compile:extension",
57-
}
45+
"name": "Run Tests",
46+
"type": "extensionHost",
47+
"request": "launch",
48+
"runtimeExecutable": "${execPath}",
49+
"args": [
50+
"${workspaceFolder}/out/test/suite", // TODO: VSCODE-641 - remove suite
51+
"--disable-extensions",
52+
"--extensionDevelopmentPath=${workspaceFolder}",
53+
"--extensionTestsPath=${workspaceFolder}/out/test/suite"
54+
],
55+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
56+
"preLaunchTask": "npm: compile:extension",
57+
}
5858
],
5959
"compounds": [
6060
{

src/participant/participant.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { LoadedConnection } from '../storage/connectionStorage';
1010
import EXTENSION_COMMANDS from '../commands';
1111
import type { StorageController } from '../storage';
1212
import { StorageVariables } from '../storage';
13-
import { Prompts } from './prompts';
13+
import { getContentLength, Prompts } from './prompts';
1414
import type { ChatResult } from './constants';
1515
import {
1616
askToConnectChatResult,
@@ -189,7 +189,7 @@ export default class ParticipantController {
189189
(message: vscode.LanguageModelChatMessage) =>
190190
util.inspect({
191191
role: message.role,
192-
contentLength: Prompts.getContentLength(message),
192+
contentLength: getContentLength(message),
193193
})
194194
),
195195
});

src/participant/prompts/index.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import { IntentPrompt } from './intent';
55
import { NamespacePrompt } from './namespace';
66
import { QueryPrompt } from './query';
77
import { SchemaPrompt } from './schema';
8-
import { isContentEmpty, getContentLength } from './promptBase';
8+
import { isContentEmpty } from './promptBase';
9+
10+
export { getContentLength } from './promptBase';
911

1012
export class Prompts {
1113
public static generic = new GenericPrompt();
@@ -35,10 +37,4 @@ export class Prompts {
3537

3638
return false;
3739
}
38-
39-
public static getContentLength(
40-
message: vscode.LanguageModelChatMessage
41-
): number {
42-
return getContentLength(message);
43-
}
4440
}

0 commit comments

Comments
 (0)