Skip to content

Conversation

otoTree
Copy link
Contributor

@otoTree otoTree commented Oct 13, 2025

feat(allTick): 添加AllTick金融数据工具集,包括K线、深度行情、最新成交价和股票基础信息查询功能

Copy link

github-actions bot commented Oct 13, 2025

Preview Image Label

Preview Images for this PR are:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-plugin-pr:662fe5258d6441a3bb4282c55862930fc36ee845

添加了三个新的工具包(@fastgpt-plugins/tool-all-tick, @fastgpt-plugins/tool-minmax, @tool/redis)及其相关依赖
同时更新了对应的Bun类型定义文件
Copy link
Contributor

@Copilot Copilot AI left a 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';
Copy link

Copilot AI Oct 13, 2025

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.

Suggested change
import { format } from 'date-fns';

Copilot uses AI. Check for mistakes.

Copy link
Contributor Author

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}`);
Copy link

Copilot AI Oct 13, 2025

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()).

Suggested change
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改好了

将股票代码输入从数组对象格式改为简单字符串格式,简化用户输入
将部分输入控件从input改为select或switch以提升用户体验
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant