From b0fe1fc871374dfbf81f9068f3e1b69cf0c2eefd Mon Sep 17 00:00:00 2001 From: Stijnus <72551117+Stijnus@users.noreply.github.com> Date: Fri, 24 Jan 2025 16:51:43 +0100 Subject: [PATCH] update --- .../settings/connections/ConnectionsTab.tsx | 13 ++++++++----- app/components/settings/debug/DebugTab.tsx | 5 ++++- app/components/ui/Collapsible.tsx | 1 - package.json | 1 + pnpm-lock.yaml | 15 +++++++++++++++ 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/app/components/settings/connections/ConnectionsTab.tsx b/app/components/settings/connections/ConnectionsTab.tsx index 79c26e86..b56c0ee6 100644 --- a/app/components/settings/connections/ConnectionsTab.tsx +++ b/app/components/settings/connections/ConnectionsTab.tsx @@ -101,12 +101,15 @@ export default function ConnectionsTab() { try { setIsFetchingStats(true); - // Fetch repositories - const reposResponse = await fetch('https://api.github.com/user/repos?sort=updated&per_page=10', { - headers: { - Authorization: `Bearer ${token}`, + // Fetch repositories - only owned by the authenticated user + const reposResponse = await fetch( + 'https://api.github.com/user/repos?sort=updated&per_page=10&affiliation=owner', + { + headers: { + Authorization: `Bearer ${token}`, + }, }, - }); + ); if (!reposResponse.ok) { throw new Error('Failed to fetch repositories'); diff --git a/app/components/settings/debug/DebugTab.tsx b/app/components/settings/debug/DebugTab.tsx index dcd2e7a1..ae376ba1 100644 --- a/app/components/settings/debug/DebugTab.tsx +++ b/app/components/settings/debug/DebugTab.tsx @@ -6,7 +6,7 @@ import type { LogEntry } from '~/lib/stores/logs'; import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '~/components/ui/Collapsible'; import { Progress } from '~/components/ui/Progress'; import { ScrollArea } from '~/components/ui/ScrollArea'; -import { Badge, type BadgeProps } from '~/components/ui/Badge'; +import { Badge } from '~/components/ui/Badge'; import { cn } from '~/lib/utils'; interface SystemInfo { @@ -373,11 +373,13 @@ export default function DebugTab() { if (!appInfoResponse.ok) { throw new Error('Failed to fetch webapp info'); } + const appData = (await appInfoResponse.json()) as Record; // Fetch git info const gitInfoResponse = await fetch('/api/system/git-info'); let gitInfo: GitInfo | undefined; + if (gitInfoResponse.ok) { gitInfo = (await gitInfoResponse.json()) as GitInfo; } @@ -385,6 +387,7 @@ export default function DebugTab() { // Fetch GitHub repository info const repoInfoResponse = await fetch('https://api.github.com/repos/stackblitz-labs/bolt.diy'); let repoInfo: WebAppInfo['repoInfo'] | undefined; + if (repoInfoResponse.ok) { const repoData = (await repoInfoResponse.json()) as GitHubRepoResponse; repoInfo = { diff --git a/app/components/ui/Collapsible.tsx b/app/components/ui/Collapsible.tsx index b2f7daa7..61ddbbb6 100644 --- a/app/components/ui/Collapsible.tsx +++ b/app/components/ui/Collapsible.tsx @@ -1,6 +1,5 @@ 'use client'; -import * as React from 'react'; import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'; const Collapsible = CollapsiblePrimitive.Root; diff --git a/package.json b/package.json index bdf32152..1c2687ee 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "@octokit/rest": "^21.0.2", "@octokit/types": "^13.6.2", "@openrouter/ai-sdk-provider": "^0.0.5", + "@phosphor-icons/react": "^2.1.7", "@radix-ui/react-collapsible": "^1.0.3", "@radix-ui/react-context-menu": "^2.2.2", "@radix-ui/react-dialog": "^1.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9eb1b1f8..e2f5e663 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -98,6 +98,9 @@ importers: '@openrouter/ai-sdk-provider': specifier: ^0.0.5 version: 0.0.5(zod@3.23.8) + '@phosphor-icons/react': + specifier: ^2.1.7 + version: 2.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-collapsible': specifier: ^1.0.3 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: resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==} engines: {node: '>=8.0.0'} + '@phosphor-icons/react@2.1.7': + resolution: {integrity: sha512-g2e2eVAn1XG2a+LI09QU3IORLhnFNAFkNbo2iwbX6NOKSLOwvEMmTa7CgOzEbgNWR47z8i8kwjdvYZ5fkGx1mQ==} + engines: {node: '>=10'} + peerDependencies: + react: '>= 16.8' + react-dom: '>= 16.8' + '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -8533,6 +8543,11 @@ snapshots: '@opentelemetry/api@1.9.0': {} + '@phosphor-icons/react@2.1.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + '@pkgjs/parseargs@0.11.0': optional: true