bingocode 1.1.193 → 1.1.195

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": "bingocode",
3
- "version": "1.1.193",
3
+ "version": "1.1.195",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "claude": "bin/claude-win.cjs",
@@ -1,6 +1,9 @@
1
- import * as React from 'react'
2
1
  import type { LocalJSXCommandContext } from '../../commands.js'
3
2
  import type { LocalJSXCommandOnDone } from '../../types/command.js'
3
+ import {
4
+ type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
5
+ logEvent,
6
+ } from '../../services/analytics/index.js'
4
7
  import { logError } from '../../utils/log.js'
5
8
  import { updateSettingsForSource } from '../../utils/settings/settings.js'
6
9
 
@@ -8,18 +11,18 @@ export async function call(
8
11
  onDone: LocalJSXCommandOnDone,
9
12
  context: LocalJSXCommandContext,
10
13
  args?: string,
11
- ): Promise<React.ReactNode | null> {
14
+ ): Promise<null> {
12
15
  try {
13
- const arg = args?.trim().toLowerCase()
16
+ const arg = (args ?? '').trim().toLowerCase()
14
17
  const enable = arg !== 'off'
15
18
 
16
- // Persist to disk
17
19
  const result = updateSettingsForSource('userSettings', { execMode: enable })
18
20
  if (result.error) {
19
21
  logError(result.error)
22
+ onDone(`Failed to ${enable ? 'enable' : 'disable'} Exec Mode: ${result.error.message}`, { display: 'system' })
23
+ return null
20
24
  }
21
25
 
22
- // Update AppState to trigger React re-render (like /fast does)
23
26
  if (enable) {
24
27
  context.setAppState(prev => ({ ...prev, execMode: true }))
25
28
  onDone('✓ Exec Mode enabled', { display: 'system' })
@@ -27,10 +30,16 @@ export async function call(
27
30
  context.setAppState(prev => ({ ...prev, execMode: false }))
28
31
  onDone('✗ Exec Mode disabled', { display: 'system' })
29
32
  }
33
+
34
+ logEvent('tengu_exec_mode_toggled', {
35
+ enabled: enable,
36
+ source: 'shortcut' as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
37
+ })
38
+
30
39
  return null
31
40
  } catch (e) {
32
- logError(e instanceof Error ? e : new Error(String(e)))
33
- onDone(`Exec command error: ${String(e)}`, { display: 'system' })
41
+ logError(e)
42
+ onDone(`Error: ${String(e)}`, { display: 'system' })
34
43
  return null
35
44
  }
36
45
  }
@@ -1,44 +1,16 @@
1
1
  import type { Command } from '../../commands.js'
2
- import { logError } from '../../utils/log.js'
3
- import { updateSettingsForSource } from '../../utils/settings/settings.js'
4
2
 
5
- const exec: Command = {
3
+ const exec = {
6
4
  type: 'local-jsx',
7
5
  name: 'exec',
8
6
  description:
9
7
  'Enable execution policy — dispatch-first, context protection, compressed output',
8
+ availability: ['claude-ai', 'console'],
10
9
  aliases: ['executor'],
11
10
  argumentHint: '[off]',
12
11
  isEnabled: () => true,
13
12
  immediate: true,
14
- async load() {
15
- return {
16
- async call(onDone, context, args) {
17
- try {
18
- const arg = String(args ?? '').trim().toLowerCase()
19
- const enable = arg !== 'off'
20
-
21
- const result = updateSettingsForSource('userSettings', { execMode: enable })
22
- if (result.error) {
23
- logError(result.error)
24
- }
25
-
26
- if (enable) {
27
- context.setAppState(prev => ({ ...prev, execMode: true }))
28
- onDone('✓ Exec Mode enabled', { display: 'system' })
29
- } else {
30
- context.setAppState(prev => ({ ...prev, execMode: false }))
31
- onDone('✗ Exec Mode disabled', { display: 'system' })
32
- }
33
- return null
34
- } catch (e) {
35
- logError(e instanceof Error ? e : new Error(String(e)))
36
- onDone(`Error: ${String(e)}`, { display: 'system' })
37
- return null
38
- }
39
- },
40
- }
41
- },
42
- }
13
+ load: () => import('./exec.js'),
14
+ } satisfies Command
43
15
 
44
16
  export default exec
@@ -2328,7 +2328,7 @@ function buildBorderText(showFastIcon: boolean, showFastIconHint: boolean, fastM
2328
2328
  segments.push(showFastIconHint ? `${getFastIconString(true, fastModeCooldown)} ${chalk.dim('/fast')}` : getFastIconString(true, fastModeCooldown))
2329
2329
  }
2330
2330
  if (isExecMode) {
2331
- segments.push(chalk.yellow('» EXEC'))))
2331
+ segments.push(chalk.yellow('» EXEC'))
2332
2332
  }
