@ycodium-ai/plugin-pull-requests 0.2.3216 → 0.2.3230

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/index.ts
2
- import { definePlugin, projectOrNull } from "@ycodium-ai/plugin-api";
2
+ import { definePlugin } from "@ycodium-ai/plugin-api";
3
3
 
4
4
  // src/hostProject.ts
5
5
  var providerOf = (provider) => provider === "github" || provider === "gitlab" ? provider : "unknown";
@@ -4485,31 +4485,6 @@ var createPullRequestService = (options) => {
4485
4485
  // src/index.ts
4486
4486
  var as = (payload) => payload;
4487
4487
  var DIFF_CHUNK_CHARS = 256 * 1024;
4488
- var WORKSPACE_PROJECT_SCHEMA = {
4489
- type: "object",
4490
- additionalProperties: false,
4491
- required: ["projectId", "title", "workspaceRoot"],
4492
- properties: {
4493
- projectId: { type: "string", minLength: 1 },
4494
- title: { type: "string" },
4495
- workspaceRoot: { type: "string" },
4496
- archivedAt: { type: "string" },
4497
- repositoryIdentity: {
4498
- type: ["object", "null"],
4499
- additionalProperties: false,
4500
- properties: {
4501
- provider: { type: "string" },
4502
- canonicalKey: { type: "string" },
4503
- remoteName: { type: "string" },
4504
- remoteUrl: { type: "string" },
4505
- displayName: { type: "string" },
4506
- owner: { type: "string" },
4507
- name: { type: "string" },
4508
- rootPath: { type: "string" }
4509
- }
4510
- }
4511
- }
4512
- };
4513
4488
  var DIFF_STREAM_ITEM_SCHEMA = {
4514
4489
  oneOf: [
4515
4490
  {
@@ -4545,7 +4520,7 @@ var DIFF_STREAM_ITEM_SCHEMA = {
4545
4520
  };
4546
4521
  var index_default = definePlugin({
4547
4522
  id: "pull-requests",
4548
- apiVersion: 22,
4523
+ apiVersion: 23,
4549
4524
  activate: (ctx) => {
4550
4525
  const service = createPullRequestService({
4551
4526
  // 要全部(含已归档,按号点名时用)并解析仓库身份:项目选择器与认领都靠它。
@@ -4687,48 +4662,6 @@ var index_default = definePlugin({
4687
4662
  null,
4688
4663
  (payload) => service.converse(as(payload))
4689
4664
  );
4690
- ctx.command({
4691
- name: "workspaceProjects",
4692
- description: "Unarchived git repositories in this machine's workspace, with their remote identity.",
4693
- scope: "read",
4694
- payloadSchema: { type: "object", properties: {}, additionalProperties: false },
4695
- resultSchema: {
4696
- type: "object",
4697
- additionalProperties: false,
4698
- required: ["projects"],
4699
- properties: { projects: { type: "array", items: WORKSPACE_PROJECT_SCHEMA } }
4700
- },
4701
- handle: async () => {
4702
- const projects = (await ctx.projects.list({})).map(workspaceShellOf);
4703
- return {
4704
- projects: projects.filter((project) => !isArchivedWorkspaceProject(project))
4705
- };
4706
- }
4707
- });
4708
- ctx.command({
4709
- name: "workspaceProject",
4710
- description: "One project of this machine's workspace by id, archived or not, with its archive time.",
4711
- scope: "read",
4712
- payloadSchema: {
4713
- type: "object",
4714
- additionalProperties: false,
4715
- required: ["projectId"],
4716
- properties: { projectId: { type: "string", minLength: 1 } }
4717
- },
4718
- resultSchema: {
4719
- type: "object",
4720
- additionalProperties: false,
4721
- required: ["project"],
4722
- properties: { project: { oneOf: [WORKSPACE_PROJECT_SCHEMA, { type: "null" }] } }
4723
- },
4724
- handle: async (payload) => {
4725
- const project = await projectOrNull(
4726
- ctx.projects,
4727
- as(payload).projectId
4728
- );
4729
- return { project: project === null ? null : workspaceShellOf(project) };
4730
- }
4731
- });
4732
4665
  ctx.settingsCard({
4733
4666
  titleKey: "settings.card.title",
4734
4667
  descriptionKey: "settings.card.description",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/plugin-pull-requests",
3
- "version": "0.2.3216",
3
+ "version": "0.2.3230",
4
4
  "description": "The pull request page, for GitHub and GitLab.",
5
5
  "keywords": [
6
6
  "pull-requests",
@@ -30,7 +30,7 @@
30
30
  "tailwindcss": "^4.0.0",
31
31
  "typescript": "~6.0.3",
32
32
  "vite-plus": "0.2.2",
33
- "@ycodium-ai/plugin-api": "0.2.3216",
33
+ "@ycodium-ai/plugin-api": "0.2.3230",
34
34
  "ycodium-markdown-fence": "0.0.0"
35
35
  },
36
36
  "ycodium": {