sync: migrate ai-operator to Gitea (2026-08-10)

This commit is contained in:
konturai-ops
2026-08-10 15:26:52 +00:00
commit 53652b95ad
173 changed files with 16676 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
package language
import "ai-operator/internal/dialogue/state"
type Language = state.Language
const (
LanguageUnknown Language = state.LanguageUnknown
LanguageRU Language = state.LanguageRU
LanguageKK Language = state.LanguageKK
)
type DetectionSource string
const (
SourceUserText DetectionSource = "user_text"
SourceToolArgs DetectionSource = "tool_args"
SourceTranscript DetectionSource = "transcript"
SourceCLI DetectionSource = "cli"
)
type DetectionIntent string
const (
IntentLanguageSelect DetectionIntent = "language_select"
IntentLanguageChange DetectionIntent = "language_change"
IntentNotLanguage DetectionIntent = "not_language"
IntentAmbiguous DetectionIntent = "ambiguous"
)
const (
HighConfidence = 0.90
MediumConfidence = 0.70
LowConfidence = 0.50
)
type DetectionResult struct {
Language Language
Intent DetectionIntent
Confidence float64
MatchedPhrase string
NormalizedText string
Source DetectionSource
ReasonCode string
NeedsClarification bool
}
type SelectionContext struct {
CurrentState state.ConversationState
CurrentLanguage Language
AllowChange bool
}
type LanguageDecision struct {
Apply bool
Language Language
NeedsClarification bool
ReasonCode string
MessageKey string
}