Compare commits

..

No commits in common. "83d59c409539da8a0e02f9813dbad03cbddf52d8" and "7e69b1d83df466017734b61abf1a00405fe36fd4" have entirely different histories.

12 changed files with 2 additions and 115 deletions

1
.gitignore vendored
View File

@ -1,4 +1,3 @@
*.swp
go.mod
go.sum
*.pb.go

View File

@ -23,12 +23,3 @@ gemini-config:
gemini-go:
~/go/bin/gemini playback
add-BACnet:
~/go/bin/gemini --add log/BACnet.text
ls -lt ~/.config/gemini/
add-shell:
ls -lt ~/.config/gemini/
gemini --add log/2025-08-21-shell-v2.text
ls -lt ~/.config/gemini/

View File

@ -1,24 +0,0 @@
syntax = "proto3";
package main;
message Row {
repeated string fields = 1;
}
message Table {
int32 columns = 1;
repeated Row rows = 2;
}
message Chat {
bool gemini = 1;
bool user = 2;
string content = 3;
repeated string mountpoints = 4;
}
message Chats { // `autogenpb:marshal` `autogenpb:mutex`
string uuid = 1; // `autogenpb:uuid:9fd31f10-c25d-4d66-bc8d-5f6eb7c79057`
string version = 2; // `autogenpb:version:v0.0.1`
repeated Chat Chats = 3; // THIS MUST BE Chat and then Chats
}

View File

@ -60,40 +60,9 @@ func main() {
for _, toolCall := range chat.GetToolCalls() {
printToolCallBox(toolCall)
}
// Handle the new CodeSnippet field.
if snippets := chat.GetSnippets(); snippets != nil {
logDir := filepath.Dir(filename)
for _, snippet := range snippets {
printCodeSnippet(snippet, logDir)
}
}
}
}
// printCodeSnippet formats a code snippet block by reading its content from a file.
func printCodeSnippet(snippet *chatpb.CodeSnippet, logDir string) {
snippetPath := filepath.Join(logDir, snippet.GetFilename())
codeBytes, err := os.ReadFile(snippetPath)
if err != nil {
fmt.Printf("┌─[ ERROR: Could not read snippet file %s ]─\n\n", snippetPath)
return
}
code := string(codeBytes)
language := filepath.Base(snippet.GetFilename()) // Use the filename as the language for display
fmt.Printf("┌─[ Code Snippet: %s ]──────────────────────────────────\n", language)
// Print each line of the code indented.
for _, line := range strings.Split(strings.TrimSpace(code), "\n") {
fmt.Printf("│ %s\n", line)
}
fmt.Printf("└─────────────────────────────────────────────────────────\n\n")
}
// printToolCallBox handles the decorative formatting for a single tool call.
func printToolCallBox(tc *chatpb.ToolCall) {
boxWidth := termWidth - 2 // Account for the side borders.

View File

@ -1,28 +0,0 @@
uuid: "shell-path-log-02"
version: "v0.0.4 go.wit.com/lib/protobuf/chatpb"
Chats: {
from: USER
ctime: { seconds: 1724168400 }
ContentFile: "content/shell_v2_q1.content"
}
Chats: {
from: GEMINI
ctime: { seconds: 1724168460 }
ContentFile: "content/shell_v2_a1.content"
Snippets: {
filename: "content/shell_v2_a1.snippet"
}
}
Chats: {
from: USER
ctime: { seconds: 1724168520 }
ContentFile: "content/shell_v2_q2.content"
}
Chats: {
from: GEMINI
ctime: { seconds: 1724168580 }
ContentFile: "content/shell_v2_a2.content"
Snippets: {
filename: "content/shell_v2_a2.snippet"
}
}

View File

@ -3,10 +3,10 @@ version: "v0.0.3 go.wit.com/lib/protobuf/chatpb"
Chats: {
from: USER
ctime: { seconds: 1724166000 }
ContentFile: "content/bacnet_q1.content"
content_file: "content/bacnet_q1.content"
}
Chats: {
from: GEMINI
ctime: { seconds: 1724166060 }
ContentFile: "content/bacnet_a1.content"
content_file: "content/bacnet_a1.content"
}

View File

@ -1 +0,0 @@
You are absolutely right in your understanding, and your confusion is completely justified. The `PATH` variable **is** processed in order from left to right. The output you are seeing means that the `PATH` your shell is *actually* using is different from the one you've posted. The problem almost always comes from the shell startup files. The solution is to **prepend, don't append** your custom directories to the PATH.

View File

@ -1 +0,0 @@
export PATH="/home/jcarr/go/bin:$PATH"

View File

@ -1 +0,0 @@
You've found the root cause perfectly. This is a classic shell precedence issue. The order is: Aliases -> Keywords -> Functions -> Built-ins -> $PATH lookup. Your alias is being found at step 1, so the shell never even gets to step 5. The best solution is often to rename the alias in your `~/.bashrc` to something more specific, like `gemini-cli`.

View File

@ -1,5 +0,0 @@
# To bypass the alias for a single command:
\gemini --version
# To rename the alias permanently in your ~/.bashrc:
alias gemini-cli='node /home/jcarr/go/src/github.com/google-gemini/gemini-cli/scripts/start.js'

View File

@ -1,2 +0,0 @@
My PATH is: PATH=/home/jcarr/.local/bin/:/home/jcarr/jcarr/bin/:/home/jcarr/go/bin/:/sbin:/usr/sbin:/home/jcarr/go/bin:/usr/games:/home/jcarr/.local/bin/:/home/jcarr/go/bin/:/sbin:/usr/sbin:/home/jcarr/go/bin:/usr/games:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
but for some reason it is finding binaries in /usr/local/bin before /home/jcarr/go/bin. I thought the PATH was processed in order?

View File

@ -1,10 +0,0 @@
I see the problem. gemini is an alias. I'm not sure how to resolve this problem
jcarr@framebook:~/go/src/gemini$ which gemini
/home/jcarr/go/bin/gemini
jcarr@framebook:~/go/src/gemini$ /home/jcarr/go/bin/gemini --version
gemini v0.0.1-3-ga10b75d Built on 2025.08.21_1551
jcarr@framebook:~/go/src/gemini$ gemini --version
Checking build status...
Build is up-to-date.
jcarr@framebook:~/go/src/gemini$ alias |grep gemini
alias gemini='node /home/jcarr/go/src/github.com/google-gemini/gemini-cli/scripts/start.js'