-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.go
More file actions
46 lines (36 loc) · 1.23 KB
/
Copy pathmain.go
File metadata and controls
46 lines (36 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package main
import (
"log"
)
const (
contextDir = ".xplane"
dynamicContextFile = "dynamic_context.txt"
staticContextFile = "static_context.txt"
defaultStaticContext = `
You are a helpful project assistant. Your goal is to provide a clear and concise summary of the project's changes.
Summarize the key differences between the PREVIOUS and CURRENT states provided below.
--- PREVIOUS STATE ---
{{PREVIOUS_CONTEXT}}
--- CURRENT STATE ---
{{CURRENT_CONTEXT}}
---
Add a section at the end of your responses labeled 'UNCERTAINTY MAP', where you describe what you're least confident about and what questions would change your opinion.
You will be rendered in a terminal environment that uses a feature-rich markdown renderer, leverage MD syntax to make the output as pretty and human readable as possible.
`
)
func main() {
gitRoot, err := findGitRoot()
if err != nil {
log.Fatalf("Error: not inside a git repository. %v", err)
}
// loading configuration
cfg, err := loadConfig()
if err != nil {
log.Fatalf("Error loading configuration: %v", err)
}
llmProvider, err := pickLLM(cfg)
if err != nil {
log.Fatalf("Error loading an llm provider: %v", err)
}
contextCompare(llmProvider, cfg, gitRoot)
}