wormclaude 1.0.39 → 1.0.40
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/dist/theme.js +1 -1
- package/dist/tui.js +9 -2
- package/package.json +1 -1
package/dist/theme.js
CHANGED
package/dist/tui.js
CHANGED
|
@@ -41,7 +41,14 @@ const vis = (s) => stringWidth(s.replace(/\x1b\[[0-9;]*m/g, ''));
|
|
|
41
41
|
export async function runTui() {
|
|
42
42
|
const config = loadConfig();
|
|
43
43
|
let account = { plan: '', email: '', name: '' };
|
|
44
|
-
|
|
44
|
+
// Ortam bağlamı (Windows/cwd) — model DOĞRU yol/komut kullansın (yoksa /home/user gibi yanlış yol yazar).
|
|
45
|
+
const _plat = process.platform === 'win32' ? 'Windows' : process.platform === 'darwin' ? 'macOS' : 'Linux';
|
|
46
|
+
const _winNote = process.platform === 'win32'
|
|
47
|
+
? ' This is WINDOWS. Write files to the CURRENT directory (relative paths) or under C:\\Users\\... — NEVER use /home/user or other Unix paths. The Bash tool runs via cmd.exe (use Windows commands).'
|
|
48
|
+
: ' Use POSIX paths.';
|
|
49
|
+
const history = [
|
|
50
|
+
{ role: 'system', content: `ENVIRONMENT: The user machine runs ${_plat}. Current working directory: ${process.cwd()}.${_winNote}` },
|
|
51
|
+
];
|
|
45
52
|
const displayItems = [{ kind: 'banner' }];
|
|
46
53
|
let inputBuf = '', busy = false, streamChars = 0, spin = 0;
|
|
47
54
|
const SPIN = ['·', '✢', '✳', '✶', '✻', '✽', '✶', '✳', '✢'];
|
|
@@ -71,7 +78,7 @@ export async function runTui() {
|
|
|
71
78
|
let body;
|
|
72
79
|
if (perm) {
|
|
73
80
|
// İzin dialogu: araç adı + Evet/Tümü/Hayır
|
|
74
|
-
const q = paint('
|
|
81
|
+
const q = paint(' İZİN ', theme.redBright, true) + paint(perm.label, theme.white) + paint(' çalıştırılsın mı?', theme.grey);
|
|
75
82
|
const opts = paint(' [E] Evet', theme.redBright, true) + paint(' · ', theme.greyDim)
|
|
76
83
|
+ paint('[T] Tümüne izin', theme.grey) + paint(' · ', theme.greyDim) + paint('[H] Hayır', theme.grey);
|
|
77
84
|
body = [line, q, opts, line];
|