update QoL and ai integration

This commit is contained in:
2026-07-29 14:16:14 +02:00
parent 1d90e364ee
commit 027057e85f
14 changed files with 1893 additions and 84 deletions

15
main.go
View File

@@ -157,19 +157,20 @@ func main() {
aiDir = filepath.Join(filepath.Dir(*configFile), "ai")
}
aiStore = NewAIStore(aiDir)
diffService, ok := service.(AIDiffService)
repositoryService, ok := service.(AIRepositoryService)
if !ok {
exitf("configuration: GitHub service cannot provide authenticated PR diffs")
exitf("configuration: GitHub service cannot provide authenticated AI repository context")
}
workingDirectory, cwdErr := os.Getwd()
if cwdErr != nil {
exitf("configuration: determine working directory: %v", cwdErr)
}
aiController = &AIController{
config: config.AI,
provider: NewCodexCLIProvider(config.AI, workingDirectory),
diffs: diffService,
store: aiStore,
config: config.AI,
provider: NewCodexCLIProvider(config.AI, workingDirectory),
diffs: repositoryService,
repository: repositoryService,
store: aiStore,
}
}
app := NewAppWithSettings(
@@ -229,3 +230,5 @@ var _ GitHubPullRequestPeopleWriteService = (*GitHubClient)(nil)
var _ GitHubPullRequestPeopleWriteService = (*CachedGitHubService)(nil)
var _ GitHubRepositoryPeopleService = (*GitHubClient)(nil)
var _ GitHubRepositoryPeopleService = (*CachedGitHubService)(nil)
var _ AIRepositoryService = (*GitHubClient)(nil)
var _ AIRepositoryService = (*CachedGitHubService)(nil)