github-search-cli 9.8.0 → 9.8.1
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/CHANGELOG.md +46 -0
- package/README.md +70 -14
- package/completions/ghfind.bash +5 -1
- package/completions/ghfind.fish +6 -1
- package/completions/ghfind.zsh +14 -1
- package/dist/cli.js +694 -33
- package/package.json +1 -1
- package/release-notes/9.8.1.md +74 -0
- package/src/agent-skill.ts +14 -0
- package/src/cli.ts +413 -1
- package/src/image-loader.ts +30 -1
- package/src/markdown-view.ts +20 -4
- package/src/mcp-server.ts +60 -0
- package/src/readme.ts +54 -0
- package/src/skill-finder.ts +445 -0
- package/src/tui.ts +8 -22
package/src/tui.ts
CHANGED
|
@@ -75,7 +75,8 @@ import { saveSession, restoreSession } from "./session";
|
|
|
75
75
|
import { fetchDeepDive, buildDeepDiveText } from "./deepdive";
|
|
76
76
|
import { buildComparisonTable } from "./compare";
|
|
77
77
|
import { createMarkdownView } from "./markdown-view";
|
|
78
|
-
import { fetchImageBytes
|
|
78
|
+
import { fetchImageBytes } from "./image-loader";
|
|
79
|
+
import { fetchReadme } from "./readme";
|
|
79
80
|
import { fetchTopics } from "./explore";
|
|
80
81
|
import { exportToFile, type ExportFormat } from "./output";
|
|
81
82
|
import {
|
|
@@ -1888,28 +1889,13 @@ export async function launchBrowser(theme_override?: string): Promise<void> {
|
|
|
1888
1889
|
readmeScroll.scrollTop = 0;
|
|
1889
1890
|
showOverlay("readme");
|
|
1890
1891
|
try {
|
|
1891
|
-
const
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
["main", "README.md"],
|
|
1897
|
-
["master", "README.md"],
|
|
1898
|
-
["main", "README.rst"],
|
|
1899
|
-
] as const) {
|
|
1900
|
-
// The README's own URL doubles as the base for relative image paths.
|
|
1901
|
-
const url = readmeBaseUrl(repo.owner, repo.name, branch, file);
|
|
1902
|
-
const r = await fetch(url, { headers });
|
|
1903
|
-
if (r.ok) {
|
|
1904
|
-
text = await r.text();
|
|
1905
|
-
sourceUrl = url;
|
|
1906
|
-
break;
|
|
1907
|
-
}
|
|
1908
|
-
}
|
|
1909
|
-
if (!text) {
|
|
1910
|
-
readmeView.setContent(`_(no README found for ${repo.fullName})_`);
|
|
1892
|
+
const readme = await fetchReadme(repo.owner, repo.name, {
|
|
1893
|
+
token: githubToken,
|
|
1894
|
+
});
|
|
1895
|
+
if (readme) {
|
|
1896
|
+
readmeView.setContent(readme.text, readme.sourceUrl);
|
|
1911
1897
|
} else {
|
|
1912
|
-
readmeView.setContent(
|
|
1898
|
+
readmeView.setContent(`_(no README found for ${repo.fullName})_`);
|
|
1913
1899
|
}
|
|
1914
1900
|
} catch {
|
|
1915
1901
|
readmeView.setContent("_Failed to load README._");
|