Skip to content

Commit ca59d76

Browse files
committed
Merge branch 'main' into mme/multiple-runs
2 parents b1308ae + 94aa016 commit ca59d76

File tree

128 files changed

+3184
-3754
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+3184
-3754
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.vscode/
2+
.idea/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ AG-UI was born from CopilotKit's initial partnership with LangGraph and CrewAI -
9797
| [LlamaIndex](https://github.com/run-llama/llama_index) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/llamaindex) | 1st party |
9898
| [Pydantic AI](https://github.com/pydantic/pydantic-ai) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/pydantic-ai) | 1st party |
9999
| [Vercel AI SDK](https://github.com/vercel/ai) | 🛠️ In Progress || Community |
100-
| [Google ADK](https://google.github.io/adk-docs/get-started/) | 🛠️ In Progress || Community |
100+
| [Google ADK](https://google.github.io/adk-docs/get-started/) | 🛠️ [PR](https://github.com/ag-ui-protocol/ag-ui/pull/274) || Community |
101101
| [OpenAI Agent SDK](https://openai.github.io/openai-agents-python/) | 🛠️ In Progress || Community |
102102
| [AWS Bedrock Agents](https://aws.amazon.com/bedrock/agents/) | 🛠️ In Progress || 1st party |
103103
| [Cloudflare Agents](https://developers.cloudflare.com/agents/) | 💡 Open to Contributions || Community |

typescript-sdk/apps/dojo/e2e/pages/mastraPages/AgenticChatPage.ts renamed to typescript-sdk/apps/dojo/e2e/featurePages/AgenticChatPage.ts

Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export class AgenticChatPage {
66
readonly agentGreeting: Locator;
77
readonly chatInput: Locator;
88
readonly sendButton: Locator;
9+
readonly chatBackground: Locator;
910
readonly agentMessage: Locator;
1011
readonly userMessage: Locator;
1112

@@ -25,6 +26,10 @@ export class AgenticChatPage {
2526
.locator('[data-test-id="copilot-chat-ready"]')
2627
.or(page.getByRole("button", { name: /send/i }))
2728
.or(page.locator('button[type="submit"]'));
29+
this.chatBackground = page
30+
.locator('div[style*="background"]')
31+
.or(page.locator('.flex.justify-center.items-center.h-full.w-full'))
32+
.or(page.locator('body'));
2833
this.agentMessage = page
2934
.locator(".copilotKitAssistantMessage");
3035
this.userMessage = page
@@ -49,6 +54,59 @@ export class AgenticChatPage {
4954
}
5055
}
5156

57+
async getBackground(
58+
property: "backgroundColor" | "backgroundImage" = "backgroundColor"
59+
): Promise<string> {
60+
// Wait a bit for background to apply
61+
await this.page.waitForTimeout(500);
62+
63+
// Try multiple selectors for the background element
64+
const selectors = [
65+
'div[style*="background"]',
66+
'div[style*="background-color"]',
67+
'.flex.justify-center.items-center.h-full.w-full',
68+
'div.flex.justify-center.items-center.h-full.w-full',
69+
'[class*="bg-"]',
70+
'div[class*="background"]'
71+
];
72+
73+
for (const selector of selectors) {
74+
try {
75+
const element = this.page.locator(selector).first();
76+
if (await element.isVisible({ timeout: 1000 })) {
77+
const value = await element.evaluate(
78+
(el, prop) => {
79+
// Check inline style first
80+
if (el.style.background) return el.style.background;
81+
if (el.style.backgroundColor) return el.style.backgroundColor;
82+
// Then computed style
83+
return getComputedStyle(el)[prop as any];
84+
},
85+
property
86+
);
87+
if (value && value !== "rgba(0, 0, 0, 0)" && value !== "transparent") {
88+
console.log(`[${selector}] ${property}: ${value}`);
89+
return value;
90+
}
91+
}
92+
} catch (e) {
93+
continue;
94+
}
95+
}
96+
97+
// Fallback to original element
98+
const value = await this.chatBackground.first().evaluate(
99+
(el, prop) => getComputedStyle(el)[prop as any],
100+
property
101+
);
102+
console.log(`[Fallback] ${property}: ${value}`);
103+
return value;
104+
}
105+
106+
async getGradientButtonByName(name: string | RegExp) {
107+
return this.page.getByRole("button", { name });
108+
}
109+
52110
async assertUserMessageVisible(text: string | RegExp) {
53111
await expect(this.userMessage.getByText(text)).toBeVisible();
54112
}
@@ -60,20 +118,25 @@ export class AgenticChatPage {
60118
await expect(agentMessage.last()).toBeVisible({ timeout: 10000 });
61119
}
62120

121+
async assertAgentReplyContains(expectedText: string) {
122+
const agentMessage = this.page.locator(".copilotKitAssistantMessage").last();
123+
await expect(agentMessage).toContainText(expectedText, { timeout: 10000 });
124+
}
125+
63126
async assertWeatherResponseStructure() {
64127
const agentMessage = this.page.locator(".copilotKitAssistantMessage").last();
65-
128+
66129
// Check for main weather response structure
67130
await expect(agentMessage).toContainText("The current weather in Islamabad is as follows:", { timeout: 10000 });
68-
131+
69132
// Check for temperature information
70-
await expect(agentMessage).toContainText("Temperature:", { timeout: 5000 });
133+
await expect(agentMessage).toContainText("Temperature:", { timeout: 5000 });
71134
// Check for humidity
72135
await expect(agentMessage).toContainText("Humidity:", { timeout: 5000 });
73-
136+
74137
// Check for wind speed
75138
await expect(agentMessage).toContainText("Wind Speed:", { timeout: 5000 });
76139
// Check for conditions
77140
await expect(agentMessage).toContainText("Conditions:", { timeout: 5000 });
78141
}
79-
}
142+
}

typescript-sdk/apps/dojo/e2e/pages/llamaIndexPages/SharedStatePage.ts renamed to typescript-sdk/apps/dojo/e2e/featurePages/SharedStatePage.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export class SharedStatePage {
2323
this.addIngredient = page.getByRole('button', { name: '+ Add Ingredient' });
2424
this.agentMessage = page.locator('.copilotKitAssistantMessage');
2525
this.userMessage = page.locator('.copilotKitUserMessage');
26+
this.ingredientCards = page.locator('.ingredient-card');
2627
}
2728

2829
async openChat() {
@@ -46,24 +47,26 @@ export class SharedStatePage {
4647
]);
4748
}
4849

49-
async getIngredientCard(name) {
50-
return this.page.locator(`.ingredient-card:has(input.ingredient-name-input[value="${name}"])`);
50+
async awaitIngredientCard(name: string) {
51+
const selector = `.ingredient-card:has(input.ingredient-name-input[value="${name}"])`;
52+
const cardLocator = this.page.locator(selector);
53+
await expect(cardLocator).toBeVisible();
5154
}
5255

53-
async addNewIngredient(placeholderText) {
56+
async addNewIngredient(placeholderText: string) {
5457
this.addIngredient.click();
5558
this.page.locator(`input[placeholder="${placeholderText}"]`);
5659
}
5760

58-
async getInstructionItems(containerLocator) {
61+
async getInstructionItems(containerLocator: Locator ) {
5962
const count = await containerLocator.locator('.instruction-item').count();
6063
if (count <= 0) {
6164
throw new Error('No instruction items found in the container.');
6265
}
6366
console.log(`✅ Found ${count} instruction items.`);
6467
return count;
6568
}
66-
69+
6770
async assertAgentReplyVisible(expectedText: RegExp) {
6871
await expect(this.agentMessage.getByText(expectedText)).toBeVisible();
6972
}

typescript-sdk/apps/dojo/e2e/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"scripts": {
77
"postinstall": "playwright install --with-deps",
88
"test": "playwright test",
9-
"test:ui": "playwright test --ui"
9+
"test:ui": "playwright test --ui",
10+
"report": "playwright show-report"
1011
},
1112
"devDependencies": {
1213
"@playwright/test": "^1.43.1",

typescript-sdk/apps/dojo/e2e/pages/agnoPages/AgenticChatPage.ts

Lines changed: 0 additions & 67 deletions
This file was deleted.

typescript-sdk/apps/dojo/e2e/pages/crewAIPages/AgenticChatPage.ts

Lines changed: 0 additions & 120 deletions
This file was deleted.

0 commit comments

Comments
 (0)