text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_suffix|> (executionProcess) => executionProcess.session_id === sessionId
)
: streamedExecutionProcesses;
const executionProcessesById = executionProcesses.reduce<
Record<string, ExecutionProcess>
>((processesById, executionProcess) => {
processesById[executionProcess.id] = executionProce... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>vider'
);
}
return ctx;
};
<|fim_prefix|>import { useContext } from 'react';
import { createHmrContext } from '@/shared/lib/hmrContext';
import type { ExecutionProcess } from 'shared/types';
export type ExecutionProcessesContextType = {
executionProcessesAll: ExecutionProcess[];
executionProc... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import type {
BaseCodingAgent,
ExecutorConfig,
ExecutorProfile,
ExecutorProfileId,
} from 'shared/types';
import { getVariantOptions } from '@/shared/lib/executor';
import { usePresetOptions } from '@/shared/hooks/usePreset... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useCallback, useEffect, useMemo } from 'react';
import type { BaseCodingAgent, ExecutorDiscoveredOptions } from 'shared/types';
import { useJsonPatchWsStream } from '@/shared/hooks/useJsonPatchWsStream';
import { agentsApi } from '@/shared/lib/api';
type ExecutorDiscoveryStreamState = {
option... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|> result.message || 'Force push failed',
result.error
);
}
},
onSuccess: () => {
// A force push affects remote status; invalidate the same branchStatus
queryClient.invalidateQueries({
queryKey: ['branchStatus', workspaceId],
});
onSu... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useMemo, useCallback } from 'react';
import { usePrComments } from '@/shared/hooks/usePrComments';
import {
usePersistedExpanded,
PERSIST_KEYS,
} from '@/shared/stores/useUiPreferencesStore';
import type { UnifiedPrComment } from 'shared/types';
import { DiffSide } from '@/shared/types/diff';... | fim | BloopAI/vibe-kanban | typescript |
import { useQuery } from '@tanstack/react-query';
async function fetchGitHubStars(): Promise<number | null> {
try {
const res = await fetch(
'https://api.github.com/repos/BloopAI/vibe-kanban',
{ cache: 'no-store' }
);
if (!res.ok) {
console.warn(`GitHub API error: ${res.status}`);
... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>eAsync,
forcePush: forcePush.mutateAsync,
changeTargetBranch: changeTargetBranch.mutateAsync,
},
isAnyLoading,
states: {
rebasePending: rebase.isPending,
mergePending: merge.isPending,
pushPending: push.isPending,
forcePushPending: forcePush.isPending,
... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>tData.mobile (Chrome, Edge, Opera β ~76% of browsers)
const nav = navigator as Navigator & { userAgentData?: { mobile?: boolean } };
if (nav.userAgentData?.mobile !== undefined) {
return nav.userAgentData.mobile;
}
// Fallback: user-agent string regex (Safari, Firefox)
return /Android|webOS|... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useContext } from 'react';
import { createHmrContext } from '@/shared/lib/hmrContext';
import type { InsertResult, MutationResult } from '@/shared/lib/electric/types';
import type {
IssueComment,
IssueCommentReaction,
CreateIssueCommentRequest,
UpdateIssueCommentRequest,
CreateIssueComm... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useCallback, type MouseEvent } from 'react';
import { useIssueSelectionStore } from '@/shared/stores/useIssueSelectionStore';
export function useIssueMultiSelect() {
const selectedIssueIds = useIssueSelectionStore((s) => s.selectedIssueIds);
const toggleIssue = useIssueSelectionStore((s) => ... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useEffect, useState, useRef } from 'react';
import { produce } from 'immer';
import type { Operation } from 'rfc6902';
import { applyUpsertPatch } from '@/shared/lib/jsonPatch';
import { openLocalApiWebSocket } from '@/shared/lib/localApiTransport';
type WsJsonPatchMsg = { JsonPatch: Operation[]... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|> merged });
isApplyingRef.current = false;
prevByKeyRef.current = merged;
}
}
useEffect(() => {
if (!isRemote) return;
const unsubscribe = useKanbanIssueComposerStore.subscribe((state) => {
if (isApplyingRef.current) return;
if (prevByKeyRef.current === state.byKe... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|> existing?.created_at ?? now,
updated_at: now,
};
}
export function localStorageScratchUpdate(
scratchType: ScratchType,
id: string,
update: UpdateScratch
): boolean {
const key = buildStorageKey(scratchType, id);
const previousRaw = (() => {
try {
return localStorage.getItem(ke... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useEffect, useState, useRef } from 'react';
import type { PatchType } from 'shared/types';
import { openLocalApiWebSocket } from '@/shared/lib/localApiTransport';
type LogEntry = Extract<PatchType, { type: 'STDOUT' } | { type: 'STDERR' }>;
interface UseLogStreamResult {
logs: LogEntry[];
er... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>e: string,
content: string,
command?: string
) => void;
expandTerminal: () => void;
collapseTerminal: () => void;
}
const defaultValue: LogsPanelContextValue = {
logsPanelContent: null,
logSearchQuery: '',
logMatchIndices: [],
logCurrentMatchIdx: 0,
setLogSearchQuery: () => {},
... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useMutation, useQueryClient } from '@tanstack/react-query';
import { workspacesApi } from '@/shared/lib/api';
import { rep<|fim_suffix|>xport function useMerge(
workspaceId?: string,
onSuccess?: () => void,
onError?: (err: unknown) => void
) {
const queryClient = useQueryClient();
retu... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useMemo } from 'react';
import { useQueries } from '@tanstack/react-query';
import type { Notification } from 'shared/remote-types';
import type { OrganizationMemberWithProfile } from 'shared/types';
import { organizationKeys } from '@/shared/hooks/organizationKeys';
import { organizationsApi } f... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useMemo } from 'react';
import { useShape }<|fim_suffix|>from '@/shared/integrations/electric/hooks';
import {
NOTIFICATIONS_SHAPE,
NOTIFICATION_MUTATION,
} from 'shared/remote-types';
import { useAuth } from '@/shared/hooks/auth/useAuth';
import { groupNotifications } from '@/shared/lib/noti... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|> });
}
}
}
},
[appRuntime, workspaceId, hostId, onShowEditorDialog]
);
}
<|fim_prefix|>import { useCallback } from 'react';
import { workspacesApi, relayApi } from '@/shared/lib/api';
import { EditorSelectionDialog } from '@/shared/dialogs/command-bar/EditorSelectionDi... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useContext } from 'react';
import { createHmrContext } from '@/shared/lib/hmrContext';
import type<|fim_suffix|>etProject: (projectId: string) => Project | undefined;
// Computed aggregations
projectsById: Map<string, Project>;
membersWithProfilesById: Map<string, OrganizationMemberWithPro... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>ations
return invitations.filter(
(inv) => inv.status === InvitationStatus.PENDING
);
},
enabled: !!organizationId && !!isAdmin && !isPersonal,
staleTime: 5 * 60 * 1000, // 5 minutes
});
}
<|fim_prefix|>import { useQuery } from '@tanstack/react-query';
import { organizati... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useQuery } from '@tanstack/react-query';
import { organizationsApi } from '@/shared/lib/api';
import type { OrganizationMemberWithProfile } from 'shared/types';
import { organizationKeys } from '@/shared/hooks/organizationKeys';
export function useOrganizationMembers(organizationId?: string) {
... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>t() });
options?.onRemoveSuccess?.();
},
onError: (err) => {
console.error('Failed to remove member:', err);
options?.onRemoveError?.(err);
},
});
const updateMemberRole = useMutation<
UpdateMemberRoleResponse,
unknown,
{ orgId: string; userId: string; role: ... | fim | BloopAI/vibe-kanban | typescript |
import { useShape } from '@/shared/integrations/electric/hooks';
import { PROJECTS_SHAPE } from 'shared/remote-types';
import { useAuth } from '@/shared/hooks/auth/useAuth';
export function useOrganizationProjects(organizationId: string | null) {
const { isSignedIn } = useAuth();
// Only subscribe to Electric whe... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>nization object
const selectedOrg = useMemo<OrganizationWithRole | null>(() => {
if (!selectedOrgId || orgList.length === 0) return null;
return orgList.find((o) => o.id === selectedOrgId) ?? null;
}, [selectedOrgId, orgList]);
// Handle organization selection from dropdown
const handleOr... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useEffect } from 'react';
const BASE_TITLE = 'Vibe Kanban';
/**
* Sets the document title based on the given parts.
* Multiple callers can coexist β the most specific (deepest) component wins
* because React runs child effect<|fim_suffix|>.
*
* No cleanup is performed on unmount so that a ... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useQuery } from '@tanstack/react-query';
import { workspacesApi } from '@/shared/lib/<|fim_suffix|>prCommentsKeys.byAttempt(workspaceId, repoId),
queryFn: () => workspacesApi.getPrComments(workspaceId!, repoId!),
enabled,
staleTime: 30_000, // Cache for 30s - comments don't change fre... | fim | BloopAI/vibe-kanban | typescript |
import { useQuery } from '@tanstack/react-query';
import type { BaseCodingAgent, ExecutorConfig } from 'shared/types';
import { agentsApi } from '@/shared/lib/api';
export const presetOptionsKeys = {
all: ['preset-options'] as const,
byProfile: (executor: BaseCodingAgent | null, variant: string | null) =>
['pr... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>};
lastTimestampRef.current = 0;
}, []);
return { navigation, isReady, handleMessage, reset };
}
<|fim_prefix|>import { useCallback, useRef, useState } from 'react';
import type {
NavigationState,
PreviewDevToolsMessage,
} from '@/shared/types/previewDevTools';
export interface UsePreviewNav... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useCallback, useMemo } from 'react';
import { useScratch } from '@/shared/hooks/useScratch';
import { useDebouncedCallback } from '@/shared/hooks/useDebouncedCallback';
import {
ScratchType,
type PreviewSettingsData,
type ScratchPayload,
} from 'shared/types';
export type ScreenSize = 'des... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>tection
} else {
parsed.hostname = normalizedHost;
if (vibeKanbanPort && parsed.port === vibeKanbanPort) {
return null;
}
const scheme = parsed.protocol === 'https:' ? 'https' : 'http';
return toOriginUrlInfo(parsed, scheme);
}
} catch {
... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>rn JSON.parse(data.content);
} catch {
return null;
}
}, [data?.content]);
const saveParsed = async (obj: unknown) => {
await save(JSON.stringify(obj, null, 2));
};
return {
profilesContent: data?.content ?? '',
parsedProfiles,
profilesPath: data?.path ?? '',
is... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>sertResult<IssueRelationship>;
removeIssueRelationship: (id: string) => MutationResult;
// PullRequestIssue mutations
insertPullRequestIssue: (
data: CreatePullRequestIssueRequest
) => InsertResult<PullRequestIssue>;
removePullRequestIssue: (id: string) => MutationResult;
// Lookup helpe... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>atch storage.
* Returns null if no defaults have been saved for this project.
*/
export async function getProjectRepoDefaults(
projectId: string
): Promise<DraftWorkspaceRepo[] | null> {
try {
const scratch = await scratchApi.get(SCRATCH_TYPE, projectId);
const payload = scratch.payload as S... | fim | BloopAI/vibe-kanban | typescript |
import { useCallback } from 'react';
import { useAppNavigation } from '@/shared/hooks/useAppNavigation';
import { useAppRuntime } from '@/shared/hooks/useAppRuntime';
import { useCurrentKanbanRouteState } from '@/shared/hooks/useCurrentKanbanRouteState';
import { useProjectContext } from '@/shared/hooks/useProjectConte... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useMutation, useQueryClient } from '@tanstack/react-query';
import { workspacesApi } from '@/shared/lib/api';
import type { PushError, PushWorkspaceRequest } from 'shared/types';
class PushErrorWithData extends Error {
constructor(
message: string,
public errorData?: PushError
) {
... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>
},
}
);
}
<|fim_prefix|>import { useMutation, useQueryClient } from '@tanstack/react-query';
import { workspacesApi, Result } from '@/shared/lib/api';
import type { RebaseWorkspaceRequest } from 'shared/types';
import type { GitOperationError } from 'shared/types';
import { repoBranchKeys } f... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>from '@/shared/lib/api';
export function useReleases() {
return useQuery<GitHubRelease[]>({
queryKey: ['releases'],
queryFn: () => releasesApi.list(),
staleTime: 15 * 60 * 1000,
gcTime: 30 * 60 * 1000,
});
}
<|fim_prefix|>import { u<|fim_middle|>seQuery } from '@tanstack/react-query';... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useMemo } from 'react';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import type { AppBarHost, AppBarHostStatus } from '@vibe/ui/components/AppBar';
import type { PairRelayHostRequest, RelayPairedHost } from 'shared/types';
import type { RelayHost } from 'shared/... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useMutation, useQueryClient } from '@tanstack/react-query';
import { workspacesApi } from '@/shared/lib/api';
import { workspaceRecordKeys } from '@/shared/hooks/useWorkspaceRecord';
import type { Workspace } from 'shared/typ<|fim_suffix|>invalidateQueries({
queryKey: ['attemptBranch', ... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>targetBranch!,
}));
}, [configs]);
return {
configs,
isLoading: isLoadingBranches,
setRepoBranch,
getWorkspaceRepoInputs,
reset,
};
}
<|fim_prefix|>import { useState, useMemo, useCallback } from 'react';
import { useQueries } from '@tanstack/react-query';
import { repoApi ... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>s: string[]
): UseMultiRepoBranchesResult {
const queries = useQueries({
queries: repoIds.map((repoId) => ({
queryKey: repoBranchKeys.byRepo(repoId),
queryFn: () => repoApi.getBranches(repoId),
staleTime: 60_000,
})),
});
const branchesByRepo = useMemo(() => {
const re... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>or('Failed to send retry:', err);
onError?.(err);
},
});
}
export { RetryDialogCancelledError };
<|fim_prefix|>import { useMutation } from '@tanstack/react-query';
import { sessionsApi } from '@/shared/lib/api';
import {
RestoreLogsDialog,
type RestoreLogsDialogResult,
} from '@/shared/di... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useContext } from 'react';
import { createHmrContext } from '@/shared/lib/hmrContext';
export type RetryUiContextType = {
activeRetryProcessId: string | null;
setActiveRetryProcessId: (processId: string | null) => void;
processOrder: Record<string, number>;
isProcessGreyed: (processId?: ... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useContext } from 'react';
import { createHmrContext } from '@/shared/lib/hmrContext<|fim_suffix|> {
return useContext(ReviewContext);
}
<|fim_middle|>';
import { DiffSide } from '@/shared/types/diff';
export interface ReviewComment {
id: string;
filePath: string;
lineNumber: number;
s... | fim | BloopAI/vibe-kanban | typescript |
import { useCallback } from 'react';
import { useJsonPatchWsStream } from '@/shared/hooks/useJsonPatchWsStream';
import { useAppRuntime } from '@/shared/hooks/useAppRuntime';
import { useLocalStorageScratch } from '@/shared/hooks/useLocalStorageScratch';
import { scratchApi } from '@/shared/lib/api';
import { ScratchTy... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useUserSystem } from<|fim_suffix|>ash\n# Add cleanup commands here...\n# This runs after coding agent execution',
archive:
'#!/bin/bash\n# Add archive commands here...\n# This runs when the workspace is archived',
};
}
<|fim_middle|> '@/shared/hooks/useUserSystem';
import {
createSc... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>.current = 'idle';
}
}, cooldownDelay);
},
[cooldownDelay]
);
return {
state: stateRef.current,
fileInView: fileInViewRef.current,
scrollTarget: scrollTargetRef.current,
scrollToFile,
onUserScroll,
onRangeChanged,
onScrollComplete,
};
}
<|fim_prefix... | fim | BloopAI/vibe-kanban | typescript |
import { useContext } from 'react';
import { createHmrContext } from '@/shared/lib/hmrContext';
import type { SyncError } from '@/shared/lib/electric/types';
export interface StreamError {
streamId: string;
tableName: string;
error: SyncError;
retry: () => void;
}
export interface SyncErrorContextValue {
er... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|> return createWorkspaceWithSession(workspace, session);
});
},
enabled,
refetchInterval,
});
}
<|fim_prefix|>import { useQuery } from '@tanstack/react-query';
import { workspacesApi, sessionsApi } from '@/shared/lib/api<|fim_middle|>';
import type { Workspace } from 'shared/types';
... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useContext } from 'react';
import { createHmrContext } from '@/shared/lib/hmrContext';
import type { Terminal } from '@xterm/xterm';
import type { FitAddon } from '@xterm/addon-fit';
export interface TerminalInstance {
terminal: Termi<|fim_suffix|>d;
createTerminalConnection: (
tabId: st... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>null,
};
export const ThemeProviderContext = createHmrContext<ThemeProviderState>(
'ThemeProviderContext',
initialState
);
export const useTheme = () => {
const context = useContext(ThemeProviderContext);
if (context === undefined)
throw new Error('useTheme must be used within a ThemeProvid... | fim | BloopAI/vibe-kanban | typescript |
import { useCallback, useEffect, useRef } from 'react';
import { useScratch } from '@/shared/hooks/useScratch';
import { useDebouncedCallback } from '@/shared/hooks/useDebouncedCallback';
import {
ScratchType,
type UiPreferencesData,
type ScratchPayload,
type WorkspacePanelStateData,
type JsonValue,
} from 's... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useContext } from 'react';
import { createHmrContext } from '@/shared/lib/hmrContext';
import type { Workspace } from 'shared/remote-types';
import type { SyncError } from '@/shared/lib/electric/types';
/**
* UserContext provides user-scoped data.
*
* Shapes synced at user scope:
* - Workspa... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>ared/types';
import { organizationKeys } from '@/shared/hooks/organizationKeys';
/**
* Hook to fetch all organizations that the current user is a member of
*/
export function useUserOrganizations() {
const { isSignedIn } = useAuth();
return useQuery<ListOrganizationsResponse>({
queryKey: organ... | fim | BloopAI/vibe-kanban | typescript |
import { useContext } from 'react';
import { createHmrContext } from '@/shared/lib/hmrContext';
import type {
Config,
Environment,
BaseAgentCapability,
LoginStatus,
} from 'shared/types';
import type { ExecutorProfile } from 'shared/types';
export interface UserSystemState {
appVersion: string | null;
prev... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useCallback, useMemo } from 'react';
import { useQuery, useQueryClient } from '@tanstack/react-query';
import type {
BaseAgentCapability,
Config,
Environment,
ExecutorProfile,
UserSystemInfo,
} from 'shared/types';
import type { UserSystemContextType } from './useUserSystem';
interface... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useCallback, useEffect, useRef, useState } from 'react';
type Args = {
processVariant: string | null;
scratchVariant?: string | null;
};<|fim_suffix|> (hasUserSelectionRef.current) return;
const newVariant =
scratchVariant !== undefined ? scratchVariant : processVariant;
setSe... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useQuery } from '@tanstack/react-query';
import { workspacesApi } from '@/shared/lib/api';
import type { WorkspaceWithSession } from '@/shared/types/attempt';
export function useWorkspace<|fim_suffix|>eWithSession', workspaceId],
queryFn: () => workspacesApi.getWithSession(workspaceId!),
... | fim | BloopAI/vibe-kanban | typescript |
import { useCallback } from 'react';
import { useQueryClient } from '@tanstack/react-query';
import { workspacesApi } from '@/shared/lib/api';
export function useWorkspaceConflicts(workspaceId?: string, repoId?: string) {
const queryClient = useQueryClient();
const abortConflicts = useCallback(async () => {
i... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useContext } from 'react';
import { createHmrContext } from '@/shared/lib/hmrContext';
import type {
Session,
RepoWithTargetBranch,
Workspace as ApiWorkspace,
} from 'shared/types';
import type { SidebarWorkspace } from '@/shared/hooks/useWorkspaces';
import { DiffSide } <|fim_suffix|>ll;
}... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useMemo } from 'react';
import { useQuery } from '@tanstack/react-query';
import type { ExecutorConfig, RepoWithTargetBranch } from 'shared/types';
import { workspacesApi } from '@/shared/lib/api';
import { useExecutionProcesses } from '@/shared/hooks/useExecutionProcesses';
import { getLatestCon... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useMemo, useCallback } from 'react';
import {
useMutation,
useMutationState,
useQueries,
} from '@tanstack/react-query';
import { workspacesApi, executionProcessesApi } from '@/<|fim_suffix|>} from '@/shared/hooks/useExecutionProcessesContext';
import type { AttemptData } from '@/shared/lib... | fim | BloopAI/vibe-kanban | typescript |
import { useQuery } from '@tanstack/react-query';
import { workspacesApi } from '@/shared/lib/api';
import { getHostRequestScopeQueryKey } from '@/shared/lib/hostRequestScope';
import { useHostId } from '@/shared/providers/HostIdProvider';
import type { Workspace } from 'shared/types';
export const workspaceRecordKeys... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useQuery, useQueryClient } from '@tanstack/react-query';
import { useCallback, useEffect, useMemo } from 'react';
import { workspacesApi } from '@/shared/lib/api';
import { getHostRequestScopeQueryKey } from '@/shared/lib/hostRequestScope';
import { useHostId } from '@/shared/providers/HostIdProv... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useQuery } from '@tanstack/react-query';
import { useState, useCallback, useEffect, useMemo, useRef } from 'react';
import { sessionsApi } from '@/shared/lib/api';
import { useHostId } from '@/shared/providers/HostIdProvider';
import { workspaceSessionKeys } from '@/shared/hooks/workspaceSessionK... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useCallback, useEffect, useRef, useState } from 'react';
const PREVIEW_CLOSE_DELAY_MS = 120;
export function useWorkspaceSidebarPreviewController({
enabled,
isAppBarHovered,
}: {
enabled: boolean;
isAppBarHovered: boolean;
}) {
const [isPreviewOpen, setIsPreviewOpen] = useState(false)... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useCallback, useMemo } from 'react';
import { useQuery, keepPreviousData } from '@tanstack/react-query';
import { useJsonPatchWsStream } from '@/shared/hooks/useJsonPatchWsStream';
import { workspaceSummaryKeys } from '@/shared/hooks/workspaceSummaryKeys';
import { makeLocalApiRequest } from '@/s... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { getHostRequestScopeQueryKey } from '@/shared/lib/hostRe<|fim_suffix|>pace: (
workspaceId: string | undefined,
hostId: string | null = null
) =>
[
'workspaceSessions',
getHostRequestScopeQueryKey(hostId),
workspaceId,
] as const,
};
<|fim_middle|>questScope';
e... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { getHostRequestScopeQueryKey } from '@/shared/lib/hostRequestScope';
export const workspaceSummaryKeys = {
all: ['workspace-summaries'] as const,
byArchived: (archiv<|fim_suffix|>nst,
};
<|fim_middle|>ed: boolean, hostId: string | null = null) =>
[
'workspace-summaries',
getHo... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useState, useMemo, useCallback, useEffect, useRef } from 'react';
import { useLiveQuery } from '@tanstack/react-db';
import { createShapeCollection } from '@/shared/lib/electric/collections';
import { useSyncErrorContext } from '@/shared/hooks/useSyncErrorContext';
import type { MutationDefinitio... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|> className={cn(
'inline-flex items-center justify-center',
'min-w-[24px] h-6 px-1.5',
'rounded-sm border bg-secondary',
'font-ibm-plex-mono text-sm',
isInvalid ? 'border-error text-error' : 'border-border text-high'
... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { useContext, useState, useEffect, useRef, ReactNode } from 'react';
import { createHmrContext } from '@/shared/lib/hmrContext';
import {
SEQUENCE_FIRST_KEYS,
sequentialBindings,
} from '@/shared/keyboard/registry';
interface SequenceTrackerContextValue {
buffer: string[];
isActive: boolea... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|> scope: Scope.EDIT_COMMENT, when: hasContent });
*/
export const useKeySubmitComment = createSemanticHook(Action.SUBMIT_COMMENT);
/**
* Cycle view backward action - typically Cmd+Shift+Enter
* Cycle views backward in attempt area
*
* @example
* useKeyCycleViewBackward(() => cycleBackward(), { scope... | fim | BloopAI/vibe-kanban | typescript |
export * from './hooks';
export * from '@/shared/keyboard/registry';
export * from './SequenceTracker';
export * from './SequenceIndicator';
export * from './useWorkspaceShortcuts';
export * from './useIssueShortcuts';
<|endoftext|> | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>export enum Scope {
GLOBAL = 'global',
DIALOG = 'dialog',
CONFIRMATION = 'confirmation',
KANBAN = 'kanban',
PROJECTS = 'projects',
SETTINGS = 'settings',
EDIT_COMMENT = 'edit-comment',
APPROVALS = 'approvals',
FOLLOW_UP = 'follow-up',
FOLLOW_UP_READY = 'follow-up-ready',
WORKSPACE = ... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>export type F<|fim_suffix|>nFormTags =
| boolean
| readonly (FormTag | Uppercase<FormTag>)[];
<|fim_middle|>ormTag = 'input' | 'textarea' | 'select';
export type EnableO<|endoftext|> | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>tionStore((s) => s.toggleIssue);
const selectAdjacent = useIssueSelectionStore((s) => s.selectAdjacent);
const executeActionRef = useRef(executeAction);
const projectIdRef = useRef(projectId);
const issueIdRef = useRef(issueId);
const isKanbanRef = useRef(isKanban);
const isCreatingIssueRef =... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>lt?: boolean;
}
type Handler = (e?: KeyboardEvent) => void;
/**
* Creates a semantic keyboard shortcut hook for a specific action
*/
export function createSemanticHook<A extends Action>(action: A) {
return function useSemanticKey(
handler: Handler,
options: SemanticKeyOptions = {}
) {
... | fim | BloopAI/vibe-kanban | typescript |
import { useCallback, useRef, useEffect } from 'react';
import { useHotkeys } from 'react-hotkeys-hook';
import { useActions } from '@/shared/hooks/useActions';
import { useWorkspaceContext } from '@/shared/hooks/useWorkspaceContext';
import { Actions } from '@/shared/actions';
import {
type ActionDefinition,
Actio... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>e overrides (only --vibe-* prefixed variables)
if (
message.payload.kind === 'cssVars' &&
typeof message.payload.variables === 'object'
) {
Object.entries(message.payload.variables).forEach(([name, value]) => {
if (typeof value === 'string') {
docu... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>export function DisplayTruncatedPath({ path }: { path: string }) {
return (
<span
className="block overflow-hidden text-ellipsis whitespace-nowrap font-ibm-plex-mono"
style={{ direction: 'rtl', unicode<|fim_suffix|>di: 'plaintext', textAlign: 'left' }}
title={path}
>
{pat... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>Group();
result.push(entry);
}
}
// Flush any remaining groups
flushToolGroup();
flushDiffGroup();
return result;
}
<|fim_prefix|>import type {
PatchTypeWithKey,
DisplayEntry,
AggregatedPatchGroup,
AggregatedDiffGroup,
AggregatedThinkingGroup,
ToolAggregationType,
} from ... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>// Import all necessary types from shared types
import {
ApprovalStatus,
ApiResponse,
Config,
CreateFollowUpAttempt,
ResetProcessRequest,
EditorType,
CreatePrApiRequest,
CreateTag,
DirectoryListResponse,
DirectoryEntry,
ExecutionProcess,
ExecutionProcessRepoState,
GitBranch,
R... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>ved: boolean } {
const matches = findAttachmentMarkdownMatches(content).filter(
(match) => match.src === src
);
if (matches.length === 0) {
return { content, removed: false };
}
let nextContent = content;
for (const match of matches.reverse()) {
nextContent = removeAttachmentSlic... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>
export function getRemoteAuthDegradedMessage(
slug: string,
t: TFunction<'common'>
): string {
switch (slug) {
case REMOTE_AUTH_UNAVAILABLE_SLUG:
default:
return t('syncError.remoteAuthUnavailable');
}
}
<|fim_prefix|>import type { TFunction<|fim_middle|> } from 'i18next';
export ... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>type PauseableShape = { pause: () => void; resume: () => void };
type CurrentUser = { user_id: string };
export interface AuthRuntime {
getToken: () => Promise<string | null>;
triggerRefresh: () => Promise<string | null>;
registerS<|fim_suffix|>me(): AuthRuntime {
if (!authRuntime) {
throw n... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import { ApiError, oauthApi } from '@/shared/lib/api';
import { REMOTE_AUTH_UNAVAILABLE_SLUG } from '@/shared/lib/auth/remoteAuthDegraded';
import { queryClient } from '@/shared/lib/queryClient';
import { shouldRefreshAccessToken } from 'shared/jwt';
const TOKEN_QUERY_KEY = ['auth', 'token'] as const;
co... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|> void 0;
}
}
/** Copy helper that prefers navigator.clipboard and falls back to the bridge. */
export async function writeClipboardViaBridge(text: string): Promise<boolean> {
try {
await navigator.clipboard.writeText(text);
return true;
} catch {
parentClipboardWrite(text);
retur... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>// Predefined color palet<|fim_suffix|>h)];
}
<|fim_middle|>te for projects and tags (HSL format)
// Modern, vibrant colors with good differentiation
export const PRESET_COLORS = [
'0 84% 60%', // Coral Red - vibrant, warm
'24 95% 53%', // Tangerine - energetic orange
'45 93% 58%', // Golden Yellow ... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>abel(op);
const header = formatConflictHeader(op, source, base, repoName);
return (
`${header}` +
filesBlock +
`\n\nPlease resolve each file carefully. When continuing, ensure the ${opTitle.toLowerCase()} does not hang (set \`GIT_EDITOR=true\` or use a non-interactive editor).`
);
}
<|f... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>rn `${diffMins}m ago`;
if (diffHours < 24) return `${diffHours}h ago`;
return `${diffDays}d ago`;
}
<|fim_prefix|>/**
* Format a date st<|fim_middle|>ring as "Jan 5, 10:30 AM".
*/
export function formatDateShortWithTime(dateString: string): string {
const date = new Date(dateString);
return date... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import type { ExecutionProcess } from 'shared/types';
/**
* Extract the working directory from a dev server process's executor action.
*/
export function getDevServerWorkingDir(
process: ExecutionProcess
): string | null {
const typ = process.executor_action?.typ;
if (typ && 'type' in typ && typ.... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>e('number');
}
}
});
it('handles contentOmitted with placeholder metadata', () => {
const diff = createDiffFixture({ contentOmitted: true });
const result = transformDiffToFileDiffMetadata(diff);
expect(result.name).toBe('src/hello.ts');
expect(result.type).toBe('change');
... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import {
parseDiffFromFile,
type FileContents,
type FileDiffMetadata,
type ChangeTypes,
type DiffLineAnnotation,
type AnnotationSide,
} from '@p<|fim_suffix|>Hub comments into pierre/diffs annotations.
*
* Implements deduplication: if both a user review comment and a GitHub comment
* exist ... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|> function parseDiffStats(unifiedDiff: string): {
additions: number;
deletions: number;
} {
let additions = 0;
let deletions = 0;
const lines = unifiedDiff.split('\n');
for (const line of lines) {
if (line.startsWith('+') && !line.startsWith('+++')) additions++;
else if (line.startsWith... | fim | BloopAI/vibe-kanban | typescript |
<|fim_suffix|>[a], [b]) =>
a.localeCompare(b)
);
if (sortedEntries.length === 0) {
return table;
}
const values = sortedEntries
.map(([key, value]) => `${key}=${value}`)
.join('&');
return `${table}?${values}`;
}
function getRowKey(item: Record<string, unknown>): string {
if ('id' in item ... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>/**
* Error type for Electric sync operations.
* Wraps errors from Electric's onError callback (HTTP errors, network failures, etc.)
*/
export interface SyncError {
/** HTTP status code if available */
status?: number;
/** Error message */
messa<|fim_suffix|>interface MutationResult {
/** Pro... | fim | BloopAI/vibe-kanban | typescript |
<|fim_prefix|>import type {
BaseCodingAgent,
ExecutorConfig,
ExecutorConfigs,
ExecutorProfile,
ExecutorAction,
ExecutorProfileId,
ExecutionProcess,
} from 'shared/types';
const RESERVED_KEYS = new Set(['recently_used_models']);
export function getExecutorVariantKeys(
executorProfile: Executor<|fim_suf... | fim | BloopAI/vibe-kanban | typescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.