Context:
- Hardcoded URL:
Neo.ai.Client currently defaults to ws://localhost:8081. Developers need a convenient way to configure this (e.g., neo-config.json) without creating class overrides.
- Connection Safety: When
useAiClient is enabled, connection attempts should be robust. If the WebSocket instantiation fails (e.g., invalid URL scheme), it should not crash the worker.
Scope:
- Update
src/DefaultConfig.mjs:
- Add
neuralLinkUrl (default: 'ws://localhost:8081').
- Update
src/ai/Client.mjs:
- Use
Neo.config.neuralLinkUrl in connect().
- Wrap the connection logic in a
try-catch block to handle synchronous errors (e.g. URL syntax) gracefully.
Goal:
Make Neural Link configuration more flexible and runtime-safe.
Context:
Neo.ai.Clientcurrently defaults tows://localhost:8081. Developers need a convenient way to configure this (e.g.,neo-config.json) without creating class overrides.useAiClientis enabled, connection attempts should be robust. If the WebSocket instantiation fails (e.g., invalid URL scheme), it should not crash the worker.Scope:
src/DefaultConfig.mjs:neuralLinkUrl(default:'ws://localhost:8081').src/ai/Client.mjs:Neo.config.neuralLinkUrlinconnect().try-catchblock to handle synchronous errors (e.g. URL syntax) gracefully.Goal: Make Neural Link configuration more flexible and runtime-safe.