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 {
9191 )
9292 )
9393 }
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+ */
95103 public async countTotalNumberOfCodeBlocks ( message : string ) : Promise < number > {
104+ //TODO: remove this when moved to server-side.
96105 if ( message === undefined ) {
97106 return 0
98107 }
99108
100- // // To Convert Markdown text to HTML using marked library
109+ // To Convert Markdown text to HTML using marked library
101110 const html = await marked ( message )
102111
103112 const dom = new JSDOM ( html )
You can’t perform that action at this time.
0 commit comments