2333
2333
  return { content: ` ${segments.join(' ')} `, position: 'top', align: 'end', offset: 0 }
2334
2334
  }
@@ -1,34 +0,0 @@
1
- {
2
- "tasks": [
3
- {
4
- "id": "274f11cf",
5
- "cron": "0 9 * * *",
6
- "prompt": "test prompt",
7
- "createdAt": 1782997215925,
8
- "recurring": true,
9
- "name": "test-name",
10
- "description": "test description",
11
- "folder": "/test/folder",
12
- "model": "claude-opus-4-7",
13
- "permissionMode": "ask",
14
- "worktree": false,
15
- "frequency": "daily",
16
- "scheduledTime": "09:00"
17
- },
18
- {
19
- "id": "1c4152a1",
20
- "cron": "0 9 * * *",
21
- "prompt": "test prompt",
22
- "createdAt": 1782998699654,
23
- "recurring": true,
24
- "name": "test-name",
25
- "description": "test description",
26
- "folder": "/test/folder",
27
- "model": "claude-opus-4-7",
28
- "permissionMode": "ask",
29
- "worktree": false,
30
- "frequency": "daily",
31
- "scheduledTime": "09:00"
32
- }
33
- ]
34
- }
@@ -1,14 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(bun run:*)",
5
- "Bash(powershell -Command \"Get-ChildItem -Path C:\\\\Users\\\\qi.lin\\\\AppData\\\\Roaming\\\\npm -Recurse -Filter ''CliMenuManager.tsx'' 2>$null | Select-Object -ExpandProperty FullName\")",
6
- "Bash(powershell -Command \"Get-ChildItem -Path ''C:\\\\Users\\\\qi.lin\\\\AppData\\\\Roaming\\\\npm\\\\node_modules'' -Recurse -Filter ''CliMenuManager.js'' 2>$null | Select-Object -ExpandProperty FullName\")",
7
- "Read(//c/Users/qi.lin/AppData/Roaming/npm/**)",
8
- "Bash(find C:Usersqi.linAppDataRoamingnpmnode_modulesbingocode -name *.tsx -o -name *.ts)",
9
- "Bash(python3 -c \"import json; d = json.load\\(open\\(r''C:\\\\Users\\\\qi.lin\\\\.claude\\\\bingo\\\\settings.json''\\)\\); print\\(json.dumps\\(d, indent=2\\)\\)\")",
10
- "Bash(python3 -c \"import json,sys; d=json.load\\(sys.stdin\\); print\\(''''cachedGrowthBookFeatures keys:'''', list\\(d.get\\(''''cachedGrowthBookFeatures'''',{}\\)\\)\\)\")",
11
- "Bash(node -e \"const d=JSON.parse\\(require\\(''''fs''''\\).readFileSync\\(''''/dev/stdin'''',''''utf8''''\\)\\); console.log\\(''''cachedGrowthBookFeatures keys:'''', Object.keys\\(d.cachedGrowthBookFeatures||{}\\)\\); const ac = d.cachedGrowthBookFeatures?.[''''tengu_auto_mode_config'''']; console.log\\(''''tengu_auto_mode_config:'''', JSON.stringify\\(ac\\)\\)\")"
12
- ]
13
- }
14
- }