@anh3d0nic/qwen-code-termux-ice 20.0.0 → 20.0.2

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/bin/qwen-ice CHANGED
@@ -74,7 +74,7 @@ function loadSessionMemory() {
74
74
  function loadQualityHistory() {
75
75
  try {
76
76
  if (fs.existsSync(QUALITY_HISTORY_FILE)) {
77
- return JSON.parse(fs.readFileSync(QUALITY_HISTORY_FILE, 'utf8'));
77
+ const data = JSON.parse(fs.readFileSync(QUALITY_HISTORY_FILE, 'utf8')); return Array.isArray(data) ? { scores: data } : data;
78
78
  }
79
79
  } catch (err) {}
80
80
  return { scores: [] };
@@ -105,7 +105,7 @@ function printVersion() {
105
105
 
106
106
  const providers = [...new Set((config.keys || []).map(k => k.provider))];
107
107
  const avgQuality = quality.scores.length > 0
108
- ? (quality.scores.reduce((a, b) => a + b, 0) / quality.scores.length).toFixed(1)
108
+ ? (quality.scores.reduce((a, b) => a + (b.score || b), 0) / quality.scores.length).toFixed(1)
109
109
  : 'N/A';
110
110
 
111
111
  console.log(`
@@ -158,7 +158,7 @@ function printStatus() {
158
158
  const summary = loadSessionSummary();
159
159
 
160
160
  const avgQuality = quality.scores.length > 0
161
- ? (quality.scores.reduce((a, b) => a + b, 0) / quality.scores.length).toFixed(1)
161
+ ? (quality.scores.reduce((a, b) => a + (b.score || b), 0) / quality.scores.length).toFixed(1)
162
162
  : 'N/A';
163
163
 
164
164
  const getDirSize = (dir) => {
@@ -266,7 +266,7 @@ function printColdStart() {
266
266
  const summary = loadSessionSummary();
267
267
 
268
268
  const avgQuality = quality.scores.length > 0
269
- ? (quality.scores.reduce((a, b) => a + b, 0) / quality.scores.length).toFixed(1)
269
+ ? (quality.scores.reduce((a, b) => a + (b.score || b), 0) / quality.scores.length).toFixed(1)
270
270
  : 'N/A';
271
271
 
272
272
  const patternsCount = memory.patterns?.length || 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anh3d0nic/qwen-code-termux-ice",
3
- "version": "20.0.0",
3
+ "version": "20.0.2",
4
4
  "description": "Qwen Code ICE v16.0.5 — Compounding Intelligence with proper npm install structure",
5
5
  "main": "core/ice-v16.js",
6
6
  "bin": {
@@ -29,6 +29,7 @@ const DIRS = [
29
29
  // Files to copy from package to install dir
30
30
  const FILES_TO_COPY = [
31
31
  { src: 'scripts/ice-v15.js', dest: 'core/ice-v15.js' },
32
+ { src: 'scripts/api-caller.js', dest: 'core/api-caller.js' },
32
33
  { src: 'scripts/ice-v14.js', dest: 'core/ice-v14.js' },
33
34
  { src: 'scripts/ice-v13.js', dest: 'core/ice-v13.js' },
34
35
  { src: 'bin/qwen-ice', dest: 'bin/qwen-ice' },