@wox-launcher/wox-plugin 0.0.70 → 0.0.72
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/package.json +1 -1
- package/types/{llm.d.ts → ai.d.ts} +1 -1
- package/types/index.d.ts +11 -2
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { llm } from "./llm.js"
|
|
2
1
|
import { MetadataCommand, PluginSettingDefinitionItem } from "./setting.js"
|
|
2
|
+
import { AI } from "./ai.js"
|
|
3
3
|
|
|
4
4
|
export type MapString = { [key: string]: string }
|
|
5
5
|
|
|
@@ -83,6 +83,9 @@ export interface Result {
|
|
|
83
83
|
Icon: WoxImage
|
|
84
84
|
Preview?: WoxPreview
|
|
85
85
|
Score?: number
|
|
86
|
+
Group?: string
|
|
87
|
+
GroupScore?: number
|
|
88
|
+
Tails?: ResultTail[]
|
|
86
89
|
ContextData?: string
|
|
87
90
|
Actions?: ResultAction[]
|
|
88
91
|
// refresh result after specified interval, in milliseconds. If this value is 0, Wox will not refresh this result
|
|
@@ -93,6 +96,12 @@ export interface Result {
|
|
|
93
96
|
OnRefresh?: (current: RefreshableResult) => Promise<RefreshableResult>
|
|
94
97
|
}
|
|
95
98
|
|
|
99
|
+
export interface ResultTail {
|
|
100
|
+
Type: "text" | "image"
|
|
101
|
+
Text: string
|
|
102
|
+
Image: WoxImage
|
|
103
|
+
}
|
|
104
|
+
|
|
96
105
|
export interface RefreshableResult {
|
|
97
106
|
Title: string
|
|
98
107
|
SubTitle: string
|
|
@@ -204,7 +213,7 @@ export interface PublicAPI {
|
|
|
204
213
|
/**
|
|
205
214
|
* Chat using LLM
|
|
206
215
|
*/
|
|
207
|
-
LLMStream: (ctx: Context, conversations:
|
|
216
|
+
LLMStream: (ctx: Context, conversations: AI.Conversation[], callback: AI.ChatStreamFunc) => Promise<void>
|
|
208
217
|
}
|
|
209
218
|
|
|
210
219
|
export type WoxImageType = "absolute" | "relative" | "base64" | "svg" | "url" | "emoji"
|