@ridit/lens 0.1.0
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.
- package/LENS.md +25 -0
- package/LICENSE +21 -0
- package/README.md +0 -0
- package/dist/index.js +49363 -0
- package/package.json +38 -0
- package/src/colors.ts +1 -0
- package/src/commands/chat.tsx +23 -0
- package/src/commands/provider.tsx +224 -0
- package/src/commands/repo.tsx +120 -0
- package/src/commands/review.tsx +294 -0
- package/src/commands/task.tsx +36 -0
- package/src/commands/timeline.tsx +22 -0
- package/src/components/chat/ChatMessage.tsx +176 -0
- package/src/components/chat/ChatOverlays.tsx +329 -0
- package/src/components/chat/ChatRunner.tsx +732 -0
- package/src/components/provider/ApiKeyStep.tsx +243 -0
- package/src/components/provider/ModelStep.tsx +73 -0
- package/src/components/provider/ProviderTypeStep.tsx +54 -0
- package/src/components/provider/RemoveProviderStep.tsx +83 -0
- package/src/components/repo/DiffViewer.tsx +175 -0
- package/src/components/repo/FileReviewer.tsx +70 -0
- package/src/components/repo/FileViewer.tsx +60 -0
- package/src/components/repo/IssueFixer.tsx +666 -0
- package/src/components/repo/LensFileMenu.tsx +122 -0
- package/src/components/repo/NoProviderPrompt.tsx +28 -0
- package/src/components/repo/PreviewRunner.tsx +217 -0
- package/src/components/repo/ProviderPicker.tsx +76 -0
- package/src/components/repo/RepoAnalysis.tsx +343 -0
- package/src/components/repo/StepRow.tsx +69 -0
- package/src/components/task/TaskRunner.tsx +396 -0
- package/src/components/timeline/CommitDetail.tsx +274 -0
- package/src/components/timeline/CommitList.tsx +174 -0
- package/src/components/timeline/TimelineChat.tsx +167 -0
- package/src/components/timeline/TimelineRunner.tsx +1209 -0
- package/src/index.tsx +60 -0
- package/src/types/chat.ts +69 -0
- package/src/types/config.ts +20 -0
- package/src/types/repo.ts +42 -0
- package/src/utils/ai.ts +233 -0
- package/src/utils/chat.ts +833 -0
- package/src/utils/config.ts +61 -0
- package/src/utils/files.ts +104 -0
- package/src/utils/git.ts +155 -0
- package/src/utils/history.ts +86 -0
- package/src/utils/lensfile.ts +77 -0
- package/src/utils/llm.ts +81 -0
- package/src/utils/preview.ts +119 -0
- package/src/utils/repo.ts +69 -0
- package/src/utils/stats.ts +174 -0
- package/src/utils/thinking.tsx +191 -0
- package/tsconfig.json +24 -0
package/LENS.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Lens Analysis
|
|
2
|
+
> Generated: 2026-03-11T17:49:46.564Z
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
This project is a CLI tool called 'lens' that analyzes a repository and provides insights. It uses React, Ink, and various other libraries to create a text-based interface. The tool has several commands, including 'repo' for analyzing a remote repository, 'init' for initializing the tool, and 'review' for reviewing a local codebase. The project is designed for developers who want to quickly understand a repository's structure and content.
|
|
6
|
+
|
|
7
|
+
## Important Folders
|
|
8
|
+
- src/components: contains various components, including FileReviewer, FileViewer, and ProviderPicker. Each component is used to display specific information about the repository.
|
|
9
|
+
- src/commands: contains the implementation of the 'repo', 'init', and 'review' commands. Each command has its own file and exports a function that handles the command's logic.
|
|
10
|
+
- src/utils: contains utility functions for tasks such as cloning a repository, reading files, and analyzing code. These functions are used throughout the project to perform specific tasks.
|
|
11
|
+
|
|
12
|
+
## Missing Configs
|
|
13
|
+
- None detected
|
|
14
|
+
|
|
15
|
+
## Security Issues
|
|
16
|
+
- None detected
|
|
17
|
+
|
|
18
|
+
## Suggestions
|
|
19
|
+
- In src/components/FileReviewer.tsx, consider adding a check to ensure that the 'files' prop is not empty before rendering the file list.
|
|
20
|
+
- In src/commands/repo.tsx, consider adding error handling for cases where the repository URL is invalid or the repository cannot be cloned.
|
|
21
|
+
- In src/utils/llm.ts, consider adding a timeout to the 'runPrompt' function to prevent it from running indefinitely if the model takes too long to respond.
|
|
22
|
+
|
|
23
|
+
<!--lens-json
|
|
24
|
+
{"overview":"This project is a CLI tool called 'lens' that analyzes a repository and provides insights. It uses React, Ink, and various other libraries to create a text-based interface. The tool has several commands, including 'repo' for analyzing a remote repository, 'init' for initializing the tool, and 'review' for reviewing a local codebase. The project is designed for developers who want to quickly understand a repository's structure and content.","importantFolders":["src/components: contains various components, including FileReviewer, FileViewer, and ProviderPicker. Each component is used to display specific information about the repository.","src/commands: contains the implementation of the 'repo', 'init', and 'review' commands. Each command has its own file and exports a function that handles the command's logic.","src/utils: contains utility functions for tasks such as cloning a repository, reading files, and analyzing code. These functions are used throughout the project to perform specific tasks."],"missingConfigs":[],"securityIssues":[],"suggestions":["In src/components/FileReviewer.tsx, consider adding a check to ensure that the 'files' prop is not empty before rendering the file list.","In src/commands/repo.tsx, consider adding error handling for cases where the repository URL is invalid or the repository cannot be cloned.","In src/utils/llm.ts, consider adding a timeout to the 'runPrompt' function to prevent it from running indefinitely if the model takes too long to respond."],"generatedAt":"2026-03-11T17:49:46.564Z"}
|
|
25
|
+
lens-json-->
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ridit
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
File without changes
|