Skip to content

Commit 2a5b8b3

Browse files
authored
Merge branch 'main' into belaltaher8/tool-meta-passthrough
2 parents 797fca9 + 6e3893c commit 2a5b8b3

70 files changed

Lines changed: 868 additions & 480 deletions

File tree

Some content is hidden

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

dotnet/src/Generated/Rpc.cs

Lines changed: 44 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotnet/src/Generated/SessionEvents.cs

Lines changed: 24 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotnet/src/Session.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,7 @@ private void UpdateOpenCanvasesFromEvent(SessionEvent sessionEvent)
11181118
InstanceId = data.InstanceId,
11191119
Status = data.Status,
11201120
Title = data.Title,
1121+
Icon = data.Icon,
11211122
Url = data.Url,
11221123
});
11231124
}

dotnet/test/Unit/CanvasTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ public void SessionCanvasOpenedEvent_UpdatesOpenCanvasSnapshots()
166166
ExtensionName = "Counter Provider",
167167
InstanceId = "counter-1",
168168
Title = "Counter",
169+
Icon = "beaker",
169170
Status = "ready",
170171
Url = "https://example.test/counter",
171172
Input = JsonDocument.Parse("""{"seed":1}""").RootElement.Clone(),
@@ -200,6 +201,7 @@ public void SessionCanvasOpenedEvent_UpdatesOpenCanvasSnapshots()
200201
ExtensionName = "Counter Provider",
201202
InstanceId = "counter-1",
202203
Title = "Counter Updated",
204+
Icon = "beaker-filled",
203205
Status = "reconnected",
204206
Url = "https://example.test/counter-updated",
205207
Input = JsonDocument.Parse("""{"seed":2}""").RootElement.Clone(),
@@ -212,6 +214,7 @@ public void SessionCanvasOpenedEvent_UpdatesOpenCanvasSnapshots()
212214
{
213215
Assert.Equal("counter-1", canvas.InstanceId);
214216
Assert.Equal("Counter Updated", canvas.Title);
217+
Assert.Equal("beaker-filled", canvas.Icon);
215218
Assert.Equal("reconnected", canvas.Status);
216219
Assert.Equal("https://example.test/counter-updated", canvas.Url);
217220
Assert.Equal(2, canvas.Input!.Value.GetProperty("seed").GetInt32());

dotnet/test/Unit/ForwardCompatibilityTests.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,24 @@ public void FromJson_UnknownEventType_WithUnknownEnumInData_DoesNotThrow()
168168
Assert.Equal("unknown", result.Type);
169169
}
170170

171+
[Fact]
172+
public void FromJson_InternalEventType_ReturnsBaseSessionEvent()
173+
{
174+
var json = """
175+
{
176+
"id": "12345678-1234-1234-1234-123456789abc",
177+
"timestamp": "2026-06-15T10:30:00Z",
178+
"type": "session.memory_changed",
179+
"data": {}
180+
}
181+
""";
182+
183+
var result = SessionEvent.FromJson(json);
184+
185+
Assert.IsType<SessionEvent>(result);
186+
Assert.Equal("unknown", result.Type);
187+
}
188+
171189
[Fact]
172190
public void FromJson_KnownEventType_WithUnknownEnumInData_PreservesValue()
173191
{

go/definetool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func generateSchemaForType(t reflect.Type) map[string]any {
207207
}
208208

209209
// Handle pointer types
210-
if t.Kind() == reflect.Ptr {
210+
if t.Kind() == reflect.Pointer {
211211
t = t.Elem()
212212
}
213213

go/internal/e2e/event_fidelity_e2e_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ func TestEventFidelityE2E(t *testing.T) {
168168

169169
if answer == nil {
170170
t.Fatal("Expected SendAndWait to return an assistant message")
171+
return
171172
}
172173
if ad, ok := answer.Data.(*copilot.AssistantMessageData); !ok || !strings.Contains(ad.Content, "18") {
173174
t.Errorf("Expected answer to contain '18', got %v", answer.Data)

go/internal/e2e/rpc_server_e2e_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,7 @@ func TestRPCServerE2E(t *testing.T) {
604604
projectSkillPath := findSkillDiscoveryPath(skillPaths.Paths, ctx.WorkDir)
605605
if projectSkillPath == nil {
606606
t.Fatalf("Expected skill discovery paths to include %q", ctx.WorkDir)
607+
return
607608
}
608609
if strings.TrimSpace(projectSkillPath.Path) == "" {
609610
t.Fatal("Expected non-empty skill discovery path")
@@ -632,6 +633,7 @@ func TestRPCServerE2E(t *testing.T) {
632633
projectAgentPath := findAgentDiscoveryPath(agentPaths.Paths, ctx.WorkDir)
633634
if projectAgentPath == nil {
634635
t.Fatalf("Expected agent discovery paths to include %q", ctx.WorkDir)
636+
return
635637
}
636638
if strings.TrimSpace(projectAgentPath.Path) == "" {
637639
t.Fatal("Expected non-empty agent discovery path")

go/internal/e2e/rpc_server_misc_e2e_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ func TestRpcServerMisc(t *testing.T) {
159159
}
160160
if users == nil {
161161
t.Fatal("Expected non-nil users result")
162+
return
162163
}
163164
for _, user := range *users {
164165
userInfo, ok := user.AuthInfo.(*rpc.UserAuthInfo)

go/internal/e2e/rpc_server_plugins_e2e_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func TestRpcServerPlugins(t *testing.T) {
5858
listed := findPortedInstalledPlugin(afterInstall.Plugins, portedPluginName, portedMarketplaceName)
5959
if listed == nil {
6060
t.Fatalf("Expected installed plugin %q in marketplace %q", portedPluginName, portedMarketplaceName)
61+
return
6162
}
6263
if !listed.Enabled {
6364
t.Fatal("Expected listed marketplace plugin to be enabled")
@@ -229,6 +230,7 @@ func TestRpcServerPlugins(t *testing.T) {
229230
mine := findPortedMarketplace(list.Marketplaces, portedMarketplaceName)
230231
if mine == nil {
231232
t.Fatalf("Expected marketplace %q in list %+v", portedMarketplaceName, list.Marketplaces)
233+
return
232234
}
233235
if mine.IsDefault != nil && *mine.IsDefault {
234236
t.Fatal("Expected local marketplace not to be marked default")

0 commit comments

Comments
 (0)