Files
larksuite__cli/internal/affordance/vc_source_test.go
zhicong666-bytedance 35bd5ecfcd feat(vc): add agent meeting control shortcuts (#2466)
* feat(vc): add agent calendar meeting actions

* feat(vc): add meeting screenshot shortcut for visual context

* feat(vc): add meeting countdown commands and events

* fix(skills): avoid screenshot recall from meeting description

* fix(vc): omit screenshot log ID on success

---------

Co-authored-by: renaocheng <renaocheng@bytedance.com>
Co-authored-by: shike.11 <shike.11@bytedance.com>
2026-08-24 21:26:44 +08:00

44 lines
1.1 KiB
Go

// Copyright (c) 2026 Lark Technologies Pte. Ltd.
// SPDX-License-Identifier: MIT
package affordance
import (
"os"
"testing"
"github.com/larksuite/cli/internal/meta"
)
func TestVCAffordanceRoutesAgentActionReferences(t *testing.T) {
previousSource := mdSource
t.Cleanup(func() { SetSource(previousSource) })
SetSource(os.DirFS("../../affordance"))
tests := []struct {
command string
ref string
}{
{command: "+meeting-invite", ref: "lark-meeting/references/lark-vc-agent-meeting-invite.md"},
{command: "+meeting-end", ref: "lark-meeting/references/lark-vc-agent-meeting-end.md"},
}
for _, testCase := range tests {
t.Run(testCase.command, func(t *testing.T) {
raw, ok := For("vc", testCase.command)
if !ok {
t.Fatalf("For(vc, %s) ok=false", testCase.command)
}
affordance, ok := (meta.Method{Affordance: raw}).ParsedAffordance()
if !ok {
t.Fatalf("vc %s affordance did not parse", testCase.command)
}
for _, skill := range affordance.Skills {
if skill == testCase.ref {
return
}
}
t.Fatalf("vc %s skills = %v, want %q", testCase.command, affordance.Skills, testCase.ref)
})
}
}