-
Notifications
You must be signed in to change notification settings - Fork 37
add allTick toolset #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
add allTick toolset #231
Conversation
Preview Image LabelPreview Images for this PR are:
|
添加了三个新的工具包(@fastgpt-plugins/tool-all-tick, @fastgpt-plugins/tool-minmax, @tool/redis)及其相关依赖 同时更新了对应的Bun类型定义文件
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a comprehensive AllTick financial data toolset to the FastGPT platform, providing real-time financial market data access. The toolset includes four core tools for querying K-line charts, market depth data, latest trade prices, and basic stock information from the AllTick API.
Key changes:
- Implements AllTick financial data integration with token-based authentication
- Adds four specialized tools for different financial data types
- Includes comprehensive input validation and error handling
- Provides both stock and non-stock API endpoint support
Reviewed Changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
modules/tool/packages/allTick/package.json | Package configuration for the AllTick toolset |
modules/tool/packages/allTick/index.ts | Main toolset export |
modules/tool/packages/allTick/config.ts | Core toolset configuration and secret management |
modules/tool/packages/allTick/children/*/src/index.ts | Implementation files for K-line, depth tick, trade tick, and static info tools |
modules/tool/packages/allTick/children/*/config.ts | Individual tool configurations with input/output schemas |
modules/tool/packages/allTick/children/*/index.ts | Tool export wrappers |
modules/tool/packages/allTick/children/*/test/index.test.ts | Basic test files for each tool |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@@ -0,0 +1,181 @@ | |||
import { format } from 'date-fns'; |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The format
function from 'date-fns' is imported but never used in this file. This unused import should be removed to keep the code clean.
import { format } from 'date-fns'; |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
盖好了
}); | ||
|
||
if (!response.ok) { | ||
throw new Error(`HTTP error: ${response.status} ${response.statusText}`); |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent error handling pattern. This line uses throw new Error()
while other error cases in the same function use return Promise.reject(new Error())
. For consistency, this should also use return Promise.reject(new Error())
.
throw new Error(`HTTP error: ${response.status} ${response.statusText}`); | |
return Promise.reject(new Error(`HTTP error: ${response.status} ${response.statusText}`)); |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改好了
将股票代码输入从数组对象格式改为简单字符串格式,简化用户输入 将部分输入控件从input改为select或switch以提升用户体验
feat(allTick): 添加AllTick金融数据工具集,包括K线、深度行情、最新成交价和股票基础信息查询功能