Skip to content

Commit

Permalink
Update name and bump versions
Browse files Browse the repository at this point in the history
  • Loading branch information
thenamankumar committed Jul 26, 2024
1 parent 6b967c9 commit dd96d06
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openctx/cli",
"version": "0.0.11",
"version": "0.0.12",
"description": "OpenCtx CLI",
"license": "Apache-2.0",
"homepage": "https://openctx.org/docs/clients/cli",
Expand Down
2 changes: 1 addition & 1 deletion client/vscode-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openctx/vscode-lib",
"version": "0.0.13",
"version": "0.0.14",
"description": "OpenCtx library for VS Code extensions",
"license": "Apache-2.0",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion lib/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openctx/client",
"version": "0.0.19",
"version": "0.0.20",
"description": "OpenCtx client library",
"license": "Apache-2.0",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion lib/protocol/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openctx/protocol",
"version": "0.0.15",
"version": "0.0.16",
"description": "OpenCtx client/provider protocol",
"license": "Apache-2.0",
"repository": {
Expand Down
17 changes: 10 additions & 7 deletions lib/protocol/src/openctx-protocol.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
{
"$ref": "#/definitions/Mention"
},
{
"$ref": "#/definitions/MessageSelector"
},
{
"$ref": "#/definitions/MentionSelector"
},
Expand Down Expand Up @@ -104,14 +107,14 @@
}
}
},
"QuerySelector": {
"description": "List of regex patterns matching the query for which the provider can return context items.",
"MessageSelector": {
"description": "List of regex patterns matching a message for which the provider can return context items.",
"type": "object",
"additionalProperties": false,
"required": ["pattern"],
"properties": {
"pattern": {
"description": "The regex pattern matching the query for which the provider can return context items",
"description": "The regex pattern matching a message for which the provider can return context items",
"type": "string"
}
}
Expand Down Expand Up @@ -164,13 +167,13 @@
"type": "object",
"additionalProperties": false,
"properties": {
"querySelectors": {
"description": "The list of regex patterns for matching with a query for which the provider can return context items",
"messageSelectors": {
"description": "The list of regex patterns for matching with a message for which the provider can return context items",
"type": "array",
"items": {
"$ref": "#/definitions/QuerySelector"
"$ref": "#/definitions/MessageSelector"
},
"tsType": "QuerySelector[]"
"tsType": "MessageSelector[]"
}
}
},
Expand Down
14 changes: 12 additions & 2 deletions lib/protocol/src/openctx-protocol.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type Protocol =
| MetaParams
| MetaResult
| Mention
| MessageSelector
| MentionSelector
| AnnotationSelector
| MentionsParams
Expand Down Expand Up @@ -53,9 +54,9 @@ export interface MetaResult {
*/
items?: {
/**
* The list of regex patterns for matching with a query for which the provider can return context items
* The list of regex patterns for matching with a message for which the provider can return context items
*/
querySelectors?: QuerySelector[]
messageSelectors?: MessageSelector[]
}
/**
* Configuration for the mentions feature.
Expand Down Expand Up @@ -100,6 +101,15 @@ export interface Mention {
[k: string]: unknown | undefined
}
}
/**
* List of regex patterns matching a message for which the provider can return context items.
*/
export interface MessageSelector {
/**
* The regex pattern matching a message for which the provider can return context items
*/
pattern: string
}
/**
* List of regex patterns matching the mention text for which the provider can return mentions.
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/provider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openctx/provider",
"version": "0.0.14",
"version": "0.0.15",
"description": "OpenCtx provider library",
"license": "Apache-2.0",
"repository": {
Expand Down
8 changes: 7 additions & 1 deletion provider/hello-world/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ import type {
*/
const helloWorld: Provider = {
meta(params: MetaParams, settings: ProviderSettings): MetaResult {
return { name: '✨ Hello World!', annotations: {} }
return {
name: '✨ Hello World!',
annotations: {},
items: {
messageSelectors: [{ pattern: '.*' }],
},
}
},

items(params: ItemsParams, settings: ProviderSettings): ItemsResult {
Expand Down
2 changes: 1 addition & 1 deletion provider/hello-world/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openctx/provider-hello-world",
"version": "0.0.14",
"version": "0.0.15",
"description": "Hello World (OpenCtx provider)",
"license": "Apache-2.0",
"homepage": "https://openctx.org/docs/providers/hello-world",
Expand Down

0 comments on commit dd96d06

Please sign in to comment.