Stijnus
commited on
Commit
·
b0fe1fc
1
Parent(s):
7378d75
update
Browse files
app/components/settings/connections/ConnectionsTab.tsx
CHANGED
|
@@ -101,12 +101,15 @@ export default function ConnectionsTab() {
|
|
| 101 |
try {
|
| 102 |
setIsFetchingStats(true);
|
| 103 |
|
| 104 |
-
// Fetch repositories
|
| 105 |
-
const reposResponse = await fetch(
|
| 106 |
-
|
| 107 |
-
|
|
|
|
|
|
|
|
|
|
| 108 |
},
|
| 109 |
-
|
| 110 |
|
| 111 |
if (!reposResponse.ok) {
|
| 112 |
throw new Error('Failed to fetch repositories');
|
|
|
|
| 101 |
try {
|
| 102 |
setIsFetchingStats(true);
|
| 103 |
|
| 104 |
+
// Fetch repositories - only owned by the authenticated user
|
| 105 |
+
const reposResponse = await fetch(
|
| 106 |
+
'https://api.github.com/user/repos?sort=updated&per_page=10&affiliation=owner',
|
| 107 |
+
{
|
| 108 |
+
headers: {
|
| 109 |
+
Authorization: `Bearer ${token}`,
|
| 110 |
+
},
|
| 111 |
},
|
| 112 |
+
);
|
| 113 |
|
| 114 |
if (!reposResponse.ok) {
|
| 115 |
throw new Error('Failed to fetch repositories');
|
app/components/settings/debug/DebugTab.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import type { LogEntry } from '~/lib/stores/logs';
|
|
| 6 |
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '~/components/ui/Collapsible';
|
| 7 |
import { Progress } from '~/components/ui/Progress';
|
| 8 |
import { ScrollArea } from '~/components/ui/ScrollArea';
|
| 9 |
-
import { Badge
|
| 10 |
import { cn } from '~/lib/utils';
|
| 11 |
|
| 12 |
interface SystemInfo {
|
|
@@ -373,11 +373,13 @@ export default function DebugTab() {
|
|
| 373 |
if (!appInfoResponse.ok) {
|
| 374 |
throw new Error('Failed to fetch webapp info');
|
| 375 |
}
|
|
|
|
| 376 |
const appData = (await appInfoResponse.json()) as Record<string, unknown>;
|
| 377 |
|
| 378 |
// Fetch git info
|
| 379 |
const gitInfoResponse = await fetch('/api/system/git-info');
|
| 380 |
let gitInfo: GitInfo | undefined;
|
|
|
|
| 381 |
if (gitInfoResponse.ok) {
|
| 382 |
gitInfo = (await gitInfoResponse.json()) as GitInfo;
|
| 383 |
}
|
|
@@ -385,6 +387,7 @@ export default function DebugTab() {
|
|
| 385 |
// Fetch GitHub repository info
|
| 386 |
const repoInfoResponse = await fetch('https://api.github.com/repos/stackblitz-labs/bolt.diy');
|
| 387 |
let repoInfo: WebAppInfo['repoInfo'] | undefined;
|
|
|
|
| 388 |
if (repoInfoResponse.ok) {
|
| 389 |
const repoData = (await repoInfoResponse.json()) as GitHubRepoResponse;
|
| 390 |
repoInfo = {
|
|
|
|
| 6 |
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '~/components/ui/Collapsible';
|
| 7 |
import { Progress } from '~/components/ui/Progress';
|
| 8 |
import { ScrollArea } from '~/components/ui/ScrollArea';
|
| 9 |
+
import { Badge } from '~/components/ui/Badge';
|
| 10 |
import { cn } from '~/lib/utils';
|
| 11 |
|
| 12 |
interface SystemInfo {
|
|
|
|
| 373 |
if (!appInfoResponse.ok) {
|
| 374 |
throw new Error('Failed to fetch webapp info');
|
| 375 |
}
|
| 376 |
+
|
| 377 |
const appData = (await appInfoResponse.json()) as Record<string, unknown>;
|
| 378 |
|
| 379 |
// Fetch git info
|
| 380 |
const gitInfoResponse = await fetch('/api/system/git-info');
|
| 381 |
let gitInfo: GitInfo | undefined;
|
| 382 |
+
|
| 383 |
if (gitInfoResponse.ok) {
|
| 384 |
gitInfo = (await gitInfoResponse.json()) as GitInfo;
|
| 385 |
}
|
|
|
|
| 387 |
// Fetch GitHub repository info
|
| 388 |
const repoInfoResponse = await fetch('https://api.github.com/repos/stackblitz-labs/bolt.diy');
|
| 389 |
let repoInfo: WebAppInfo['repoInfo'] | undefined;
|
| 390 |
+
|
| 391 |
if (repoInfoResponse.ok) {
|
| 392 |
const repoData = (await repoInfoResponse.json()) as GitHubRepoResponse;
|
| 393 |
repoInfo = {
|
app/components/ui/Collapsible.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
'use client';
|
| 2 |
|
| 3 |
-
import * as React from 'react';
|
| 4 |
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
| 5 |
|
| 6 |
const Collapsible = CollapsiblePrimitive.Root;
|
|
|
|
| 1 |
'use client';
|
| 2 |
|
|
|
|
| 3 |
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
| 4 |
|
| 5 |
const Collapsible = CollapsiblePrimitive.Root;
|
package.json
CHANGED
|
@@ -59,6 +59,7 @@
|
|
| 59 |
"@octokit/rest": "^21.0.2",
|
| 60 |
"@octokit/types": "^13.6.2",
|
| 61 |
"@openrouter/ai-sdk-provider": "^0.0.5",
|
|
|
|
| 62 |
"@radix-ui/react-collapsible": "^1.0.3",
|
| 63 |
"@radix-ui/react-context-menu": "^2.2.2",
|
| 64 |
"@radix-ui/react-dialog": "^1.1.2",
|
|
|
|
| 59 |
"@octokit/rest": "^21.0.2",
|
| 60 |
"@octokit/types": "^13.6.2",
|
| 61 |
"@openrouter/ai-sdk-provider": "^0.0.5",
|
| 62 |
+
"@phosphor-icons/react": "^2.1.7",
|
| 63 |
"@radix-ui/react-collapsible": "^1.0.3",
|
| 64 |
"@radix-ui/react-context-menu": "^2.2.2",
|
| 65 |
"@radix-ui/react-dialog": "^1.1.2",
|
pnpm-lock.yaml
CHANGED
|
@@ -98,6 +98,9 @@ importers:
|
|
| 98 |
'@openrouter/ai-sdk-provider':
|
| 99 |
specifier: ^0.0.5
|
| 100 |
version: 0.0.5(zod@3.23.8)
|
|
|
|
|
|
|
|
|
|
| 101 |
'@radix-ui/react-collapsible':
|
| 102 |
specifier: ^1.0.3
|
| 103 |
version: 1.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
|
@@ -1881,6 +1884,13 @@ packages:
|
|
| 1881 |
resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==}
|
| 1882 |
engines: {node: '>=8.0.0'}
|
| 1883 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1884 |
'@pkgjs/parseargs@0.11.0':
|
| 1885 |
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
|
| 1886 |
engines: {node: '>=14'}
|
|
@@ -8533,6 +8543,11 @@ snapshots:
|
|
| 8533 |
|
| 8534 |
'@opentelemetry/api@1.9.0': {}
|
| 8535 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8536 |
'@pkgjs/parseargs@0.11.0':
|
| 8537 |
optional: true
|
| 8538 |
|
|
|
|
| 98 |
'@openrouter/ai-sdk-provider':
|
| 99 |
specifier: ^0.0.5
|
| 100 |
version: 0.0.5(zod@3.23.8)
|
| 101 |
+
'@phosphor-icons/react':
|
| 102 |
+
specifier: ^2.1.7
|
| 103 |
+
version: 2.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
| 104 |
'@radix-ui/react-collapsible':
|
| 105 |
specifier: ^1.0.3
|
| 106 |
version: 1.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
|
|
|
| 1884 |
resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==}
|
| 1885 |
engines: {node: '>=8.0.0'}
|
| 1886 |
|
| 1887 |
+
'@phosphor-icons/react@2.1.7':
|
| 1888 |
+
resolution: {integrity: sha512-g2e2eVAn1XG2a+LI09QU3IORLhnFNAFkNbo2iwbX6NOKSLOwvEMmTa7CgOzEbgNWR47z8i8kwjdvYZ5fkGx1mQ==}
|
| 1889 |
+
engines: {node: '>=10'}
|
| 1890 |
+
peerDependencies:
|
| 1891 |
+
react: '>= 16.8'
|
| 1892 |
+
react-dom: '>= 16.8'
|
| 1893 |
+
|
| 1894 |
'@pkgjs/parseargs@0.11.0':
|
| 1895 |
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
|
| 1896 |
engines: {node: '>=14'}
|
|
|
|
| 8543 |
|
| 8544 |
'@opentelemetry/api@1.9.0': {}
|
| 8545 |
|
| 8546 |
+
'@phosphor-icons/react@2.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
|
| 8547 |
+
dependencies:
|
| 8548 |
+
react: 18.3.1
|
| 8549 |
+
react-dom: 18.3.1(react@18.3.1)
|
| 8550 |
+
|
| 8551 |
'@pkgjs/parseargs@0.11.0':
|
| 8552 |
optional: true
|
| 8553 |
|