diff options
author | A.J. Shulman <Shulman.aj@gmail.com> | 2024-08-15 13:16:32 -0400 |
---|---|---|
committer | A.J. Shulman <Shulman.aj@gmail.com> | 2024-08-15 13:16:32 -0400 |
commit | 6f9b8f9b393d411a17f7954b6cc36618efe698e2 (patch) | |
tree | 8090d9d0bafdfe3e97b8fd8914da9d1264e4172c /src/client/views/nodes/ChatBox/ChunkManager.ts | |
parent | 0c8001c61a55540cdeeb6ae249fdd2835580121c (diff) |
implemented search tool and other tools but scraping doesn't work
Diffstat (limited to 'src/client/views/nodes/ChatBox/ChunkManager.ts')
-rw-r--r-- | src/client/views/nodes/ChatBox/ChunkManager.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/client/views/nodes/ChatBox/ChunkManager.ts b/src/client/views/nodes/ChatBox/ChunkManager.ts new file mode 100644 index 000000000..64c073640 --- /dev/null +++ b/src/client/views/nodes/ChatBox/ChunkManager.ts @@ -0,0 +1,24 @@ +import { SimplifiedChunk } from './types'; + +class ChunkManager { + private chunks: SimplifiedChunk[]; + + constructor() { + this.chunks = []; + } + + addChunk(chunk: SimplifiedChunk) { + this.chunks.push(chunk); + } + + removeChunk(chunk: SimplifiedChunk) { + const index = this.chunks.indexOf(chunk); + if (index !== -1) { + this.chunks.splice(index, 1); + } + } + + getChunks() { + return this.chunks; + } +} |