diff options
| author | Castor Regex <[email protected]> | 2025-08-25 10:15:39 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-08-25 10:15:39 -0500 |
| commit | 0b2ec9ce15cf17f12c6457396a9579d943115d67 (patch) | |
| tree | 1f64f1f424496a930ee8fa2698fdecc19b36005e /add.go | |
| parent | c39a2f31e65f6931b6752e89c9566613e8993c34 (diff) | |
fix: correct build errors and clean up code
Diffstat (limited to 'add.go')
| -rw-r--r-- | add.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -28,10 +28,10 @@ func addFile(filename string) (*chatpb.Chats, error) { logDir := filepath.Dir(filename) // Iterate through the structure to inline all external content. - for _, chat := range logData.GetChats() { - for _, entry := range chat.GetEntries() { + for _, chat := range logData.Chats { + for _, entry := range chat.Entries { // Inline main content from ContentFile - if contentFile := entry.GetContentFile(); contentFile != "" { + if contentFile := entry.ContentFile; contentFile != "" { contentPath := filepath.Join(logDir, contentFile) contentBytes, err := os.ReadFile(contentPath) if err != nil { @@ -42,9 +42,9 @@ func addFile(filename string) (*chatpb.Chats, error) { } // Inline snippet content from snippet files - if snippets := entry.GetSnippets(); snippets != nil { + if snippets := entry.Snippets; snippets != nil { for _, snippet := range snippets { - if snippetFile := snippet.GetFilename(); snippetFile != "" { + if snippetFile := snippet.Filename; snippetFile != "" { snippetPath := filepath.Join(logDir, snippetFile) contentBytes, err := os.ReadFile(snippetPath) if err != nil { |
