fixdog 0.0.6 → 0.0.7
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/dist/InspectorProvider-CVyJIBc4.esm.js +1300 -0
- package/dist/InspectorProvider-CVyJIBc4.esm.js.map +1 -0
- package/dist/InspectorProvider-MsiDScXd.cjs.js +1308 -0
- package/dist/InspectorProvider-MsiDScXd.cjs.js.map +1 -0
- package/dist/api/client.d.ts +10 -0
- package/dist/components/FixdogSidebar/ChatView/ChatHeader/ChatHeader.d.ts +1 -0
- package/dist/components/FixdogSidebar/ChatView/ChatInput/ChatInput.d.ts +10 -0
- package/dist/components/FixdogSidebar/ChatView/ChatInput/ModelSelector/ModelSelector.d.ts +7 -0
- package/dist/components/FixdogSidebar/ChatView/ChatMessages/AIChatMessage/AIChatMessage.d.ts +6 -0
- package/dist/components/FixdogSidebar/ChatView/ChatMessages/ChatMessages.d.ts +1 -0
- package/dist/components/FixdogSidebar/ChatView/ChatMessages/LoadingMessage/LoadingMessage.d.ts +5 -0
- package/dist/components/FixdogSidebar/ChatView/ChatMessages/UserChatMessage/UserChatMessage.d.ts +6 -0
- package/dist/components/FixdogSidebar/ChatView/ChatView.d.ts +7 -0
- package/dist/components/FixdogSidebar/FixdogHeader/FixdogHeader.d.ts +9 -0
- package/dist/components/FixdogSidebar/FixdogSidebar.d.ts +13 -0
- package/dist/components/FixdogSidebar/SessionsView/SessionCard/SessionCard.d.ts +7 -0
- package/dist/components/FixdogSidebar/SessionsView/SessionsView.d.ts +1 -0
- package/dist/components/FloatingIcon/FloatingIcon.d.ts +7 -0
- package/dist/components/ui/LoadingOverlay/LoadingOverlay.d.ts +7 -0
- package/dist/contexts/AuthContext.d.ts +18 -0
- package/dist/contexts/ChatContext.d.ts +30 -0
- package/dist/contexts/SessionContext.d.ts +22 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/react/index.cjs.js +1 -1
- package/dist/react/index.esm.js +1 -1
- package/dist/sidebar-runtime.iife.js +3792 -1295
- package/dist/styles/sidebarStyles.d.ts +1 -1
- package/dist/utils/sessionStorage.d.ts +7 -0
- package/package.json +4 -3
package/dist/api/client.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface ChatRequest {
|
|
|
13
13
|
projectId: string;
|
|
14
14
|
modelId: string;
|
|
15
15
|
sessionId?: string;
|
|
16
|
+
components?: ComponentMetadata[];
|
|
16
17
|
}
|
|
17
18
|
export interface ChatResponse {
|
|
18
19
|
ok: boolean;
|
|
@@ -81,10 +82,19 @@ export interface VerifyAuthResponse {
|
|
|
81
82
|
};
|
|
82
83
|
error?: string;
|
|
83
84
|
}
|
|
85
|
+
export interface ComponentMetadata {
|
|
86
|
+
id: number;
|
|
87
|
+
componentName: string;
|
|
88
|
+
filePath: string;
|
|
89
|
+
line: number;
|
|
90
|
+
column: number;
|
|
91
|
+
componentTree: string[];
|
|
92
|
+
}
|
|
84
93
|
export interface Message {
|
|
85
94
|
id: string;
|
|
86
95
|
role: "user" | "assistant";
|
|
87
96
|
content: string;
|
|
97
|
+
components?: ComponentMetadata[];
|
|
88
98
|
commitSha?: string | null;
|
|
89
99
|
reverted: boolean;
|
|
90
100
|
createdAt: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChatHeader(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SelectedComponent } from "../../../../types/sidebar";
|
|
2
|
+
interface ChatInputProps {
|
|
3
|
+
selectedComponents?: SelectedComponent[];
|
|
4
|
+
onSubmit?: (message: string, components: SelectedComponent[]) => void;
|
|
5
|
+
onRemoveComponent?: (componentId: number) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
}
|
|
9
|
+
export default function ChatInput({ selectedComponents, onSubmit, onRemoveComponent, disabled, placeholder, }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface ModelSelectorProps {
|
|
2
|
+
selectedModelId: string;
|
|
3
|
+
onModelChange: (modelId: string) => void;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default function ModelSelector({ selectedModelId, onModelChange, disabled }: ModelSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChatMessages(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SelectedComponent } from '../../../types/sidebar';
|
|
2
|
+
type ChatViewProps = {
|
|
3
|
+
selectedComponents: SelectedComponent[];
|
|
4
|
+
onRemoveComponent: (componentId: number) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const ChatView: ({ selectedComponents, onRemoveComponent }: ChatViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default ChatView;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface FixdogHeaderProps {
|
|
2
|
+
onClose: () => void;
|
|
3
|
+
onToggleSide?: () => void;
|
|
4
|
+
side?: "left" | "right";
|
|
5
|
+
authUrl?: string;
|
|
6
|
+
projectId?: string;
|
|
7
|
+
}
|
|
8
|
+
export default function FixdogHeader({ onClose, onToggleSide, side, authUrl, projectId }: FixdogHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SelectedComponent } from "../../types/sidebar";
|
|
2
|
+
interface FixdogSidebarProps {
|
|
3
|
+
apiEndpoint: string;
|
|
4
|
+
projectId: string;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
selectedComponents?: SelectedComponent[];
|
|
7
|
+
onRemoveComponent: (componentId: number) => void;
|
|
8
|
+
onToggleSide?: () => void;
|
|
9
|
+
side?: "left" | "right";
|
|
10
|
+
authUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function FixdogSidebar({ apiEndpoint, projectId, onClose, selectedComponents, onRemoveComponent, onToggleSide, side, authUrl, }: FixdogSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SessionListItem } from "../../../../api/client";
|
|
2
|
+
interface SessionCardProps {
|
|
3
|
+
session: SessionListItem;
|
|
4
|
+
onSelect: (sessionId: string) => void | Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
export default function SessionCard({ session, onSelect }: SessionCardProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SessionsView(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Theme } from "../../utils/sessionStorage";
|
|
2
|
+
interface FloatingIconProps {
|
|
3
|
+
theme: Theme;
|
|
4
|
+
onToggleSidebar: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function FloatingIcon({ theme, onToggleSidebar }: FloatingIconProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface AuthUser {
|
|
3
|
+
id: string;
|
|
4
|
+
email: string;
|
|
5
|
+
name: string | null;
|
|
6
|
+
role: string | null;
|
|
7
|
+
}
|
|
8
|
+
interface AuthContextValue {
|
|
9
|
+
user: AuthUser | null;
|
|
10
|
+
setUser: (user: AuthUser | null) => void;
|
|
11
|
+
clearAuth: () => void;
|
|
12
|
+
}
|
|
13
|
+
interface AuthProviderProps {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare function AuthProvider({ children }: AuthProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function useAuth(): AuthContextValue;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { Message, ComponentMetadata } from "../api/client";
|
|
3
|
+
interface ChatContextValue {
|
|
4
|
+
messages: Message[];
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
isSending: boolean;
|
|
7
|
+
isSubmittingPR: boolean;
|
|
8
|
+
error: string | null;
|
|
9
|
+
hasMore: boolean;
|
|
10
|
+
selectedModelId: string;
|
|
11
|
+
fetchMessages: () => Promise<void>;
|
|
12
|
+
sendMessage: (prompt: string, components?: ComponentMetadata[]) => Promise<boolean>;
|
|
13
|
+
submitPR: () => Promise<{
|
|
14
|
+
prUrl: string;
|
|
15
|
+
prNumber: number;
|
|
16
|
+
} | null>;
|
|
17
|
+
revertTo: (commitSha: string) => Promise<boolean>;
|
|
18
|
+
loadMore: () => Promise<void>;
|
|
19
|
+
clearError: () => void;
|
|
20
|
+
setSelectedModelId: (modelId: string) => void;
|
|
21
|
+
}
|
|
22
|
+
interface ChatProviderProps {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
apiEndpoint: string;
|
|
25
|
+
projectId: string;
|
|
26
|
+
modelId: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function ChatProvider({ children, apiEndpoint, projectId, modelId }: ChatProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function useChat(): ChatContextValue;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { SessionListItem } from "../api/client";
|
|
3
|
+
interface SessionContextValue {
|
|
4
|
+
sessions: SessionListItem[];
|
|
5
|
+
currentSessionId: string | null;
|
|
6
|
+
currentSession: SessionListItem | null;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
error: string | null;
|
|
9
|
+
fetchSessions: () => Promise<void>;
|
|
10
|
+
selectSession: (sessionId: string | null) => Promise<void>;
|
|
11
|
+
createNewSession: () => Promise<SessionListItem | null>;
|
|
12
|
+
deleteSessionById: (sessionId: string) => Promise<boolean>;
|
|
13
|
+
clearError: () => void;
|
|
14
|
+
}
|
|
15
|
+
interface SessionProviderProps {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
apiEndpoint: string;
|
|
18
|
+
projectId: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function SessionProvider({ children, apiEndpoint, projectId }: SessionProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function useSession(): SessionContextValue;
|
|
22
|
+
export {};
|
package/dist/index.cjs.js
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as isDevMode, D as DEV_MODE_WARNING, I as Inspector, a as DEFAULT_OPTIONS, e as enableDebug } from './InspectorProvider-
|
|
2
|
-
export { b as InspectorProvider } from './InspectorProvider-
|
|
1
|
+
import { i as isDevMode, D as DEV_MODE_WARNING, I as Inspector, a as DEFAULT_OPTIONS, e as enableDebug } from './InspectorProvider-CVyJIBc4.esm.js';
|
|
2
|
+
export { b as InspectorProvider } from './InspectorProvider-CVyJIBc4.esm.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'source-map-js';
|
package/dist/react/index.cjs.js
CHANGED
package/dist/react/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { b as InspectorProvider } from '../InspectorProvider-
|
|
3
|
+
export { b as InspectorProvider } from '../InspectorProvider-CVyJIBc4.esm.js';
|
|
4
4
|
import 'source-map-js';
|
|
5
5
|
//# sourceMappingURL=index.esm.js.map
|