Skip to content

Adds theme package for better color management. Fixes invalid Go version.#4

Merged
scalvert merged 10 commits intomainfrom
theme
Feb 8, 2025
Merged

Adds theme package for better color management. Fixes invalid Go version.#4
scalvert merged 10 commits intomainfrom
theme

Conversation

@scalvert
Copy link
Contributor

@scalvert scalvert commented Feb 8, 2025

Summary

This pull request includes several significant changes to the cmd/chat.go and cmd/search.go files to improve the code structure, remove unused imports, and enhance the chat and search functionalities. The changes include refactoring functions, modifying imports, and updating templates for better readability and maintainability.

Chat command improvements:

  • Removed unused imports and added a new import for theme in cmd/chat.go.
  • Introduced a new ChatState struct to hold the state for processing chat responses, improving the organization of state management.
  • Refactored the executeChat function to separate the chat request sending (sendChatRequest) and response processing (processChatResponse) into distinct functions. [1] [2] [3]
  • Replaced the greenCheck function with theme.Blue for consistent theming in chat stage formatting.

Search command improvements:

  • Removed unused imports and added a new import for theme in cmd/search.go.
  • Updated the default template for search results to use theme functions for consistent styling. [1] [2]
  • Simplified the runSearch function by removing unnecessary comments and organizing flag handling and options setting. [1] [2] [3] [4]
  • Replaced inline color functions with theme.TemplateFuncs to centralize color handling and improve maintainability.

General improvements:

  • Removed unused dependencies from go.mod to clean up the project dependencies.

@scalvert scalvert marked this pull request as ready for review February 8, 2025 00:50
@scalvert scalvert merged commit cc1600e into main Feb 8, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant