feat(file-check): 更新文件检核工具 API Key 配置及相关文档
This commit is contained in:
1 parent
634dee4b81
commit
55cf7ff734
74 files changed
+1525
-1182
No files matched your search
@@ -1,12 +1,16 @@
|
||||
/**
|
||||
* 出货聊天:库存列映射 payload 读取与字段对齐 Markdown 生成(纯函数)。
|
||||
*
|
||||
* 消息 type === 'shipping-inventory-mapping' 时 payload 含 schema_preview + form。
|
||||
* features/chat/shipping/shippingMapping.ts
|
||||
* 用途:库存列映射消息 payload 读取与字段对齐 Markdown 生成。
|
||||
* 依赖:shippingText.normalizeShippingHeaderForDisplay、chat.types、shipping.types。
|
||||
* 逻辑:ShippingInventoryMappingMessage 与 useChatShippingMappingForm 读取 mapping 消息数据。
|
||||
*/
|
||||
import { normalizeShippingHeaderForDisplay } from './shippingText';
|
||||
import type { ChatMessage } from '../types/chat.types';
|
||||
import type { ShippingInventoryMappingFormPayload } from '../types/shipping.types';
|
||||
|
||||
/**
|
||||
* 从 shipping-inventory-mapping 类型消息中提取 taskId、schema_preview 与 form。
|
||||
*/
|
||||
export function getShippingInventoryMappingPayload(chatMsg: ChatMessage): ShippingInventoryMappingFormPayload | null {
|
||||
if (!chatMsg || chatMsg.type !== 'shipping-inventory-mapping') return null;
|
||||
const payload = chatMsg.payload;
|
||||
@@ -28,6 +32,9 @@ export function getShippingInventorySampleRowText(chatMsg: ChatMessage): string
|
||||
return Array.isArray(row) ? row.map((cell) => String(cell)).join(' | ') : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* 将 field_alignment API 响应转为 Markdown 表格文本,供发送给 Agent 确认。
|
||||
*/
|
||||
export function buildShippingFieldAlignmentText(payload: { data?: { field_alignment?: Record<string, unknown> } }): string {
|
||||
const alignment = payload?.data?.field_alignment;
|
||||
if (!alignment || typeof alignment !== 'object') return '';
|
||||
|
||||
Reference in new issue
Block a user