59df2f6856
Update error handling and improve streaming capabilities in the Ollama client and related components. Key changes include: - Simplify error types and improve error handling - Refactor streaming logic to use async generators - Update tool execution and vault indexing - Improve utility functions and types - Update test files to reflect changes
39 lines
1.9 KiB
Markdown
Executable File
39 lines
1.9 KiB
Markdown
Executable File
# Changes
|
|
|
|
## [Unreleased]
|
|
|
|
### Fixed
|
|
|
|
- **CRITICAL**: Fixed `removeEventListeners` in `chat-view.ts` which was incorrectly adding listeners instead of removing them, causing memory leaks and duplicate event handlers
|
|
- **CRITICAL**: Added guards in `setupEventListeners` to prevent duplicate event listeners from accumulating on repeated open/close cycles
|
|
- **CRITICAL**: Added path sanitization in `tool-executor.ts` to prevent path traversal attacks by validating that paths are relative and don't contain `..` segments
|
|
- **MAJOR**: Added proper cleanup in `ollama-client.ts` async generator with try/finally block to ensure `reader.releaseLock()` and abort controller cleanup on parse errors
|
|
- **MAJOR**: Made `fetchFn` injectable in `OllamaClient` constructor to improve testability
|
|
|
|
### Added
|
|
|
|
- **MAJOR**: Added conversation history management with "New Chat" button to clear messages and start fresh conversations
|
|
- **MINOR**: Added `.gitignore` file to exclude backup files, build artifacts, and other unwanted files
|
|
- **MINOR**: Created `README.md` with setup instructions and usage documentation
|
|
- **MINOR**: Added sensible default values for Ollama URL (`http://localhost:11434`) and model (`llama3`) to prevent confusing failures
|
|
- **NIT**: Added `CHANGES.md` file to document changes
|
|
|
|
### Changed
|
|
|
|
- **MINOR**: Fixed `tsconfig.json` to include `main.ts` in the root directory instead of incorrectly scoping to `./src`
|
|
- **NIT**: Refactored code formatting and structure for better readability
|
|
|
|
### Security
|
|
|
|
- Added path validation to prevent directory traversal attacks in file creation tool
|
|
- Added content type validation to ensure proper argument parsing
|
|
|
|
### Technical Debt
|
|
|
|
- Removed committed backup file (`src/chat-view.ts.backup`)
|
|
- Removed references to hardcoded paths and improved modularity
|
|
|
|
## [Previous Versions]
|
|
|
|
No formal versioning was maintained prior to these changes.
|