Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin definer #92

Closed
wants to merge 8 commits into from

Conversation

jucasoliveira
Copy link
Owner

No description provided.

… use Plugin interface for better organization and extensibility

feat(commands): add Plugin interface with name, keyword, description, execute properties
feat(commands): refactor clear command to use Plugin interface and improve code structure
feat(commands): refactor exit command to use Plugin interface and enhance code readability
feat(commands): refactor file command to use Plugin interface and improve modularity
feat(commands): refactor fileTree command to use Plugin interface for consistency
feat(commands): refactor index file to load plugins dynamically for better scalability
feat(commands): refactor web command to use Plugin interface and enhance code structure
feat(context): remove debug logs from context functions for cleaner code
feat(engine): add hasContext property to AiEngineConfig for context handling
feat(engine): update Engine class to handle hasContext property in engine options
feat(engine): update generateResponse function to include hasContext parameter for context-aware responses

refactor(anthropic.ts): add optional parameter 'hasContext' with default value
false to control adding context based on the flag
refactor(webHandler.ts): update console log message for clarity
refactor(index.ts): add new function 'determinePlugins' to handle plugin
determination logic, refactor plugin execution flow to use the new function
and improve error handling
refactor(utils.ts): add new function 'promptCerebro' to handle prompt
response for Cerebro engine, improve error handling in 'promptResponse'
Copy link

github-actions bot commented Sep 11, 2024

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements
41.31% (+2.4% 🔼)
145/351
🔴 Branches
15.79% (-1.21% 🔻)
18/114
🔴 Functions
28.57% (+5.49% 🔼)
12/42
🔴 Lines
40.36% (+2.02% 🔼)
136/337
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢 commands/clear.ts 100% 100% 100% 100%
🟢 commands/exit.ts 100% 100% 100% 100%
🔴 version.ts 50% 100% 0% 44.44%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴 utils.ts
44.23% (-5.77% 🔻)
18.18% (-15.15% 🔻)
16.67% (-8.33% 🔻)
42.55% (-9.06% 🔻)
🔴 engine/openAi.ts
25% (-1.09% 🔻)
0% 0%
21.74% (-0.99% 🔻)
🔴 engine/anthropic.ts
15.38% (-0.4% 🔻)
0% 0%
13.16% (-0.36% 🔻)
🔴 engine/gemini.ts
18.52% (-1.48% 🔻)
0% 0%
16% (-1.39% 🔻)
🔴 engine/ollama.ts
20% (-1.43% 🔻)
0% 0%
17.24% (-1.28% 🔻)

Test suite run success

12 tests passing in 3 suites.

Report generated by 🧪jest coverage report action from 59c0a60

…dex.ts

feat(commands): implement loading and handling of plugins in index.ts to enhance modularity and extensibility
feat(commands): add list.ts and scrapper.ts plugins to provide listing and web scraping functionalities
feat(engine): refactor Engine class into a function to create AI engine instances based on engine type
feat(engine): add support for different AI engine types in Engine function to improve flexibility
feat(engine): update generateResponse function to use Engine function for creating AI engine instances
feat(engine): add eslint-disable comment for specific rule in anthropic.ts
feat(handlers): update handleWebResearch function to return webContext for better error handling
feat(index): refactor determinePlugins function into determinePlugins module for better organization
feat(index): update chat command in index.ts to use determinePlugins module for plugin determination

docs(intro.ts): update introduction message and usage instructions for TerminalGPT
feat(intro.ts): enhance TerminalGPT with plugin support for extended functionality
feat(rag/index.ts): add function to determine applicable plugins based on user input
refactor(utils.ts): remove unused import of clipboard package
…rt async operations

feat(intro.ts): update ASCII art in intro function for better visual presentation
feat(rag/index.ts): add functionality to store and retrieve conversation context in determinePlugins function
…ctions to handle context in different engine types

feat(anthropic.ts): Remove unnecessary console.log statement
feat(gemini.ts): Update GeminiEngine to handle context based on 'hasContext' parameter
feat(ollama.ts): Update OllamaEngine to handle context based on 'hasContext' parameter and 'baseURL' parameter
feat(openAi.ts): Update OpenAIEngine to handle context based on 'hasContext' parameter
…ommands

feat(package.json): add @types/execa to devDependencies for type definitions
feat(commands): add new 'update' command to update the package
refactor(index.ts): call checkIsLatestVersion function before apiKeyPrompt
refactor(utils.ts): add checkIsLatestVersion function to compare package version
feat(version.ts): add getTerminalGPTLatestVersion function to fetch latest version
refactor(utils.ts): import currentPackage from package.json for version comparison
refactor(tsconfig.json): set resolveJsonModule to true for JSON module resolution
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