aae7b65329
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Report Issues (push) Blocked by required conditions
Universal: PR Check / Build RC Package (pull_request) Blocked by required conditions
Universal: PR Check / Report Issues (pull_request) Blocked by required conditions
Generic: Repo Health / Scripts governance (pull_request) Blocked by required conditions
Generic: Repo Health / Repository health (pull_request) Blocked by required conditions
Generic: Repo Health / Report Issues (pull_request) Blocked by required conditions
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 2s
Branch Policy Check / Verify merge target (pull_request) Successful in 2s
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
PR RC Release / Build RC Release (pull_request) Successful in 2s
Generic: Repo Health / Access control (pull_request) Successful in 1s
Universal: PR Check / Validate PR (pull_request) Failing after 7s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
- manifest_sync.go: add VersionPrefix and ElementName to XML parse and DB sync - deploy workflow: use manifest API for version prefix instead of hardcoded sed - pre-release workflow: rename moko-platform paths to mokoplatform - All workflow headers: rename moko-platform references - manifest.xml: update root element to mokoplatform, add version-prefix field - Server: symlink /opt/mokoplatform -> /opt/moko-platform for compatibility
26 lines
696 B
Go
26 lines
696 B
Go
// Copyright 2026 The MokoGitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package setting
|
|
|
|
// AI settings
|
|
var (
|
|
AI = struct {
|
|
Enabled bool
|
|
DefaultModel string `ini:"DEFAULT_MODEL"`
|
|
DefaultKey string `ini:"DEFAULT_API_KEY"`
|
|
ClaudeBinPath string `ini:"CLAUDE_BIN_PATH"`
|
|
}{
|
|
Enabled: false,
|
|
DefaultModel: "claude-sonnet-4-6",
|
|
}
|
|
)
|
|
|
|
func loadAIFrom(rootCfg ConfigProvider) {
|
|
sec := rootCfg.Section("ai")
|
|
AI.Enabled = sec.Key("ENABLED").MustBool(AI.Enabled)
|
|
AI.DefaultModel = sec.Key("DEFAULT_MODEL").MustString(AI.DefaultModel)
|
|
AI.DefaultKey = sec.Key("DEFAULT_API_KEY").String()
|
|
AI.ClaudeBinPath = sec.Key("CLAUDE_BIN_PATH").MustString("claude")
|
|
}
|