snow-ai 0.4.13 → 0.4.15

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/cli.js CHANGED
@@ -36,10 +36,11 @@ let execAsync;
36
36
  // Check for updates asynchronously
37
37
  async function checkForUpdates(currentVersion) {
38
38
  try {
39
- const { stdout } = await execAsync('npm view snow-ai version', {
39
+ const { stdout } = await execAsync('npm view snow-ai version --registry https://registry.npmjs.org', {
40
40
  encoding: 'utf8',
41
41
  });
42
42
  const latestVersion = stdout.trim();
43
+ // Simple string comparison - force registry fetch ensures no cache issues
43
44
  if (latestVersion && latestVersion !== currentVersion) {
44
45
  console.log('\nšŸ”” Update available!');
45
46
  console.log(` Current version: ${currentVersion}`);
@@ -94,6 +94,8 @@ export default function ChatScreen({ skipWelcome }) {
94
94
  useEffect(() => {
95
95
  pendingMessagesRef.current = pendingMessages;
96
96
  }, [pendingMessages]);
97
+ // Track if commands are loaded
98
+ const [commandsLoaded, setCommandsLoaded] = useState(false);
97
99
  // Load commands dynamically to avoid blocking initial render
98
100
  useEffect(() => {
99
101
  // Use Promise.all to load all commands in parallel
@@ -113,8 +115,14 @@ export default function ChatScreen({ skipWelcome }) {
113
115
  import('../../utils/commands/agent.js'),
114
116
  import('../../utils/commands/todoPicker.js'),
115
117
  import('../../utils/commands/help.js'),
116
- ]).catch(error => {
118
+ ])
119
+ .then(() => {
120
+ setCommandsLoaded(true);
121
+ })
122
+ .catch(error => {
117
123
  console.error('Failed to load commands:', error);
124
+ // Still mark as loaded to allow app to continue
125
+ setCommandsLoaded(true);
118
126
  });
119
127
  }, []);
120
128
  // Auto-start codebase indexing on mount if enabled
@@ -371,6 +379,10 @@ export default function ChatScreen({ skipWelcome }) {
371
379
  processMessage: (message, images, useBasicModel, hideUserMessage) => processMessageRef.current?.(message, images, useBasicModel, hideUserMessage) || Promise.resolve(),
372
380
  });
373
381
  useEffect(() => {
382
+ // Wait for commands to be loaded before attempting auto-connect
383
+ if (!commandsLoaded) {
384
+ return;
385
+ }
374
386
  if (hasAttemptedAutoVscodeConnect.current) {
375
387
  return;
376
388
  }
@@ -394,7 +406,7 @@ export default function ChatScreen({ skipWelcome }) {
394
406
  });
395
407
  }
396
408
  })();
397
- }, [handleCommandExecution, vscodeState.vscodeConnectionStatus]);
409
+ }, [commandsLoaded, handleCommandExecution, vscodeState.vscodeConnectionStatus]);
398
410
  // Pending messages are now handled inline during tool execution in useConversation
399
411
  // Auto-send pending messages when streaming completely stops (as fallback)
400
412
  useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-ai",
3
- "version": "0.4.13",
3
+ "version": "0.4.15",
4
4
  "description": "Intelligent Command Line Assistant powered by AI",
5
5
  "license": "MIT",
6
6
  "bin": {