Skip to content

Commit fba43cb

Browse files
authored
Merge pull request #227 from objectstack-ai/copilot/refactor-ci-run-setup
2 parents 3b23212 + 982da35 commit fba43cb

File tree

4 files changed

+19
-10
lines changed

4 files changed

+19
-10
lines changed

packages/plugin-charts/src/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import React, { Suspense } from 'react';
1010
import { ComponentRegistry } from '@object-ui/core';
1111
import { Skeleton } from '@object-ui/components';
12+
import type { ChartConfig } from './ChartContainerImpl';
1213

1314
// Export types for external use
1415
export type { BarChartSchema } from './types';
@@ -124,10 +125,11 @@ export const ChartRenderer: React.FC<ChartRendererProps> = ({ schema }) => {
124125
// 3. Auto-generate config/colors if missing
125126
if (!config && series) {
126127
const colors = (schema as any).colors || ['hsl(var(--chart-1))', 'hsl(var(--chart-2))', 'hsl(var(--chart-3))'];
127-
config = {};
128+
const newConfig: ChartConfig = {};
128129
series.forEach((s: any, idx: number) => {
129-
config[s.dataKey] = { label: s.dataKey, color: colors[idx % colors.length] };
130+
newConfig[s.dataKey] = { label: s.dataKey, color: colors[idx % colors.length] };
130131
});
132+
config = newConfig;
131133
}
132134

133135
return {

packages/plugin-chatbot/src/renderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { useState } from 'react';
2424
* - Use case: Connect to backend API or trigger custom actions on message send
2525
*/
2626
ComponentRegistry.register('chatbot',
27-
({ schema, className, ...props }) => {
27+
({ schema, className, ...props }: { schema: ChatbotSchema; className?: string; [key: string]: any }) => {
2828
// Initialize messages from schema or use empty array
2929
const [messages, setMessages] = useState<ChatMessage[]>(
3030
schema.messages?.map((msg: any, idx: number) => ({

packages/plugin-dashboard/src/DashboardRenderer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import { ComponentRegistry } from '@object-ui/core';
10-
import type { DashboardSchema } from '@object-ui/types';
10+
import type { DashboardSchema, DashboardWidgetSchema } from '@object-ui/types';
1111
import { SchemaRenderer } from '@object-ui/react';
1212
import { cn } from '@object-ui/components';
1313
import { forwardRef } from 'react';
@@ -30,7 +30,7 @@ export const DashboardRenderer = forwardRef<HTMLDivElement, { schema: DashboardS
3030
}}
3131
{...props}
3232
>
33-
{schema.widgets?.map((widget) => (
33+
{schema.widgets?.map((widget: DashboardWidgetSchema) => (
3434
<div
3535
key={widget.id}
3636
className={cn("border rounded-lg p-4 bg-card text-card-foreground shadow-sm")}
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "./dist",
4+
"outDir": "dist",
5+
"jsx": "react-jsx",
6+
"baseUrl": ".",
7+
"paths": {
8+
"@/*": ["src/*"]
9+
},
10+
// Removed explicit rootDir to prevent file not under rootDir errors when importing from workspace dependencies
11+
"noEmit": false,
512
"declaration": true,
6-
"declarationMap": true,
713
"composite": true,
8-
"jsx": "react-jsx"
14+
"declarationMap": true,
15+
"skipLibCheck": true
916
},
10-
"include": ["src/**/*"],
11-
"exclude": ["node_modules", "dist", "**/*.test.ts"]
17+
"include": ["src"],
18+
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
1219
}

0 commit comments

Comments
 (0)