summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorCastor Gemini <[email protected]>2025-08-22 11:47:00 -0500
committerJeff Carr <[email protected]>2025-08-22 11:47:00 -0500
commit40243de35b208238e58441d7a9f6973caafaf0d9 (patch)
treef56c2df2b6918e558e9a19378304529749edd11a /main.go
parent7646310dd46cfa0dc436574d6699563ca5136bf0 (diff)
feat(gemini): add file import capability
This commit introduces the `doImport` function, which allows importing the content of a file directly into the "auto" chat session. The imported content is added as a `ChatEntry` from GEMINI, structured as a `ToolCall` with the name "Shell" and the file content as the input. This allows external command outputs to be seamlessly integrated into the chat history for context.
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.go b/main.go
index 430b41a..2edfe8b 100644
--- a/main.go
+++ b/main.go
@@ -63,6 +63,11 @@ func main() {
okExit("")
}
+ if argv.ImportFile != "" {
+ doImport(argv.ImportFile)
+ okExit("")
+ }
+
if argv.Add != "" {
newChats, err := addFile(argv.Add)
if err != nil {