Skip to content

feat: wiki toggle via local config (Approach B)#23

Open
jeff-r2026 wants to merge 1 commit into
mainfrom
feat/wiki-toggle-local-config
Open

feat: wiki toggle via local config (Approach B)#23
jeff-r2026 wants to merge 1 commit into
mainfrom
feat/wiki-toggle-local-config

Conversation

@jeff-r2026
Copy link
Copy Markdown
Collaborator

Summary

Approach B: Local Config — User-level toggle in ~/.teamai/config.yaml.

  • Add wikiEnabled: false field to local config schema
  • Each user can independently disable wiki for themselves
  • Persisted setting, survives shell restarts

How to disable:

# ~/.teamai/config.yaml
wikiEnabled: false

When disabled:

  • Wiki resources skipped during teamai pull / teamai push
  • teamai-wiki builtin skill not deployed
  • teamai status shows wiki disabled hint

Trade-offs:

Pros Cons
Persisted in config Requires editing config.yaml
Per-user control No team-level enforcement
Clear in teamai status Slightly more code than env var

Backward compatibility:

  • Old configs without wikiEnabled continue to work (field is optional, defaults to enabled)
  • No team config changes required

Test plan

  • isWikiEnabledByConfig() returns true when field missing
  • Returns false when wikiEnabled: false
  • LocalConfigSchema parses old configs without wikiEnabled
  • Pull/push correctly filter wiki resources
  • All 946 tests pass
  • TypeScript compiles cleanly

Closes #21

💡 This is 1 of 3 alternative implementations. See also:

  • Approach A: Environment variable (feat/wiki-toggle-env)
  • Approach C: Team config + local override (feat/wiki-toggle-team-config)

Add wikiEnabled field to ~/.teamai/config.yaml to let users disable
the built-in wiki feature, preventing conflicts with third-party
team-wiki plugins.

Usage: set `wikiEnabled: false` in ~/.teamai/config.yaml

When disabled:
- Wiki resources are skipped during pull/push
- teamai-wiki builtin skill is not deployed
- Status command shows wiki disabled hint

Default: enabled (backward compatible, field is optional)

Closes #21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] Wiki 功能开关:避免与第三方 team-wiki 插件命名冲突导致 AI 误识别

1 participant