feat(ai): gRPC clients 扩展 + server interceptors + proto_gen + 测试 + nextstep 文档

This commit is contained in:
SpecialX
2026-07-14 15:59:41 +08:00
parent fb23c5234e
commit 7b790f1276
21 changed files with 3540 additions and 345 deletions

View File

@@ -2,7 +2,15 @@ module.exports = {
'*.{ts,tsx}': ['eslint --fix', 'prettier --write'],
// Go 工具链不在 git hook PATH 中Go 文件格式化由 go fmt 手动执行
// golangci-lint 安装后恢复:['gofmt -w', 'golangci-lint run --fix']
'*.py': ['ruff check --fix', 'ruff format'],
// 排除 proto_gen自动生成的 gRPC stub和 .coverage二进制文件
'*.py': (files) => {
const filtered = files.filter(
(f) => !f.includes('proto_gen') && !f.endsWith('.coverage'),
);
return filtered.length > 0
? [`ruff check --fix ${filtered.map((f) => `"${f}"`).join(' ')}`, `ruff format ${filtered.map((f) => `"${f}"`).join(' ')}`]
: [];
},
// buf format 一次只接受 1 个文件参数,需逐个调用
'*.proto': (files) => files.map((file) => `buf format --write "${file}"`),
'*.md': ['prettier --write'],