From c62ea3ea7c3a377b6869f099e4efc01c7067aec9 Mon Sep 17 00:00:00 2001 From: d0zingcat Date: Thu, 15 Jan 2026 22:49:11 +0800 Subject: [PATCH] docs: update feature documentation and cleanup context v1.2.8 Signed-off-by: d0zingcat --- CHANGELOG.md | 6 ++++++ docs/copilot-context.md | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef08b91..9ff6e3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ 本文件的格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/), 并且本项目遵循 [语义化版本 (Semantic Versioning)](https://semver.org/lang/zh-CN/spec/v2.0.0.html)。 +## [1.2.8] - 2026-01-15 + +### 变更 +- **文档规范**:更新了 `copilot-context.md`,详细列出了 Webhook 支持的所有消息类型(text, post, card, image, file 等),并详细说明了消息类型的自动推断逻辑。 +- **文档优化**:清理了 `copilot-context.md` 中的冗余描述。 + ## [1.2.7] - 2026-01-15 ### 修复 diff --git a/docs/copilot-context.md b/docs/copilot-context.md index 8cbb850..f19726f 100644 --- a/docs/copilot-context.md +++ b/docs/copilot-context.md @@ -1,4 +1,4 @@ -# Project Context for GitHub Copilot (v1.2.7) +# Project Context for GitHub Copilot (v1.2.8) This document provides technical context, architectural decisions, and code conventions for the **Alert Message Center** project. It is intended to help AI assistants understand the codebase. @@ -116,10 +116,13 @@ The database schema is defined in `apps/server/src/db/schema.ts`. - For Direct: Identify the user via `token`. 3. **Dispatch**: - Call `FeishuClient.sendMessage` for each recipient. - - **Payload**: Supports `text` and `interactive` (Feishu Card) message types. - - - Call `FeishuClient.sendMessage` for each recipient. - - **Payload**: Supports `text` and `interactive` (Feishu Card) message types. + - **Payload**: Supports various Feishu message types: + - `text`: Standard text. + - `post`: Rich text with titles, images, and links. + - `interactive`: Feishu Cards (provided via `card` field or inferred from `header`/`elements`). + - `image`, `file`, `audio`, `media`, `sticker`: Media types (requires appropriate `_key` fields). + - `share_chat`, `share_user`: Sharing entities. + - **Inference**: If `msg_type` is missing, the system automatically infers it from the keys present in the request body (e.g., `image_key` implies `image`). ### Feishu Group Chat Integration - **Strategy**: App Bot in Group.