feat(gemini): add timestamp to auto chat entries
This commit is contained in:
parent
3f6a796181
commit
5db2567e60
|
@ -2,9 +2,11 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
|
|
||||||
"go.wit.com/lib/protobuf/chatpb"
|
"go.wit.com/lib/protobuf/chatpb"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
|
"google.golang.org/protobuf/types/known/timestamppb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func doOutput(s string) {
|
func doOutput(s string) {
|
||||||
|
@ -42,6 +44,7 @@ func doOutput(s string) {
|
||||||
newEntry := &chatpb.ChatEntry{
|
newEntry := &chatpb.ChatEntry{
|
||||||
From: chatpb.Who_GEMINI,
|
From: chatpb.Who_GEMINI,
|
||||||
Content: s,
|
Content: s,
|
||||||
|
Ctime: timestamppb.New(time.Now()),
|
||||||
}
|
}
|
||||||
autoChat.Entries = append(autoChat.Entries, newEntry)
|
autoChat.Entries = append(autoChat.Entries, newEntry)
|
||||||
if err := all.ConfigSave(); err != nil {
|
if err := all.ConfigSave(); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue