Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 21, 2025

  • Add External flag to UsageFlags enum in interfaces.ts
  • Add logic to propagate External usage recursively for types referenced by external types
  • Add tests to verify External usage flag behavior including transitive references
  • Add changelog entry
  • Use updateUsageOrAccess for External flag propagation
  • Consolidate External usage propagation into single function called after spread usage update
  • Update tests to expect External flag on external types themselves
  • Format code with prettier
  • Verify tests pass

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits October 21, 2025 03:47
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Add new usage type 'external' for models [TCGC] Add External usage flag for types only referenced by external types Oct 21, 2025
@Copilot Copilot AI requested a review from msyyc October 21, 2025 03:56
Copilot finished work on behalf of msyyc October 21, 2025 03:56
Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
@Copilot Copilot AI requested a review from tadelesh October 21, 2025 05:40
Copilot finished work on behalf of tadelesh October 21, 2025 05:40
…lag propagation

Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
@Copilot Copilot AI changed the title [TCGC] Add External usage flag for types only referenced by external types [TCGC] Add External usage flag for types referenced by external types Oct 21, 2025
Copilot finished work on behalf of tadelesh October 21, 2025 06:41
…l sites

Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
@Copilot Copilot AI requested a review from tadelesh October 21, 2025 07:21
Copilot finished work on behalf of tadelesh October 21, 2025 07:21
…l types themselves

Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
Copilot finished work on behalf of tadelesh October 21, 2025 07:28
@tadelesh
Copy link
Member

@copilot do not update external usage everywhere, do it after update spread usage.

…usage

Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
@Copilot
Copy link
Contributor Author

Copilot AI commented Oct 21, 2025

@copilot do not update external usage everywhere, do it after update spread usage.

Consolidated all External usage updates into a single updateExternalUsage() function that's called in handleAllTypes right after updateSpreadModelUsageAndAccess(). Removed the 8 scattered checks from individual type creation functions. (commit 7d8e2a5)

Copilot finished work on behalf of tadelesh October 21, 2025 08:18
Copy link
Member

@tadelesh tadelesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
@Copilot Copilot AI requested a review from tadelesh October 21, 2025 08:31
Copilot finished work on behalf of tadelesh October 21, 2025 08:31
@tadelesh tadelesh marked this pull request as ready for review October 21, 2025 08:31
@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 21, 2025

Open in StackBlitz

npm i https://pkg.pr.new/Azure/typespec-azure/@azure-tools/typespec-client-generator-core@3422

commit: 4fdfeb5

@tadelesh
Copy link
Member

@copilot format the code

Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
@Copilot
Copy link
Contributor Author

Copilot AI commented Oct 22, 2025

@copilot format the code

Code formatted with prettier. (commit ab3c9d1)

Copilot finished work on behalf of tadelesh October 22, 2025 02:57
Copy link
Member

@msyyc msyyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need more discussion.
Update: current design may meet issue for scenario that shared model across external type and normal type. But That scenario may not appear so let us go on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants