Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e8d684125 | ||
|
|
5403b6e7a9 | ||
|
|
ebbebdf20b | ||
|
|
592a410288 | ||
|
|
7fe41e86a1 | ||
|
|
6b7a991750 | ||
|
|
cb398dadc6 | ||
|
|
7ecc04ee61 |
@@ -33,11 +33,13 @@ type Options struct {
|
||||
|
||||
// NewFromOverlay 从 JSON overlay 构造闸门,并把 guard 域标成受保护域。
|
||||
// 命令行用它,这样命令本身不必 import agent-intent。
|
||||
// NFKC 开启:全角/兼容等价输入与词条同形折叠(与 backend intentgate 一致)。
|
||||
func NewFromOverlay(ctx context.Context, fsys fs.FS, roots ...string) (*Gate, error) {
|
||||
return New(ctx, Options{
|
||||
IntentOptions: intent.Options{
|
||||
GuardDomains: []string{"guard"},
|
||||
ProtectedDomains: []string{"guard"},
|
||||
NFKC: true,
|
||||
},
|
||||
FS: fsys,
|
||||
Roots: roots,
|
||||
|
||||
Vendored
+1
-1
Submodule deps/agent-intent updated: 65aaebca1e...f57645c645
Vendored
+1
-1
Submodule deps/agent-native updated: c9c2f23990...78b6c6477c
Reference in New Issue
Block a user