btca-server 1.0.87 → 1.0.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btca-server",
3
- "version": "1.0.87",
3
+ "version": "1.0.89",
4
4
  "description": "BTCA server for answering questions about your codebase using OpenCode AI",
5
5
  "author": "Ben Davis",
6
6
  "license": "MIT",
@@ -152,8 +152,16 @@ export namespace VirtualFs {
152
152
  return getInstance(vfsId).readFileBuffer(normalize(filePath));
153
153
  }
154
154
 
155
- export async function writeFile(filePath: string, data: string | Uint8Array, vfsId?: string) {
156
- await getInstance(vfsId).writeFile(normalize(filePath), data);
155
+ export async function writeFile(
156
+ filePath: string,
157
+ data: string | ArrayBufferView,
158
+ vfsId?: string
159
+ ) {
160
+ const content =
161
+ typeof data === 'string'
162
+ ? data
163
+ : new Uint8Array(data.buffer as ArrayBufferLike, data.byteOffset, data.byteLength);
164
+ await getInstance(vfsId).writeFile(normalize(filePath), content);
157
165
  }
158
166
 
159
167
  export async function symlink(targetPath: string, linkPath: string, vfsId?: string) {