sessions

bởi microsoft

Kiến trúc cửa sổ tác nhân — bao gồm ứng dụng ưu tiên tác nhân, phân lớp, cấu trúc thư mục, widget trò chuyện, menu, đóng góp, điểm vào và phát triển…

npx skills add https://github.com/microsoft/vscode --skill sessions

Agents Window development

Use this skill for implementation, review, or design work under src/vs/sessions/**.

1. Apply the core principles

  • Preserve the layer direction: vs/sessions may import vs/workbench and lower layers; vs/workbench must never import vs/sessions.
  • Keep shared Sessions code provider-neutral. Non-provider contributions must not import provider implementations.
  • Model mutable session and chat state with observables. Use events for notifications, not as a parallel state model or for control flow.
  • Register Sessions menu IDs in browser/menus.ts and consume Menus.*.
  • Import contributions from the appropriate sessions.*.main.ts entry point.
  • Prefer Sessions-owned adaptations over shared workbench changes unless the capability is genuinely shared.
  • Put stable architecture in the owning specification and concrete behavior in tests. Do not preserve implementation chronology as development guidance.

2. Identify the owning area

Start with src/vs/sessions/README.md, then read only the specifications relevant to the change:

AreaSpecification
Layering, folder ownership, cross-module importssrc/vs/sessions/LAYERS.md
Session/chat model, services, provider contract, core data flowsrc/vs/sessions/SESSIONS.md
Automations ownership, routing, migration, persistence, and run lifecyclesrc/vs/sessions/AUTOMATIONS.md
Workbench parts, grid, title bar, editor presentationsrc/vs/sessions/LAYOUT.md
Session-aware layout state and restorationsrc/vs/sessions/LAYOUT_CONTROLLER.md
Single-pane behavior and expected compositionssrc/vs/sessions/SINGLE_PANE_SCENARIOS.md
Sessions sidebar list, grouping, filtering, and persistencesrc/vs/sessions/SESSIONS_LIST.md
Phone layout and mobile componentssrc/vs/sessions/MOBILE.md
AI customizationssrc/vs/sessions/AI_CUSTOMIZATIONS.md
Copilot customizationssrc/vs/sessions/copilot-customizations-spec.md
Copilot Chat providersrc/vs/sessions/contrib/providers/copilotChatSessions/COPILOT_CHAT_SESSIONS_PROVIDER.md
Agent Host providersrc/vs/sessions/contrib/providers/agentHost/AGENT_HOST_SESSIONS_PROVIDER.md
Remote Agent Host providersrc/vs/sessions/contrib/providers/remoteAgentHost/REMOTE_AGENT_HOST_SESSIONS_PROVIDER.md

Do not load the learning inbox by default. Search its headings and scopes, then read only matching entries after the authoritative specification.

3. Inspect before changing

  • Trace the current implementation and its existing tests.
  • Search for shared helpers, context keys, menu IDs, entry-point imports, and provider abstractions before adding new ones.
  • Confirm which layer owns the behavior. Keep provider-specific decisions in the provider and view/layout decisions in Sessions-owned browser code.
  • For UI work, also invoke the applicable accessibility, design, CSS, layout, or theming skill.
  • For agent, LLM, policy, permissions, telemetry, or managed-setting changes, invoke the applicable specialist skill before implementation.

4. Implement the contract

Apply the core principles and the focused specification. Prefer small changes that preserve these boundaries:

  • ISessionsManagementService owns model orchestration and provider routing.
  • ISessionsService owns visible and active session behavior.
  • Providers expose provider-neutral state through ISession and IChat.
  • Session state is observable; consumers derive UI state reactively.
  • Contributions load through the appropriate sessions.*.main.ts entry point.
  • Sessions menus use the shared Menus registry.
  • Shared workbench changes represent shared capability, not Sessions-specific policy.

Specification edit gate

Bug fixes do not update specifications when they restore an existing contract. Before editing an authoritative specification, identify all three:

  1. the existing ownership, interface, lifecycle, state-machine, persistence, or cross-component contract that intentionally changes;
  2. the implementation surfaces affected by that contract change;
  3. why a regression test and a brief code comment cannot fully represent it.

If any answer is missing, leave the specification unchanged. Put concrete behavior in a focused test, keep a non-obvious implementation constraint beside the owning code, and preserve investigation history in the issue or pull request.

Update a specification only when component ownership, an interface or lifecycle contract, a state machine, persistence, or a cross-component invariant changes. Do not update specifications for styling, copy, action placement, telemetry fields, settings defaults, implementation algorithms, or individual bug fixes. Those details belong in code and focused tests.

5. Validate proportionally

Run the smallest existing checks that cover the change:

  • focused unit tests for affected behavior;
  • npm run valid-layers-check when imports or module ownership change;
  • targeted type checking or compilation when TypeScript changes warrant it;
  • relevant integration, E2E, or visual validation for cross-process or UI work.

Documentation-only changes require link, path, and consistency checks rather than a full build.

6. Record feedback correctly

When a user explicitly corrects or rejects an approach, invoke the feedback-learning skill unless they use the literal learn! trigger. Literal learn! requests follow .github/instructions/learnings.instructions.md instead. A durable architecture invariant belongs in the owning specification, concrete behavior belongs in a regression test, and unproven reusable guidance belongs temporarily in the scoped learning inbox. Never append every correction to this skill.

7. Maintain this skill

Update this skill only when a principle is stable, cross-cutting, and useful for most Agents Window work, or when the routing/workflow itself changes. Put subsystem contracts in their focused specification and bug behavior in tests.

Keep the core-principles section at no more than ten bullets. Before adding one, merge overlap, remove obsolete guidance, and prefer rewriting an existing principle. Never append incident-specific details or use this skill as a learning log.

Thêm skills từ microsoft

oss-growth
microsoft
Cá tính tăng trưởng OSS
agent-framework-azure-ai-py
microsoft
Xây dựng các tác nhân Azure AI Foundry bằng SDK Python của Microsoft Agent Framework (agent-framework-azure-ai). Sử dụng khi tạo các tác nhân bền vững với AzureAIAgentsProvider, sử dụng các công cụ được lưu trữ (trình thông dịch mã, tìm kiếm tệp, tìm kiếm web), tích hợp máy chủ MCP, quản lý chuỗi hội thoại hoặc triển khai phản hồi phát trực tuyến. Bao gồm các công cụ hàm, đầu ra có cấu trúc và các tác nhân đa công cụ.
development
airunway-aks-setup
microsoft
Thiết lập AI Runway trên AKS — từ cụm trống đến mô hình đang chạy. Bao gồm xác minh cụm, cài đặt controller, đánh giá GPU, thiết lập nhà cung cấp và triển khai đầu tiên. KHI NÀO: "thiết lập AI Runway", "onboard cụm AKS", "cài đặt AI Runway", "thiết lập airunway", "triển khai mô hình lên AKS", "suy luận GPU trên AKS", "thiết lập KAITO trên AKS", "chạy LLM trên AKS", "vLLM trên AKS", "thiết lập phục vụ mô hình trên AKS", "AI Runway controller".
devops
appinsights-instrumentation
microsoft
Hướng dẫn để instrument các ứng dụng web với Azure Application Insights. Cung cấp các mẫu telemetry, thiết lập SDK, và tài liệu tham khảo cấu hình. KHI NÀO: cách instrument ứng dụng, App Insights SDK, các mẫu telemetry, App Insights là gì, hướng dẫn Application Insights, ví dụ instrumentation, các phương pháp tốt nhất APM.
devops
applicationinsights-web-ts
microsoft
Instrument các ứng dụng trình duyệt/web bằng SDK JavaScript Application Insights (@microsoft/applicationinsights-web). Dùng cho Real User Monitoring (RUM) — lượt xem trang, nhấp chuột, phụ thuộc AJAX/fetch, ngoại lệ, sự kiện tùy chỉnh và dấu vết tác nhân GenAI phía trình duyệt tương quan với dấu vết OpenTelemetry phía backend. Bao gồm thiết lập SDK Loader Script và npm, tiện ích mở rộng framework (React, React Native, Angular), Click Analytics, trình khởi tạo telemetry và quy ước ngữ nghĩa OTel GenAI cho các span tác nhân/công cụ/mô hình phát ra từ trình duyệt.
devops
azure-ai-anomalydetector-java
microsoft
Xây dựng ứng dụng phát hiện bất thường với Azure AI Anomaly Detector SDK cho Java. Sử dụng khi triển khai phát hiện bất thường đơn biến/đa biến, phân tích chuỗi thời gian hoặc giám sát hỗ trợ AI.
development
azure-ai-language-conversations-py
microsoft
Triển khai Conversational Language Understanding (CLU) bằng SDK Python azure-ai-language-conversations. Sử dụng khi làm việc với ConversationAnalysisClient để phân tích ý định và thực thể trong hội thoại, xây dựng tính năng NLP, hoặc tích hợp hiểu ngôn ngữ vào ứng dụng.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 cho Python. Dùng cho không gian làm việc ML, công việc, mô hình, tập dữ liệu, tính toán và quy trình. Kích hoạt: "azure-ai-ml", "MLClient", "không gian làm việc", "đăng ký mô hình", "công việc đào tạo", "tập dữ liệu".
development