Chore: project rename; gf-lt => grailfinder's llm tui

This commit is contained in:
Grail Finder
2025-05-21 19:55:14 +03:00
parent 8b9a33d330
commit fe4f759173
21 changed files with 34 additions and 33 deletions

1
.gitignore vendored
View File

@@ -10,3 +10,4 @@ sysprompts/*
history_bak/
.aider*
tags
gf-lt

View File

@@ -1,10 +1,10 @@
.PHONY: setconfig run lint
run: setconfig
go build -o elefant && ./elefant
go build -o gf-lt && ./gf-lt
server: setconfig
go build -o elefant && ./elefant -port 3333
go build -o gf-lt && ./gf-lt -port 3333
setconfig:
find config.toml &>/dev/null || cp config.example.toml config.toml

10
bot.go
View File

@@ -4,11 +4,11 @@ import (
"bufio"
"bytes"
"context"
"elefant/config"
"elefant/extra"
"elefant/models"
"elefant/rag"
"elefant/storage"
"gf-lt/config"
"gf-lt/extra"
"gf-lt/models"
"gf-lt/rag"
"gf-lt/storage"
"encoding/json"
"fmt"
"io"

View File

@@ -2,8 +2,8 @@ package extra
import (
"bytes"
"elefant/config"
"elefant/models"
"gf-lt/config"
"gf-lt/models"
"encoding/json"
"fmt"
"io"

2
go.mod
View File

@@ -1,4 +1,4 @@
module elefant
module gf-lt
go 1.23.2

2
llm.go
View File

@@ -2,7 +2,7 @@ package main
import (
"bytes"
"elefant/models"
"gf-lt/models"
"encoding/json"
"io"
"strings"

View File

@@ -1,7 +1,7 @@
package main
import (
"elefant/models"
"gf-lt/models"
"fmt"
"strings"
"testing"

View File

@@ -1,7 +1,7 @@
package models
import (
"elefant/config"
"gf-lt/config"
"fmt"
"strings"
)

View File

@@ -2,7 +2,7 @@ package pngmeta
import (
"bytes"
"elefant/models"
"gf-lt/models"
"encoding/base64"
"encoding/binary"
"encoding/json"
@@ -30,7 +30,7 @@ func WriteToPng(metadata *models.CharCardSpec, sourcePath, outfile string) error
}
base64Data := base64.StdEncoding.EncodeToString(jsonData)
embedData := PngEmbed{
Key: "elefant", // Replace with appropriate key constant
Key: "gf-lt", // Replace with appropriate key constant
Value: base64Data,
}
var outputBuffer bytes.Buffer

View File

@@ -2,7 +2,7 @@ package pngmeta
import (
"bytes"
"elefant/models"
"gf-lt/models"
"encoding/base64"
"encoding/json"
"errors"

View File

@@ -2,7 +2,7 @@ package pngmeta
import (
"bytes"
"elefant/models"
"gf-lt/models"
"encoding/base64"
"encoding/binary"
"encoding/json"

View File

@@ -2,9 +2,9 @@ package rag
import (
"bytes"
"elefant/config"
"elefant/models"
"elefant/storage"
"gf-lt/config"
"gf-lt/models"
"gf-lt/storage"
"encoding/json"
"errors"
"fmt"

View File

@@ -1,7 +1,7 @@
package main
import (
"elefant/config"
"gf-lt/config"
"encoding/json"
"fmt"
"net/http"

View File

@@ -1,7 +1,7 @@
package main
import (
"elefant/models"
"gf-lt/models"
"encoding/json"
"errors"
"fmt"

View File

@@ -1,6 +1,6 @@
package storage
import "elefant/models"
import "gf-lt/models"
type Memories interface {
Memorise(m *models.Memory) (*models.Memory, error)

View File

@@ -1,7 +1,7 @@
package storage
import (
"elefant/models"
"gf-lt/models"
"log/slog"
_ "github.com/glebarez/go-sqlite"

View File

@@ -1,7 +1,7 @@
package storage
import (
"elefant/models"
"gf-lt/models"
"fmt"
"log/slog"
"os"

View File

@@ -1,7 +1,7 @@
package storage
import (
"elefant/models"
"gf-lt/models"
"errors"
"fmt"
"unsafe"

View File

@@ -7,9 +7,9 @@ import (
"strings"
"time"
"elefant/models"
"elefant/pngmeta"
"elefant/rag"
"gf-lt/models"
"gf-lt/pngmeta"
"gf-lt/rag"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"

View File

@@ -1,7 +1,7 @@
package main
import (
"elefant/models"
"gf-lt/models"
"fmt"
"regexp"
"strings"

6
tui.go
View File

@@ -1,9 +1,9 @@
package main
import (
"elefant/extra"
"elefant/models"
"elefant/pngmeta"
"gf-lt/extra"
"gf-lt/models"
"gf-lt/pngmeta"
"fmt"
"image"
_ "image/jpeg"