-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Revert "feat: support bot identity for meeting search" #2609
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,15 +15,15 @@ | |
| | 已有信息 | 操作 | | ||
| |---|---| | ||
| | `meeting_id` | 直接查询会议或关联产物 | | ||
| | `meeting_no` / 9 位会议号 | 用 `vc +search --query "<meeting_no>" --format json --as <source_identity>` 搜索会议,从结果的 `id` 取得 `meeting_id` | | ||
| | `meeting_no` / 9 位会议号 | 用 `vc +search --query "<meeting_no>" --format json --as user` 搜索会议,从结果的 `id` 取得 `meeting_id` | | ||
| | Calendar `event_id` | 用 `calendar +meeting` 获取 `meeting_id` 和用户绑定的 `meeting_note` | | ||
| | `note_id` | 直接进入 [智能纪要场景](query-note-and-artifacts.md) | | ||
| | `minute_token` / 妙记 URL | 直接进入 [妙记场景](query-minutes-and-artifacts.md);URL 取路径最后一段并去掉 query 参数 | | ||
|
|
||
| 没有标识时,用 `vc +search` 搜索已经结束的会议: | ||
|
|
||
| ```bash | ||
| lark-cli vc +search --query <query> --start <start> --end <end> --format json --as <source_identity> | ||
| lark-cli vc +search --query <query> --start <start> --end <end> --format json | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 10 \
'type Shortcut struct|AuthTypes|ResolveToken|TokenTypeUAT|TokenTypeTAT|--as' \
--glob '*.go' .Repository: larksuite/cli Length of output: 50370 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- scoped repository knowledge ---'
find /tmp/coderabbit-repo-knowledge/larksuite-cli-f41f2344 -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- target document ---'
cat -n skills/lark-meeting/scenes/query-meeting-and-artifacts.md
printf '%s\n' '--- VC search definitions and callers ---'
rg -n -C 12 \
'VCSearch|vc \+search|Command:.*\+search|AuthTypes:.*user|func .*As\(|type Identity|Resolve.*Identity|default.*user|Default.*Identity' \
shortcuts skills internal cmd common core credential --glob '*.go' --glob '*.md' 2>/dev/null | head -n 1200Repository: larksuite/cli Length of output: 50372 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- scoped repository knowledge ---'
find /tmp/coderabbit-repo-knowledge/larksuite-cli-f41f2344 -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- target document ---'
cat -n skills/lark-meeting/scenes/query-meeting-and-artifacts.md
printf '%s\n' '--- VC search definitions and identity resolution ---'
rg -n -C 12 \
'VCSearch|vc \+search|Command:.*\+search|type Identity|Resolve.*Identity|default.*user|Default.*Identity|flag.*as' \
shortcuts skills internal cmd common core credential --glob '*.go' --glob '*.md' 2>/dev/null | head -n 1200Repository: larksuite/cli Length of output: 50371 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- relevant conventions and learning ---'
cat /tmp/coderabbit-repo-knowledge/larksuite-cli-f41f2344/conventions/skills.md
printf '%s\n' '--- relevant documentation learning ---'
cat /tmp/coderabbit-repo-knowledge/larksuite-cli-f41f2344/learnings/shortcuts-doc.md
printf '%s\n' '--- exact VC search files/symbols ---'
fd -i 'vc' shortcuts cmd internal | head -n 200
rg -n -C 8 \
'var[[:space:]]+VCSearch|VCSearch[[:space:]]*=|Command:[[:space:]]*"\+search"|Service:[[:space:]]*"vc"' \
. --glob '*.go' --glob '!shortcuts/common/runner.go'
printf '%s\n' '--- ResolveAs binding and identity defaults ---'
rg -n -C 14 \
'func \(.*\) ResolveAs|func ResolveAs|ResolveAs\(|default-as|auto.?detect|SupportedIdentities|AsUser|AsBot' \
cmd internal core credential shortcuts/common --glob '*.go' | head -n 1000Repository: larksuite/cli Length of output: 50369 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- relevant conventions and learning ---'
cat /tmp/coderabbit-repo-knowledge/larksuite-cli-f41f2344/conventions/skills.md
cat /tmp/coderabbit-repo-knowledge/larksuite-cli-f41f2344/learnings/shortcuts-doc.md
printf '%s\n' '--- exact VC search files/symbols ---'
fd -i 'vc' shortcuts cmd internal | head -n 200
rg -n -C 8 \
'var[[:space:]]+VCSearch|VCSearch[[:space:]]*=|Command:[[:space:]]*"\+search"|Service:[[:space:]]*"vc"' \
. --glob '*.go' --glob '!shortcuts/common/runner.go'
printf '%s\n' '--- ResolveAs binding and identity defaults ---'
rg -n -C 14 \
'func \(.*\) ResolveAs|func ResolveAs|ResolveAs\(|default-as|auto.?detect|SupportedIdentities|AsUser|AsBot' \
cmd internal core credential shortcuts/common --glob '*.go' | head -n 1000Repository: larksuite/cli Length of output: 50369 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- ResolveAs declaration ---'
rg -l 'func[[:space:]]+\(.*\)[[:space:]]+ResolveAs|func[[:space:]]+ResolveAs' . --glob '*.go'
printf '%s\n' '--- ResolveAs implementation and directly bound helpers ---'
files=$(rg -l 'func[[:space:]]+\(.*\)[[:space:]]+ResolveAs|func[[:space:]]+ResolveAs' . --glob '*.go')
for f in $files; do
grep -n -C 30 -E 'func[[:space:]]+\(.*\)[[:space:]]+ResolveAs|func[[:space:]]+ResolveAs' "$f"
done
printf '%s\n' '--- identity configuration fields and fallback helpers ---'
rg -n -C 8 \
'ResolvedIdentity|DefaultAs|defaultAs|default-as|ResolveAs|auto.?detect|CanBot\(\)|CanUser\(\)|SupportedIdentities' \
. --glob '*.go' \
| grep -E 'cmdutil|Factory|ResolveAs|ResolvedIdentity|DefaultAs|default-as|auto.?detect|CanBot|CanUser|SupportedIdentities' \
| head -n 1200Repository: larksuite/cli Length of output: 50372 Add
🤖 Prompt for AI Agents |
||
| ``` | ||
|
|
||
| - 至少提供关键词、时间范围、组织者、参与者或会议室中的一个条件;不要把“总结”“回顾”“所有会议”等动作词当作 `--query`。 | ||
|
|
@@ -38,7 +38,7 @@ lark-cli vc +search --query <query> --start <start> --end <end> --format json -- | |
|
|
||
| ## 选择查询身份 | ||
|
|
||
| - `vc +search`、`vc +detail`、`vc +recording`、`vc meeting get` 和 `note +detail` 均支持用户或应用身份。没有既有身份上下文时默认使用用户身份;用户明确要求应用视角或当前链路已经使用应用身份时,使用 `--as bot`。 | ||
| - `vc +search` 仅支持用户身份。`vc +detail`、`vc +recording`、`vc meeting get` 和 `note +detail` 支持用户或应用身份。 | ||
| - 已有 `meeting_id`、`note_id` 或 `minute_token` 时,沿用其来源身份;后续 Minutes、Note、Doc 和 Drive 命令都显式传入同一个 `--as`。不要为查询参会人或绕过权限错误擅自切换身份。 | ||
| - `note +transcript` 仅支持用户身份。应用身份查到 unified Note 时,先说明限制,只有用户明确同意后才切换身份。 | ||
|
|
||
|
|
||
This file was deleted.
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Assert the complete
VCSearch.AuthTypescontract.This check only rejects
"bot". It passes ifVCSearch.AuthTypesis empty or contains only"app", while the documentation still claims user-only support. Require exactly one entry:"user".As per coding guidelines, tests must assert fields directly, and every behavior change requires a regression test that fails when the implementation is reverted.
🤖 Prompt for AI Agents
Source: Coding guidelines