6 Commits

Author SHA1 Message Date
devin-ai-integration[bot]
76f8cd242a
feat: merge types and add tests (#10)
* feat: merge types and add tests

- Merged types.ts and tracker.ts
- Added Jest configuration and setup
- Added comprehensive tests for tools and agent
- Updated package.json with test scripts

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* chore: remove tracker.ts after merging into types.ts

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* fix: remove sensitive API keys from jest.setup.js

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* fix: improve error handling and test timeouts

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* feat: add token budget enforcement to TokenTracker

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* feat: add github actions workflow for CI and fix remaining issues

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Han Xiao <han.xiao@jina.ai>
2025-02-03 18:01:59 +08:00
devin-ai-integration[bot]
5be008e8b9
feat: add action tracker and reset token tracker (#8)
* feat: add action tracker and reset token tracker

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* refactor: make trackers request-scoped

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Han Xiao <han.xiao@jina.ai>
2025-02-02 23:25:54 +08:00
devin-ai-integration[bot]
c793cb9bbc
refactor: consolidate type definitions into types.ts (#5)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Han Xiao <han.xiao@jina.ai>
2025-02-02 20:53:28 +08:00
devin-ai-integration[bot]
f99608909c
refactor: centralize token tracking and clean up console output (#3)
* refactor: centralize token tracking and clean up console output

- Remove manual token tracking in agent.ts
- Track tokens through tokenTracker.trackUsage()
- Clean up verbose console output
- Add ESLint configuration
- Fix TypeScript linting issues

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* refactor: simplify sleep function and use console.log consistently

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* refactor: remove color modifiers from console.log statements

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Han Xiao <han.xiao@jina.ai>
2025-01-31 15:25:28 +08:00
devin-ai-integration[bot]
966ef5d026
Refactor Tools to Use config.ts (#2)
* refactor: remove redundant code and use config imports

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* refactor: standardize token tracking in search and read tools

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* refactor: standardize console logging with colors and levels

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* feat: add centralized token tracking utility

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* feat: integrate token tracking across all tools

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

* feat: add token tracking and colored console output to agent

Co-Authored-By: Han Xiao <han.xiao@jina.ai>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Han Xiao <han.xiao@jina.ai>
2025-01-31 14:52:41 +08:00
Han Xiao
5eb75fcb61 chore: first commit 2025-01-26 14:53:55 +08:00