@ridit/lens 0.2.4 → 0.2.6

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.
Files changed (41) hide show
  1. package/LENS.md +32 -68
  2. package/README.md +91 -0
  3. package/addons/README.md +3 -0
  4. package/addons/run-tests.js +127 -0
  5. package/dist/index.mjs +226459 -2638
  6. package/package.json +13 -4
  7. package/src/colors.ts +5 -0
  8. package/src/commands/commit.tsx +686 -0
  9. package/src/commands/provider.tsx +36 -22
  10. package/src/components/__tests__/Header.test.tsx +9 -0
  11. package/src/components/chat/ChatMessage.tsx +6 -6
  12. package/src/components/chat/ChatOverlays.tsx +20 -10
  13. package/src/components/chat/ChatRunner.tsx +197 -31
  14. package/src/components/provider/ApiKeyStep.tsx +77 -121
  15. package/src/components/provider/ModelStep.tsx +35 -20
  16. package/src/components/{repo → provider}/ProviderPicker.tsx +1 -1
  17. package/src/components/provider/ProviderTypeStep.tsx +12 -5
  18. package/src/components/provider/RemoveProviderStep.tsx +7 -8
  19. package/src/components/repo/RepoAnalysis.tsx +1 -1
  20. package/src/components/task/TaskRunner.tsx +1 -1
  21. package/src/components/timeline/CommitDetail.tsx +2 -4
  22. package/src/components/timeline/CommitList.tsx +2 -14
  23. package/src/components/timeline/TimelineChat.tsx +1 -2
  24. package/src/components/timeline/TimelineRunner.tsx +506 -423
  25. package/src/index.tsx +38 -0
  26. package/src/prompts/fewshot.ts +144 -47
  27. package/src/prompts/system.ts +25 -21
  28. package/src/tools/chart.ts +210 -0
  29. package/src/tools/convert-image.ts +312 -0
  30. package/src/tools/files.ts +1 -9
  31. package/src/tools/git.ts +577 -0
  32. package/src/tools/index.ts +17 -13
  33. package/src/tools/pdf.ts +136 -78
  34. package/src/tools/view-image.ts +335 -0
  35. package/src/tools/web.ts +0 -4
  36. package/src/utils/addons/loadAddons.ts +6 -3
  37. package/src/utils/chat.ts +38 -23
  38. package/src/utils/thinking.tsx +275 -162
  39. package/src/utils/tools/builtins.ts +39 -32
  40. package/src/utils/tools/registry.ts +0 -14
  41. package/tsconfig.json +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ridit/lens",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "Know Your Codebase.",
5
5
  "author": "Ridit Jangra <riditjangra09@gmail.com> (https://ridit.space)",
6
6
  "license": "MIT",
@@ -15,22 +15,31 @@
15
15
  "scripts": {
16
16
  "build": "bun build src/index.tsx --target node --outfile dist/index.mjs",
17
17
  "postbuild": "node -e \"const fs=require('fs');const f='dist/index.mjs';fs.writeFileSync(f,'#!/usr/bin/env node\\n'+fs.readFileSync(f,'utf8'))\"",
18
- "prepublishOnly": "npm run build"
18
+ "prepublishOnly": "npm run build",
19
+ "test": "jest"
19
20
  },
20
21
  "dependencies": {
21
- "@ridit/lens-sdk": "0.1.4",
22
+ "@ridit/lens-sdk": "0.1.6",
23
+ "add": "^2.0.6",
24
+ "asciichart": "^1.5.25",
25
+ "bun": "^1.3.11",
22
26
  "commander": "^14.0.3",
23
27
  "figures": "^6.1.0",
24
28
  "ink": "^6.8.0",
25
29
  "ink-spinner": "^5.0.0",
26
30
  "ink-text-input": "^6.0.0",
27
31
  "nanoid": "^5.1.6",
32
+ "pdfkit": "^0.18.0",
28
33
  "react": "^19.2.4",
29
34
  "react-devtools-core": "^7.0.1",
30
- "sugar-high": "^0.9.5"
35
+ "sugar-high": "^0.9.5",
36
+ "terminal-image": "^4.2.0"
31
37
  },
32
38
  "devDependencies": {
39
+ "@types/asciichart": "^1.5.8",
33
40
  "@types/bun": "latest",
41
+ "@types/jest": "^30.0.0",
42
+ "@types/pdfkit": "^0.17.5",
34
43
  "@types/react": "^19.2.14"
35
44
  },
36
45
  "peerDependencies": {
package/src/colors.ts CHANGED
@@ -1,4 +1,9 @@
1
1
  export const ACCENT = "#DA7758";
2
+ export const HEADING = "#FFFFFF";
3
+ export const TEXT = "#E8E8E8";
4
+ export const RED = "#E06C75";
5
+ export const GREEN = "#85C98A";
6
+ export const CYAN = "#79C5D4";
2
7
 
3
8
  export const TOKEN_KEYWORD = "#B385C9";
4
9
  export const TOKEN_STRING = "#85C98A";