File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
packages/core/src/codewhispererChat/controllers/chat/messenger Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -91,13 +91,22 @@ export class Messenger {
91
91
)
92
92
)
93
93
}
94
-
94
+ /**
95
+ * Tries to calculate the total number of code blocks.
96
+ * NOTES:
97
+ * - Not correct on all examples. Some may cause it to return 0 unexpectedly.
98
+ * - Plans in place (as of 4/22/2024) to move this server side.
99
+ * - See original pr: https://github.com/aws/aws-toolkit-vscode/pull/4761 for more details.
100
+ * @param message raw message response from codewhisperer client.
101
+ * @returns count of multi-line code blocks in response.
102
+ */
95
103
public async countTotalNumberOfCodeBlocks ( message : string ) : Promise < number > {
104
+ //TODO: remove this when moved to server-side.
96
105
if ( message === undefined ) {
97
106
return 0
98
107
}
99
108
100
- // // To Convert Markdown text to HTML using marked library
109
+ // To Convert Markdown text to HTML using marked library
101
110
const html = await marked ( message )
102
111
103
112
const dom = new JSDOM ( html )
You can’t perform that action at this time.
0 commit comments