jarvis-ai-assistant 0.1.111__py3-none-any.whl → 0.1.112__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of jarvis-ai-assistant might be problematic. Click here for more details.
- jarvis/__init__.py +1 -1
- jarvis/agent.py +40 -34
- jarvis/jarvis_code_agent/code_agent.py +23 -5
- jarvis/jarvis_code_agent/file_select.py +16 -16
- jarvis/jarvis_code_agent/patch.py +17 -11
- jarvis/jarvis_code_agent/relevant_files.py +33 -40
- jarvis/jarvis_codebase/main.py +57 -48
- jarvis/jarvis_lsp/cpp.py +1 -1
- jarvis/jarvis_lsp/go.py +1 -1
- jarvis/jarvis_lsp/python.py +0 -2
- jarvis/jarvis_lsp/registry.py +13 -13
- jarvis/jarvis_lsp/rust.py +1 -1
- jarvis/jarvis_platform/ai8.py +14 -14
- jarvis/jarvis_platform/base.py +1 -1
- jarvis/jarvis_platform/kimi.py +17 -17
- jarvis/jarvis_platform/ollama.py +14 -14
- jarvis/jarvis_platform/openai.py +8 -8
- jarvis/jarvis_platform/oyi.py +19 -19
- jarvis/jarvis_platform/registry.py +6 -6
- jarvis/jarvis_platform_manager/main.py +17 -17
- jarvis/jarvis_rag/main.py +25 -25
- jarvis/jarvis_smart_shell/main.py +6 -6
- jarvis/jarvis_tools/ask_codebase.py +3 -3
- jarvis/jarvis_tools/ask_user.py +2 -2
- jarvis/jarvis_tools/create_code_agent.py +8 -8
- jarvis/jarvis_tools/create_sub_agent.py +2 -2
- jarvis/jarvis_tools/execute_shell.py +2 -2
- jarvis/jarvis_tools/file_operation.py +1 -1
- jarvis/jarvis_tools/git_commiter.py +4 -4
- jarvis/jarvis_tools/methodology.py +3 -3
- jarvis/jarvis_tools/rag.py +3 -3
- jarvis/jarvis_tools/read_code.py +1 -1
- jarvis/jarvis_tools/read_webpage.py +19 -6
- jarvis/jarvis_tools/registry.py +11 -11
- jarvis/jarvis_tools/search.py +88 -27
- jarvis/jarvis_tools/select_code_files.py +1 -1
- jarvis/jarvis_tools/tool_generator.py +182 -0
- jarvis/utils.py +18 -20
- jarvis_ai_assistant-0.1.112.dist-info/METADATA +460 -0
- jarvis_ai_assistant-0.1.112.dist-info/RECORD +64 -0
- jarvis_ai_assistant-0.1.111.dist-info/METADATA +0 -461
- jarvis_ai_assistant-0.1.111.dist-info/RECORD +0 -63
- {jarvis_ai_assistant-0.1.111.dist-info → jarvis_ai_assistant-0.1.112.dist-info}/LICENSE +0 -0
- {jarvis_ai_assistant-0.1.111.dist-info → jarvis_ai_assistant-0.1.112.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.1.111.dist-info → jarvis_ai_assistant-0.1.112.dist-info}/entry_points.txt +0 -0
- {jarvis_ai_assistant-0.1.111.dist-info → jarvis_ai_assistant-0.1.112.dist-info}/top_level.txt +0 -0
|
@@ -1,461 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.2
|
|
2
|
-
Name: jarvis-ai-assistant
|
|
3
|
-
Version: 0.1.111
|
|
4
|
-
Summary: Jarvis: An AI assistant that uses tools to interact with the system
|
|
5
|
-
Home-page: https://github.com/skyfireitdiy/Jarvis
|
|
6
|
-
Author: skyfire
|
|
7
|
-
Author-email: Your Name <your.email@example.com>
|
|
8
|
-
License: MIT License
|
|
9
|
-
|
|
10
|
-
Copyright (c) 2025 skyfire
|
|
11
|
-
|
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
-
in the Software without restriction, including without limitation the rights
|
|
15
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
-
furnished to do so, subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
-
SOFTWARE.
|
|
29
|
-
Project-URL: Homepage, https://github.com/skyfireitdiy/Jarvis
|
|
30
|
-
Keywords: jarvis,ai,assistant,tools,automation
|
|
31
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
32
|
-
Classifier: Programming Language :: Python
|
|
33
|
-
Classifier: Programming Language :: Python :: 3
|
|
34
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
35
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
36
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
37
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
38
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
39
|
-
Requires-Python: >=3.8
|
|
40
|
-
Description-Content-Type: text/markdown
|
|
41
|
-
License-File: LICENSE
|
|
42
|
-
Requires-Dist: requests>=2.25.1
|
|
43
|
-
Requires-Dist: pyyaml>=5.1
|
|
44
|
-
Requires-Dist: colorama>=0.4.6
|
|
45
|
-
Requires-Dist: prompt_toolkit>=3.0.0
|
|
46
|
-
Requires-Dist: openai>=1.20.0
|
|
47
|
-
Requires-Dist: playwright>=1.41.1
|
|
48
|
-
Requires-Dist: numpy>=1.17.4
|
|
49
|
-
Requires-Dist: faiss-cpu>=1.8.0
|
|
50
|
-
Requires-Dist: sentence-transformers>=2.2.2
|
|
51
|
-
Requires-Dist: bs4>=0.0.1
|
|
52
|
-
Requires-Dist: PyMuPDF>=1.21.0
|
|
53
|
-
Requires-Dist: python-docx>=0.8.11
|
|
54
|
-
Requires-Dist: tiktoken>=0.3.0
|
|
55
|
-
Requires-Dist: tqdm>=4.65.0
|
|
56
|
-
Requires-Dist: docx>=0.2.4
|
|
57
|
-
Requires-Dist: yaspin>=2.5.0
|
|
58
|
-
Requires-Dist: rich>=13.3.1
|
|
59
|
-
Requires-Dist: pygments>=2.15.0
|
|
60
|
-
Requires-Dist: fuzzywuzzy>=0.18.0
|
|
61
|
-
Requires-Dist: python-Levenshtein>=0.25.0
|
|
62
|
-
Requires-Dist: jedi>=0.17.2
|
|
63
|
-
Requires-Dist: psutil>=7.0.0
|
|
64
|
-
Provides-Extra: dev
|
|
65
|
-
Requires-Dist: pytest; extra == "dev"
|
|
66
|
-
Requires-Dist: black; extra == "dev"
|
|
67
|
-
Requires-Dist: isort; extra == "dev"
|
|
68
|
-
Requires-Dist: mypy; extra == "dev"
|
|
69
|
-
Dynamic: author
|
|
70
|
-
Dynamic: home-page
|
|
71
|
-
Dynamic: requires-python
|
|
72
|
-
|
|
73
|
-
<div align="center">
|
|
74
|
-
|
|
75
|
-
# 🤖 Jarvis AI Assistant
|
|
76
|
-
|
|
77
|
-
<p align="center">
|
|
78
|
-
<img src="docs/images/jarvis-logo.png" alt="Jarvis Logo" width="200"/>
|
|
79
|
-
</p>
|
|
80
|
-
|
|
81
|
-
[](https://www.python.org/downloads/)
|
|
82
|
-
[](https://opensource.org/licenses/MIT)
|
|
83
|
-
|
|
84
|
-
*Your intelligent assistant for development and system interaction*
|
|
85
|
-
|
|
86
|
-
English | [简体中文](README_zh.md)
|
|
87
|
-
|
|
88
|
-
[Features](#features) •
|
|
89
|
-
[Usage](#usage) •
|
|
90
|
-
[Configuration](#configuration) •
|
|
91
|
-
[Extending Jarvis](#-extending-jarvis) •
|
|
92
|
-
[Contributing](#-contributing) •
|
|
93
|
-
[License](#-license)
|
|
94
|
-
|
|
95
|
-
</div>
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## ✨ Features
|
|
100
|
-
|
|
101
|
-
### 🧠 Intelligent Agent
|
|
102
|
-
- Self-improving through experience accumulation
|
|
103
|
-
- Automatic methodology generation from successful problem-solving
|
|
104
|
-
- Iterative learning from each interaction
|
|
105
|
-
- Context-aware problem solving
|
|
106
|
-
|
|
107
|
-
### 🛠️ Extensible Architecture
|
|
108
|
-
- Dynamic tool loading and integration
|
|
109
|
-
- Custom model support with simple interface
|
|
110
|
-
- AI-powered tool generation
|
|
111
|
-
- Hot-reload support for tools and models
|
|
112
|
-
|
|
113
|
-
### 💡 Smart Features
|
|
114
|
-
- Automated methodology management
|
|
115
|
-
- Problem-specific solution patterns
|
|
116
|
-
- Continuous capability enhancement
|
|
117
|
-
- Learning from past interactions
|
|
118
|
-
|
|
119
|
-
### 🎨 User Experience
|
|
120
|
-
- Beautiful console output
|
|
121
|
-
- Interactive mode
|
|
122
|
-
- Multi-line input support
|
|
123
|
-
- Progress indicators
|
|
124
|
-
- Colored output
|
|
125
|
-
|
|
126
|
-
## 🚀 Installation
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
pip install jarvis-ai-assistant
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
## 🔧 Configuration
|
|
133
|
-
|
|
134
|
-
Jarvis supports configuration through environment variables that can be set in the `~/.jarvis/env` file:
|
|
135
|
-
|
|
136
|
-
| Environment Variable | Description | Default Value | Required |
|
|
137
|
-
|---------|------|--------|------|
|
|
138
|
-
| JARVIS_PLATFORM | AI platform to use | kimi | Yes |
|
|
139
|
-
| JARVIS_MODEL | Model name to use | kimi | No |
|
|
140
|
-
| JARVIS_CODEGEN_PLATFORM | Platform for code generation | Same as JARVIS_PLATFORM | No |
|
|
141
|
-
| JARVIS_CODEGEN_MODEL | Model for code generation | Same as JARVIS_MODEL | No |
|
|
142
|
-
| JARVIS_THINKING_PLATFORM | Platform for thinking tasks | Same as JARVIS_PLATFORM | No |
|
|
143
|
-
| JARVIS_THINKING_MODEL | Model for thinking tasks | Same as JARVIS_MODEL | No |
|
|
144
|
-
| JARVIS_CHEAP_PLATFORM | Platform for cheap operations | Same as JARVIS_PLATFORM | No |
|
|
145
|
-
| JARVIS_CHEAP_MODEL | Model for cheap operations | Same as JARVIS_MODEL | No |
|
|
146
|
-
| JARVIS_THREAD_COUNT | Number of threads | 1 | No |
|
|
147
|
-
| JARVIS_MAX_CONTEXT_LENGTH | Maximum context length | 131072 | No |
|
|
148
|
-
| JARVIS_MIN_PARAGRAPH_LENGTH | Minimum paragraph length | 50 | No |
|
|
149
|
-
| JARVIS_MAX_PARAGRAPH_LENGTH | Maximum paragraph length | 1000 | No |
|
|
150
|
-
| JARVIS_CONTEXT_WINDOW | Context window size | 5 | No |
|
|
151
|
-
| JARVIS_AUTO_COMPLETE | Enable auto completion | false | No |
|
|
152
|
-
| JARVIS_USE_METHODOLOGY | Enable methodology | true | No |
|
|
153
|
-
| JARVIS_RECORD_METHODOLOGY | Record methodology | true | No |
|
|
154
|
-
| JARVIS_NEED_SUMMARY | Generate summaries | true | No |
|
|
155
|
-
| JARVIS_DONT_USE_LOCAL_MODEL | Avoid using local models | false | No |
|
|
156
|
-
| OPENAI_API_KEY | API key for OpenAI platform | - | Required for OpenAI |
|
|
157
|
-
| OPENAI_API_BASE | Base URL for OpenAI API | https://api.openai.com | No |
|
|
158
|
-
| OPENAI_MODEL_NAME | Model name for OpenAI | gpt-4o | No |
|
|
159
|
-
| AI8_API_KEY | API key for AI8 platform | - | Required for AI8 |
|
|
160
|
-
| KIMI_API_KEY | API key for Kimi platform | - | Required for Kimi |
|
|
161
|
-
| OYI_API_KEY | API key for OYI platform | - | Required for OYI |
|
|
162
|
-
| OLLAMA_API_BASE | Base URL for Ollama API | http://localhost:11434 | No |
|
|
163
|
-
|
|
164
|
-
## Minimal Configuration (Example with OpenAI-compatible Interface)
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
JARVIS_PLATFORM=openai
|
|
168
|
-
JARVIS_MODEL=deepseek-chat
|
|
169
|
-
OPENAI_API_KEY=your_openai_api_key
|
|
170
|
-
OPENAI_API_BASE=https://api.deepseek.com/v1
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
## 🎯 Usage
|
|
174
|
-
|
|
175
|
-
### Code Modification
|
|
176
|
-
```bash
|
|
177
|
-
# Using main agent
|
|
178
|
-
jarvis
|
|
179
|
-
|
|
180
|
-
# Using code agent directly
|
|
181
|
-
jarvis-code-agent
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
### Codebase Query
|
|
185
|
-
```bash
|
|
186
|
-
# Ask questions about the codebase
|
|
187
|
-
jarvis-codebase ask "your question"
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
### Document Analysis (RAG)
|
|
191
|
-
```bash
|
|
192
|
-
# Build document index
|
|
193
|
-
jarvis-rag --dir /path/to/documents --build
|
|
194
|
-
|
|
195
|
-
# Ask questions about documents
|
|
196
|
-
jarvis-rag --query "your question"
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### Smart Shell
|
|
200
|
-
```bash
|
|
201
|
-
# Using full name
|
|
202
|
-
jarvis-smart-shell "describe what you want to do"
|
|
203
|
-
|
|
204
|
-
# Using shorthand
|
|
205
|
-
jss "describe what you want to do"
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
### Development Tools
|
|
209
|
-
```bash
|
|
210
|
-
# Manage git commits
|
|
211
|
-
jarvis-git-commit
|
|
212
|
-
|
|
213
|
-
# Manage AI platforms
|
|
214
|
-
jarvis-platform-manager
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
Each command supports `--help` flag for detailed usage information:
|
|
218
|
-
```bash
|
|
219
|
-
jarvis --help
|
|
220
|
-
jarvis-code-agent --help
|
|
221
|
-
jarvis-codebase --help
|
|
222
|
-
jarvis-rag --help
|
|
223
|
-
jarvis-smart-shell --help
|
|
224
|
-
jarvis-platform-manager --help
|
|
225
|
-
jarvis-git-commit --help
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
## 🛠️ Tools
|
|
229
|
-
|
|
230
|
-
### Built-in Tools
|
|
231
|
-
|
|
232
|
-
| Tool | Description |
|
|
233
|
-
|------|-------------|
|
|
234
|
-
| read_code | Read code files with line numbers and range support |
|
|
235
|
-
| execute_shell | Execute system commands and capture output |
|
|
236
|
-
| search | Web search for development related queries |
|
|
237
|
-
| ask_user | Interactive user input collection |
|
|
238
|
-
| ask_codebase | Intelligent codebase querying and analysis |
|
|
239
|
-
| code_review | Automated code review with multi-dimensional analysis |
|
|
240
|
-
| file_operation | Basic file operations (read/exists) |
|
|
241
|
-
| git_commiter | Automated git commit handling |
|
|
242
|
-
|
|
243
|
-
### Tool Locations
|
|
244
|
-
- Built-in tools: `src/jarvis/tools/`
|
|
245
|
-
- User tools: `~/.jarvis/tools/`
|
|
246
|
-
|
|
247
|
-
### Key Features
|
|
248
|
-
|
|
249
|
-
#### 1. Code Intelligence
|
|
250
|
-
- Smart file selection and analysis based on requirements
|
|
251
|
-
- Semantic codebase search and querying
|
|
252
|
-
- Efficient handling of large files with context-aware reading
|
|
253
|
-
- Precise patch-based code modifications
|
|
254
|
-
- Automated git commit management
|
|
255
|
-
|
|
256
|
-
#### 2. Multi-Model Architecture
|
|
257
|
-
- Support for multiple AI platforms (Kimi/OpenAI/AI8/OYI/Ollama)
|
|
258
|
-
- Platform-specific optimizations for different tasks
|
|
259
|
-
- Specialized models for code generation, thinking, and general tasks
|
|
260
|
-
- Streaming response support for better interaction
|
|
261
|
-
- Automatic model fallback and retry mechanisms
|
|
262
|
-
|
|
263
|
-
#### 3. RAG Capabilities
|
|
264
|
-
- Document indexing and semantic search
|
|
265
|
-
- Smart context management for large documents
|
|
266
|
-
- Automatic file change detection
|
|
267
|
-
- Efficient caching mechanisms
|
|
268
|
-
- Multi-format document support
|
|
269
|
-
|
|
270
|
-
#### 4. Development Tools
|
|
271
|
-
- Interactive shell command generation
|
|
272
|
-
- Code review with multi-dimensional analysis
|
|
273
|
-
- Codebase-aware problem solving
|
|
274
|
-
- File operations with safety checks
|
|
275
|
-
- Progress tracking and error handling
|
|
276
|
-
|
|
277
|
-
#### 5. User Experience
|
|
278
|
-
- Beautiful console output with color support
|
|
279
|
-
- Interactive multi-line input
|
|
280
|
-
- Progress indicators for long operations
|
|
281
|
-
- Clear error messages and handling
|
|
282
|
-
- Context-aware response formatting
|
|
283
|
-
|
|
284
|
-
## 🎯 Extending Jarvis
|
|
285
|
-
|
|
286
|
-
### Adding New Tools
|
|
287
|
-
|
|
288
|
-
Create a new Python file in `~/.jarvis/tools/` or `src/jarvis/tools/`:
|
|
289
|
-
|
|
290
|
-
```python
|
|
291
|
-
from typing import Dict, Any
|
|
292
|
-
from jarvis.utils import OutputType, PrettyOutput
|
|
293
|
-
|
|
294
|
-
class CustomTool:
|
|
295
|
-
name = "tool_name" # Tool name for invocation
|
|
296
|
-
description = "Tool description" # Tool purpose
|
|
297
|
-
parameters = { # JSON Schema for parameters
|
|
298
|
-
"type": "object",
|
|
299
|
-
"properties": {
|
|
300
|
-
"param1": {
|
|
301
|
-
"type": "string",
|
|
302
|
-
"description": "Parameter description"
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
"required": ["param1"]
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
def execute(self, args: Dict[str, Any]) -> Dict[str, Any]:
|
|
309
|
-
"""Execute tool functionality
|
|
310
|
-
|
|
311
|
-
Args:
|
|
312
|
-
args: Parameters passed to the tool
|
|
313
|
-
|
|
314
|
-
Returns:
|
|
315
|
-
Dict with execution results:
|
|
316
|
-
{
|
|
317
|
-
"success": bool,
|
|
318
|
-
"stdout": str, # On success
|
|
319
|
-
"stderr": str, # Optional error details
|
|
320
|
-
}
|
|
321
|
-
"""
|
|
322
|
-
try:
|
|
323
|
-
# Implement tool logic here
|
|
324
|
-
result = "Tool execution result"
|
|
325
|
-
return {
|
|
326
|
-
"success": True,
|
|
327
|
-
"stdout": result,
|
|
328
|
-
"stderr": ""
|
|
329
|
-
}
|
|
330
|
-
except Exception as e:
|
|
331
|
-
return {
|
|
332
|
-
"success": False,
|
|
333
|
-
"stdout": "",
|
|
334
|
-
"stderr": str(e)
|
|
335
|
-
}
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
### Adding New Models
|
|
339
|
-
|
|
340
|
-
Create a new Python file in `~/.jarvis/models/`:
|
|
341
|
-
|
|
342
|
-
```python
|
|
343
|
-
from typing import Dict, List
|
|
344
|
-
from jarvis.models.base import BasePlatform
|
|
345
|
-
from jarvis.utils import PrettyOutput, OutputType
|
|
346
|
-
|
|
347
|
-
class CustomPlatform(BasePlatform):
|
|
348
|
-
"""Custom model implementation"""
|
|
349
|
-
|
|
350
|
-
platform_name = "custom" # Platform identifier
|
|
351
|
-
|
|
352
|
-
def __init__(self):
|
|
353
|
-
"""Initialize model"""
|
|
354
|
-
# add initialization code
|
|
355
|
-
super().__init__()
|
|
356
|
-
self.messages = []
|
|
357
|
-
self.system_message = ""
|
|
358
|
-
|
|
359
|
-
def set_model_name(self, model_name: str):
|
|
360
|
-
"""Set model name"""
|
|
361
|
-
self.model_name = model_name
|
|
362
|
-
|
|
363
|
-
def chat(self, message: str) -> str:
|
|
364
|
-
"""Chat with model
|
|
365
|
-
|
|
366
|
-
Args:
|
|
367
|
-
message: user input message
|
|
368
|
-
|
|
369
|
-
Returns:
|
|
370
|
-
str: model response
|
|
371
|
-
"""
|
|
372
|
-
try:
|
|
373
|
-
# implement chat logic
|
|
374
|
-
PrettyOutput.print("Sending request...", OutputType.PROGRESS)
|
|
375
|
-
|
|
376
|
-
# add message to history
|
|
377
|
-
self.messages.append({"role": "user", "content": message})
|
|
378
|
-
|
|
379
|
-
# get response from model
|
|
380
|
-
response = "model response"
|
|
381
|
-
|
|
382
|
-
# add response to history
|
|
383
|
-
self.messages.append({"role": "assistant", "content": response})
|
|
384
|
-
|
|
385
|
-
return response
|
|
386
|
-
|
|
387
|
-
except Exception as e:
|
|
388
|
-
PrettyOutput.print(f"Chat failed: {str(e)}", OutputType.ERROR)
|
|
389
|
-
raise Exception(f"Chat failed: {str(e)}")
|
|
390
|
-
|
|
391
|
-
def upload_files(self, file_list: List[str]) -> List[Dict]:
|
|
392
|
-
"""Upload files"""
|
|
393
|
-
# implement file upload logic
|
|
394
|
-
return []
|
|
395
|
-
|
|
396
|
-
def reset(self):
|
|
397
|
-
"""Reset model state"""
|
|
398
|
-
self.messages = []
|
|
399
|
-
if self.system_message:
|
|
400
|
-
self.messages.append({"role": "system", "content": self.system_message})
|
|
401
|
-
|
|
402
|
-
def name(self) -> str:
|
|
403
|
-
"""Return model name"""
|
|
404
|
-
return self.model_name
|
|
405
|
-
|
|
406
|
-
def delete_chat(self) -> bool:
|
|
407
|
-
"""Delete current chat session"""
|
|
408
|
-
self.reset()
|
|
409
|
-
return True
|
|
410
|
-
|
|
411
|
-
def set_system_message(self, message: str):
|
|
412
|
-
"""Set system message"""
|
|
413
|
-
self.system_message = message
|
|
414
|
-
|
|
415
|
-
def set_suppress_output(self, suppress: bool):
|
|
416
|
-
"""Set whether to suppress output"""
|
|
417
|
-
self.suppress_output = suppress
|
|
418
|
-
```
|
|
419
|
-
|
|
420
|
-
### Development Guidelines
|
|
421
|
-
|
|
422
|
-
1. **Tool Development**
|
|
423
|
-
- Use descriptive names and documentation
|
|
424
|
-
- Define clear parameter schemas
|
|
425
|
-
- Handle errors gracefully
|
|
426
|
-
- Return standardized results
|
|
427
|
-
- Keep tools focused and simple
|
|
428
|
-
|
|
429
|
-
2. **Model Development**
|
|
430
|
-
- Implement all required methods
|
|
431
|
-
- Handle streaming responses
|
|
432
|
-
- Manage chat history properly
|
|
433
|
-
- Use proper error handling
|
|
434
|
-
- Follow existing model patterns
|
|
435
|
-
|
|
436
|
-
3. **Best Practices**
|
|
437
|
-
- Use PrettyOutput for console output
|
|
438
|
-
- Document your code
|
|
439
|
-
- Add type hints
|
|
440
|
-
- Test thoroughly
|
|
441
|
-
- Handle edge cases
|
|
442
|
-
|
|
443
|
-
## 🤝 Contributing
|
|
444
|
-
|
|
445
|
-
1. Fork the repository
|
|
446
|
-
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
|
447
|
-
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
|
448
|
-
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
449
|
-
5. Open a Pull Request
|
|
450
|
-
|
|
451
|
-
## 📄 License
|
|
452
|
-
|
|
453
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
454
|
-
|
|
455
|
-
---
|
|
456
|
-
|
|
457
|
-
<div align="center">
|
|
458
|
-
|
|
459
|
-
Made with ❤️ by the Jarvis Team
|
|
460
|
-
|
|
461
|
-
</div>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
jarvis/__init__.py,sha256=EwzKMyQQYv9-9h1YUWEh1i7Ne5vKRvUB3mF27llLwo4,51
|
|
2
|
-
jarvis/agent.py,sha256=r-wTNio1BwbySStjJH2fF-yCVftDJzWtX9GJxMrkD3Y,23062
|
|
3
|
-
jarvis/utils.py,sha256=iwmiKVg5ATyKzOGzDaunZHl2ThosQRMyqjQzj1Hu6Wc,27289
|
|
4
|
-
jarvis/jarvis_code_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
jarvis/jarvis_code_agent/code_agent.py,sha256=2EptFqsX7xgbTIrsr1lMxo7j6g1t0jrbuuS1J3QrrI0,6935
|
|
6
|
-
jarvis/jarvis_code_agent/file_select.py,sha256=w4s-aUqGRVC2zP45_QgMAlWuSq8ocnT1s1XRioejVNc,8222
|
|
7
|
-
jarvis/jarvis_code_agent/patch.py,sha256=0_T_P1NOGqYe91VaQ6oofNI1Q8XVcfxMH69aT-txd_c,4688
|
|
8
|
-
jarvis/jarvis_code_agent/relevant_files.py,sha256=BPc8HXIS86HdLS76j9seL9Sw78Eh3G_Oyj--lwdoZZY,3475
|
|
9
|
-
jarvis/jarvis_codebase/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
jarvis/jarvis_codebase/main.py,sha256=Yjy9P9xh1s7GIDskpajPObgE8zDfwj9-oi8eipEwWbw,39186
|
|
11
|
-
jarvis/jarvis_lsp/base.py,sha256=_7pdbMKjdtYBW0DsRbjIodDHM3J7df-YgXHejN_WIrU,4490
|
|
12
|
-
jarvis/jarvis_lsp/cpp.py,sha256=F7Zo3BErkvtWS1_H9zQO83pX_FUmnijux-2SjhWzKCE,4985
|
|
13
|
-
jarvis/jarvis_lsp/go.py,sha256=p8LULiFdq4qjDYQzXFlzH0-FQZ3IyfiwN_sbO9i0L_A,5310
|
|
14
|
-
jarvis/jarvis_lsp/python.py,sha256=MpnCWDwudJuSZuIxAU7o79ADLAqw_BaVpOzqwRZw-sg,4807
|
|
15
|
-
jarvis/jarvis_lsp/registry.py,sha256=e3gw1ubIi64YyjkbvhgvsxIpb5iWS5glD_279kMASCg,9831
|
|
16
|
-
jarvis/jarvis_lsp/rust.py,sha256=VeInvOvjcK2otOM4bTakjII6bJHl6TockwpXD3PLi5U,5541
|
|
17
|
-
jarvis/jarvis_platform/__init__.py,sha256=mrOt67nselz_H1gX9wdAO4y2DY5WPXzABqJbr5Des8k,63
|
|
18
|
-
jarvis/jarvis_platform/ai8.py,sha256=ZBWHZ1QQp8gjgEAVgDWPmzoALA1v8TKNdlo-hV5DkuY,12003
|
|
19
|
-
jarvis/jarvis_platform/base.py,sha256=nQ-rsJL1Z-gMev3TPoY7tYdwxhCJY8LG6_gtJ-maiW0,2181
|
|
20
|
-
jarvis/jarvis_platform/kimi.py,sha256=3yiOL2PsEcKEL0Yj0Hm3lTg9M0Ahy0Ou1AUnJ0AS0Ss,15768
|
|
21
|
-
jarvis/jarvis_platform/ollama.py,sha256=9Ptu-UzRMnNxqFlx9uDpHO0_Imrzf0Wfw9sZqnv2wRI,5681
|
|
22
|
-
jarvis/jarvis_platform/openai.py,sha256=NYAIaQbFH9Usg5ZxkBSek1F0imu-pDB9Qf6Am0AtU0s,4130
|
|
23
|
-
jarvis/jarvis_platform/oyi.py,sha256=11WcpJu0rsQfcHP1SVVwpbOjBoJzvQ6LELHWQMCvyzw,15065
|
|
24
|
-
jarvis/jarvis_platform/registry.py,sha256=9QLoihcnkYckrCzgNnlTqaLn_z_HMhaxMSyUNb8IEys,8538
|
|
25
|
-
jarvis/jarvis_platform_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
-
jarvis/jarvis_platform_manager/main.py,sha256=17607aNAStqJ1sOQLTGi6Tnv-cIQme_r5YvbB_S3enc,4985
|
|
27
|
-
jarvis/jarvis_rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
-
jarvis/jarvis_rag/main.py,sha256=Lr3b2eTB9TXZGZGdG4Sl9bdtE5NFRbv_bRysxeWNCEo,31354
|
|
29
|
-
jarvis/jarvis_smart_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
-
jarvis/jarvis_smart_shell/main.py,sha256=VdUR-x932OccEwU0pcQM_pb_I4yfrAutE3hfm6jf5es,3955
|
|
31
|
-
jarvis/jarvis_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
|
-
jarvis/jarvis_tools/ask_codebase.py,sha256=KLECEUGcAwXPAJF4sYV4CS2PYIc7RPBjHfUHZXCbMNQ,2994
|
|
33
|
-
jarvis/jarvis_tools/ask_user.py,sha256=9ZhIffoPGSfxJIwiIsL03V95yM8uYJsRg7j1C8ltNGc,1830
|
|
34
|
-
jarvis/jarvis_tools/base.py,sha256=c0DMoDDPxmsqUYJR989zgUs7nIYRY6GWBrAdusIZKjc,656
|
|
35
|
-
jarvis/jarvis_tools/chdir.py,sha256=A53BNXFB9tvwoV_cxW_LpF_DfxANgAEJ8rjikTaTa-I,1813
|
|
36
|
-
jarvis/jarvis_tools/code_review.py,sha256=SY6Xw1VhAmmNVCJZsgd6ItDBmth4bgjnpd0T0afGVSA,8581
|
|
37
|
-
jarvis/jarvis_tools/create_code_agent.py,sha256=prkWzgYPMt6N2IHaom5cyEQCE4d0adRRG3K1E71Tbfk,3923
|
|
38
|
-
jarvis/jarvis_tools/create_sub_agent.py,sha256=jBwh8hvg_LST2biLwjZkLseJFegn56mTdjh-xCIghmo,2860
|
|
39
|
-
jarvis/jarvis_tools/deep_thinking.py,sha256=ltsMUfmE8XNyYTkgpWMD1Qow-6_x0dcD8WL7qL4i8R8,4471
|
|
40
|
-
jarvis/jarvis_tools/deep_thinking_agent.py,sha256=UBBWq8kp6SDEhwYXjO-tMMHP7Wblx5OA-gpQ8h_1tdk,4378
|
|
41
|
-
jarvis/jarvis_tools/execute_shell.py,sha256=bawfof8bUg3f9bjyCSifLa9bU-hkNoNOuos22uZffdg,2564
|
|
42
|
-
jarvis/jarvis_tools/file_operation.py,sha256=-1U_J5SEuBjRylzEl7wvCfjspNv6aA49UvFHLNQ3bJU,4098
|
|
43
|
-
jarvis/jarvis_tools/git_commiter.py,sha256=bGGqSHraR5E1YMrGDudKh6uZyMEhjlLiCYJUp9wvFhU,2480
|
|
44
|
-
jarvis/jarvis_tools/lsp_find_definition.py,sha256=xV8YeN1RJfwd2F3gE6OnDeTwl-AnCmrxueHocbXkQOc,4800
|
|
45
|
-
jarvis/jarvis_tools/lsp_find_references.py,sha256=FohlJeLfTxcMUASfbjOT93hQGtI2WeyTpMGwRwShW_I,4043
|
|
46
|
-
jarvis/jarvis_tools/lsp_get_diagnostics.py,sha256=bEvbDk8TnKg9TTFFxMrYOJm5TBDgz5gO04WJFQUwQQE,4490
|
|
47
|
-
jarvis/jarvis_tools/lsp_get_document_symbols.py,sha256=dspL6r9HYnXL5TpARSApFY3IQLm2kcYVNVWCff2xoXI,3080
|
|
48
|
-
jarvis/jarvis_tools/lsp_prepare_rename.py,sha256=RxUyIef4awtp-jgupcD1LcPlno9P3mOE8AS3_Fm71Ys,4832
|
|
49
|
-
jarvis/jarvis_tools/lsp_validate_edit.py,sha256=M0iglK2QbnIEFv0RYK6o2iAYnv259jB6EU7To-rc51E,5247
|
|
50
|
-
jarvis/jarvis_tools/methodology.py,sha256=RFqcVjKuj8ESGmNYcQz_HyphsitDvF3XtqgGaqhafDQ,5770
|
|
51
|
-
jarvis/jarvis_tools/rag.py,sha256=2fQHqc4bw8JM-OxGTsHobLIOTo8Mip3rdtJCmAoY8XU,4952
|
|
52
|
-
jarvis/jarvis_tools/read_code.py,sha256=Pr7e06qHpVn7_cuXCZY1HuJ28MCHMPzCQltn9GSza8o,4030
|
|
53
|
-
jarvis/jarvis_tools/read_webpage.py,sha256=JCReSXhkDHDkQ606sZYIKG1Itlprjpmu1sSbF-Ed-jI,2478
|
|
54
|
-
jarvis/jarvis_tools/registry.py,sha256=OR-BxSVfI3ER_1rAPMZfLf45E2YpheeS01j8MJ8RGso,11841
|
|
55
|
-
jarvis/jarvis_tools/search.py,sha256=PLSSNETyajpqDoStCTfkoy-D41IMNudTuVzonMlT6Aw,9225
|
|
56
|
-
jarvis/jarvis_tools/select_code_files.py,sha256=bjJGwCNw0Ue_8jW60K1gcy1rUgKqoHihicu5SS58WNk,1890
|
|
57
|
-
jarvis/utils/date_utils.py,sha256=DZCQ91FBC4dnQRKCqNnACTg3HuqzQ7R1DRYqH59tON4,537
|
|
58
|
-
jarvis_ai_assistant-0.1.111.dist-info/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
|
|
59
|
-
jarvis_ai_assistant-0.1.111.dist-info/METADATA,sha256=FEftsBlMHWqbUroz5ZdWcDD6JaOZlKlzQ3PJshAC-bQ,14323
|
|
60
|
-
jarvis_ai_assistant-0.1.111.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
61
|
-
jarvis_ai_assistant-0.1.111.dist-info/entry_points.txt,sha256=UYj4FYvOH8jJ0GgCJTA_TAmJ3wvikos-hUVbCwt_KOc,480
|
|
62
|
-
jarvis_ai_assistant-0.1.111.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
|
|
63
|
-
jarvis_ai_assistant-0.1.111.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{jarvis_ai_assistant-0.1.111.dist-info → jarvis_ai_assistant-0.1.112.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{jarvis_ai_assistant-0.1.111.dist-info → jarvis_ai_assistant-0.1.112.dist-info}/top_level.txt
RENAMED
|
File without changes
|