Skip to content

Commit ee36515

Browse files
john-zhhclaude
andcommitted
feat(bot): add beta label to bot feature
Mark the bot gateway as beta across the codebase: config struct comments, route comments, web UI badge, and amber beta notice card. Add betaNotice i18n translations for all 6 locales. Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
1 parent 8d1a72d commit ee36515

11 files changed

Lines changed: 47 additions & 13 deletions

File tree

internal/config/compat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func SetAgent(ac *AgentConfig) error {
274274
return DefaultStore().SetAgent(ac)
275275
}
276276

277-
// --- Bot convenience functions ---
277+
// --- Bot convenience functions (BETA) ---
278278

279279
// GetBot returns the bot configuration.
280280
func GetBot() *BotConfig {

internal/config/config.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,11 +561,12 @@ type RuntimeConfig struct {
561561
MaxTokens int `json:"max_tokens,omitempty"` // max total tokens (default: 500000)
562562
}
563563

564-
// --- Bot Configuration ---
564+
// --- Bot Configuration (BETA) ---
565565

566566
// BotConfig holds bot gateway settings.
567+
// [BETA] This feature is experimental and disabled by default.
567568
type BotConfig struct {
568-
Enabled bool `json:"enabled"`
569+
Enabled bool `json:"enabled"` // default: false (BETA)
569570
Profile string `json:"profile,omitempty"` // profile for NLU (recommend small model)
570571
Model string `json:"model,omitempty"` // LLM model ID (default: "claude-3-haiku-20240307")
571572
SocketPath string `json:"socket_path,omitempty"` // IPC socket path
@@ -704,7 +705,7 @@ type OpenCCConfig struct {
704705
Compression *CompressionConfig `json:"compression,omitempty"` // [BETA] context compression
705706
Middleware *MiddlewareConfig `json:"middleware,omitempty"` // [BETA] middleware pipeline
706707
Agent *AgentConfig `json:"agent,omitempty"` // [BETA] agent infrastructure
707-
Bot *BotConfig `json:"bot,omitempty"` // bot gateway configuration
708+
Bot *BotConfig `json:"bot,omitempty"` // [BETA] bot gateway configuration
708709
}
709710

710711
// UnmarshalJSON supports multiple config versions:

internal/config/store.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,8 @@ func (s *Store) SetAgent(ac *AgentConfig) error {
982982
return s.saveLocked()
983983
}
984984

985+
// --- Bot (BETA) ---
986+
985987
// GetBot returns the bot configuration.
986988
func (s *Store) GetBot() *BotConfig {
987989
s.mu.Lock()

internal/web/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func NewServer(version string, logger *log.Logger, portOverride int) *Server {
117117
s.mux.HandleFunc("/api/v1/middleware/reload", s.handleMiddlewareReload)
118118
s.mux.HandleFunc("/api/v1/middleware/upload", s.handleMiddlewareUpload)
119119

120-
// Bot routes
120+
// Bot routes (BETA)
121121
s.mux.HandleFunc("/api/v1/bot", s.handleBot)
122122
s.mux.HandleFunc("/api/v1/bot/chat", s.handleBotChat)
123123

web/src/i18n/locales/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,9 @@
310310
"quietHoursStart": "Quiet Hours Start",
311311
"quietHoursEnd": "Quiet Hours End",
312312
"quietHoursZone": "Timezone",
313-
"recentPaths": "Recent Paths"
313+
"recentPaths": "Recent Paths",
314+
"betaNotice": "Beta Feature:",
315+
"betaNoticeDesc": "The bot gateway is currently in beta. Configuration options may change in future releases."
314316
},
315317
"middleware": {
316318
"title": "Middleware",

web/src/i18n/locales/es.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@
231231
"quietHoursStart": "Inicio de Horas Silenciosas",
232232
"quietHoursEnd": "Fin de Horas Silenciosas",
233233
"quietHoursZone": "Zona Horaria",
234-
"recentPaths": "Rutas Recientes"
234+
"recentPaths": "Rutas Recientes",
235+
"betaNotice": "Función Beta:",
236+
"betaNoticeDesc": "La pasarela de bot está actualmente en beta. Las opciones de configuración pueden cambiar en futuras versiones."
235237
},
236238
"middleware": {
237239
"title": "Middleware",

web/src/i18n/locales/ja.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@
273273
"quietHoursStart": "静音時間開始",
274274
"quietHoursEnd": "静音時間終了",
275275
"quietHoursZone": "タイムゾーン",
276-
"recentPaths": "最近使用したパス"
276+
"recentPaths": "最近使用したパス",
277+
"betaNotice": "ベータ機能:",
278+
"betaNoticeDesc": "ボットゲートウェイは現在ベータ版です。設定オプションは今後のリリースで変更される可能性があります。"
277279
}
278280
}

web/src/i18n/locales/ko.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@
273273
"quietHoursStart": "조용한 시간 시작",
274274
"quietHoursEnd": "조용한 시간 종료",
275275
"quietHoursZone": "시간대",
276-
"recentPaths": "최근 사용한 경로"
276+
"recentPaths": "최근 사용한 경로",
277+
"betaNotice": "베타 기능:",
278+
"betaNoticeDesc": "봇 게이트웨이는 현재 베타 단계입니다. 향후 릴리스에서 구성 옵션이 변경될 수 있습니다."
277279
}
278280
}

web/src/i18n/locales/zh-CN.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,9 @@
295295
"quietHoursStart": "静默时段开始",
296296
"quietHoursEnd": "静默时段结束",
297297
"quietHoursZone": "时区",
298-
"recentPaths": "最近使用的路径"
298+
"recentPaths": "最近使用的路径",
299+
"betaNotice": "Beta 功能:",
300+
"betaNoticeDesc": "机器人网关目前处于 Beta 阶段,配置选项可能会在未来版本中更改。"
299301
},
300302
"middleware": {
301303
"title": "中间件",

web/src/i18n/locales/zh-TW.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,9 @@
295295
"quietHoursStart": "靜默時段開始",
296296
"quietHoursEnd": "靜默時段結束",
297297
"quietHoursZone": "時區",
298-
"recentPaths": "最近使用的路徑"
298+
"recentPaths": "最近使用的路徑",
299+
"betaNotice": "Beta 功能:",
300+
"betaNoticeDesc": "機器人閘道目前處於 Beta 階段,設定選項可能會在未來版本中變更。"
299301
},
300302
"middleware": {
301303
"title": "中介軟體",

0 commit comments

Comments
 (0)