codecane 1.0.409 → 1.0.411

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.
Files changed (2) hide show
  1. package/index.js +6 -22
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -171,7 +171,6 @@ async function downloadBinary(version) {
171
171
  const totalSize = parseInt(res.headers['content-length'] || '0', 10)
172
172
  let downloadedSize = 0
173
173
  let lastProgressTime = Date.now()
174
- let lastDownloadedSize = 0
175
174
 
176
175
  const chunks = []
177
176
 
@@ -181,25 +180,22 @@ async function downloadBinary(version) {
181
180
 
182
181
  const now = Date.now()
183
182
  if (now - lastProgressTime >= 100 || downloadedSize === totalSize) {
184
- const elapsedSeconds = (now - lastProgressTime) / 1000
185
- const bytesThisInterval = downloadedSize - lastDownloadedSize
186
- const speed = bytesThisInterval / elapsedSeconds
187
-
188
183
  lastProgressTime = now
189
- lastDownloadedSize = downloadedSize
190
184
 
191
185
  if (totalSize > 0) {
192
186
  const percentage = Math.round((downloadedSize / totalSize) * 100)
193
187
  const progressBar = createProgressBar(percentage)
194
- // const sizeInfo = `${formatBytes(downloadedSize)}/${formatBytes(totalSize)}`
195
- const speedInfo = speed > 0 ? formatSpeed(speed) : ''
196
188
 
197
- term.write(`Downloading... ${progressBar} ${percentage}% ${speedInfo}`)
189
+ term.write(
190
+ `Downloading... ${progressBar} ${percentage}% of ${formatBytes(totalSize)}`
191
+ )
198
192
  } else {
199
193
  term.write(`Downloading... ${formatBytes(downloadedSize)}`)
200
194
  }
201
195
  }
202
196
  }
197
+ term.clearLine()
198
+ console.log('Download complete!')
203
199
 
204
200
  term.write('Extracting...')
205
201
 
@@ -230,8 +226,7 @@ async function downloadBinary(version) {
230
226
  )
231
227
  }
232
228
 
233
- // Clear the line after successful download
234
- term.clearLine()
229
+ term.write('Starting Codebuff...')
235
230
  } catch (error) {
236
231
  term.clearLine()
237
232
  console.error(`Extraction failed: ${error.message}`)
@@ -257,17 +252,6 @@ async function ensureBinaryExists() {
257
252
  process.exit(1)
258
253
  }
259
254
  }
260
-
261
- // Verify binary is executable (Unix only)
262
- if (process.platform !== 'win32') {
263
- try {
264
- fs.accessSync(CONFIG.binaryPath, fs.constants.X_OK)
265
- } catch (error) {
266
- console.error(`❌ Binary is not executable: ${CONFIG.binaryPath}`)
267
- console.error('Run: chmod +x', CONFIG.binaryPath)
268
- process.exit(1)
269
- }
270
- }
271
255
  }
272
256
 
273
257
  async function checkForUpdates(runningProcess, exitListener) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codecane",
3
- "version": "1.0.409",
3
+ "version": "1.0.411",
4
4
  "description": "AI coding agent",
5
5
  "license": "MIT",
6
6
  "bin": {