fix: add text sanitization function to clean user and assistant messages of new parts object
- Introduced a `sanitizeText` function to remove specific HTML elements and content from messages, enhancing the integrity of the streamed text. - Updated the `streamText` function to utilize `sanitizeText` for both user and assistant messages, ensuring consistent message formatting. - Adjusted message processing to maintain the structure while applying sanitization.
This commit is contained in:
@@ -597,7 +597,11 @@ export class FilesStore {
|
||||
|
||||
// Set up file watcher
|
||||
webcontainer.internal.watchPaths(
|
||||
{ include: [`${WORK_DIR}/**`], exclude: ['**/node_modules', '.git'], includeContent: true },
|
||||
{
|
||||
include: [`${WORK_DIR}/**`],
|
||||
exclude: ['**/node_modules', '.git', '**/package-lock.json'],
|
||||
includeContent: true,
|
||||
},
|
||||
bufferWatchEvents(100, this.#processEventBuffer.bind(this)),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user