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/ history_bak/
.aider* .aider*
tags tags
gf-lt

View File

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

10
bot.go
View File

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

View File

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

2
go.mod
View File

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

2
llm.go
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

6
tui.go
View File

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