Documentation
¶
Overview ¶
Copyright 2025 Google LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2025 Google LLC ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteGcloudCommand ¶
ExecuteGcloudCommand executes a gcloud command and returns the output or an error.
func ExecuteKubectlCommand ¶
ExecuteKubectlCommand executes a kubectl command and returns the output or an error.
func Render ¶
Render formats a Block for display in the terminal. It applies different styles based on the type of block (e.g., error, agent, user, tool).
func Repl ¶
Repl starts the REPL (Read-Eval-Print Loop) for the BubbleChat application. It initializes the chat client, sets up the conversation history, and starts the BubbleTea program to handle user input and display the conversation. It's expected that outside of initializing the client you will not need to do anything to have an interactive session.
Types ¶
type Block ¶
Block represents a single message block in the conversation. It can be a user message, an AI response, an error message, or a tool response.
type Document ¶
type Document struct {
History
// contains filtered or unexported fields
}
Document also contains visual elements in addition to the conversation history datamodel.
func (*Document) HandleSend ¶
func (doc *Document) HandleSend()
HandleSend processes the user input when the Enter key is pressed. It adds the user input as a new block in the conversation history and sends the message to the chat service.
func (*Document) Init ¶
Init initializes the text input model and returns a command to start blinking the cursor. This function is called by BubbleTea when the program starts.
type History ¶
History represents the conversation history, which is a collection of blocks.
func NewHistory ¶
NewHistory creates a new conversation history with the given chat client and context.
func (*History) ExecuteFunctionCall ¶
func (h *History) ExecuteFunctionCall(fnCall gollm.FunctionCall) (string, error)