@celljs/ta-extensions 4.8.0 → 4.9.0

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.
@@ -1,72 +0,0 @@
1
- import { afterEach, beforeEach, describe, expect, it } from 'bun:test';
2
- import { existsSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
3
- import { tmpdir } from 'node:os';
4
- import { join } from 'node:path';
5
- import type { TaExtensionHost, TaPackageInfo } from '@celljs/ta-protocol';
6
- import { ExtensionsService, PackageFiles } from './host';
7
-
8
- function write(file: string, content: string) {
9
- mkdirSync(join(file, '..'), { recursive: true });
10
- writeFileSync(file, content);
11
- }
12
-
13
- describe('ExtensionsService', () => {
14
- let home: string;
15
- let agentDir: string;
16
- let packages: TaPackageInfo[];
17
- let service: ExtensionsService;
18
- beforeEach(() => {
19
- home = mkdtempSync(join(tmpdir(), 'ta-ext-host-'));
20
- agentDir = join(home, 'agent');
21
- const root = join(agentDir, 'extensions/pomodoro');
22
- write(join(root, 'package.json'), JSON.stringify({ name: 'pomodoro', version: '0.2.0' }));
23
- write(join(root, 'web.js'), 'export default function () {}\n');
24
- const info = (id: string, origin: TaPackageInfo['origin'], dir: string): TaPackageInfo => ({
25
- id,
26
- name: id,
27
- version: '0.2.0',
28
- scope: 'user',
29
- origin,
30
- enabled: true,
31
- source: dir,
32
- root: dir,
33
- resources: ['web'],
34
- });
35
- packages = [info('pomodoro', 'directory', root), info('@celljs/ta-channels', 'builtin', join(home, 'builtin'))];
36
- service = new ExtensionsService({ agentDir, listPackages: async () => packages } as unknown as TaExtensionHost);
37
- });
38
- afterEach(() => rmSync(home, { recursive: true, force: true }));
39
-
40
- it('exports a package as one file, which imports elsewhere as it was', async () => {
41
- const exported = await service.exportPackage('pomodoro');
42
- expect(exported.fileName).toBe('pomodoro-0.2.0.tgz');
43
- const other = new ExtensionsService({ agentDir: join(home, 'other'), listPackages: async () => [] } as unknown as TaExtensionHost);
44
- expect(await other.importPackage(exported.data)).toEqual({ status: 'imported', name: 'pomodoro', directory: 'pomodoro' });
45
- expect(readFileSync(join(home, 'other/extensions/pomodoro/web.js'), 'utf8')).toBe('export default function () {}\n');
46
- });
47
-
48
- it('asks before replacing a package of the same directory, and leaves nothing half done', async () => {
49
- const { data } = await service.exportPackage('pomodoro');
50
- write(join(agentDir, 'extensions/pomodoro/web.js'), 'changed');
51
- expect(await service.importPackage(data)).toMatchObject({ status: 'exists' });
52
- expect(readFileSync(join(agentDir, 'extensions/pomodoro/web.js'), 'utf8')).toBe('changed');
53
- expect(await service.importPackage(data, true)).toMatchObject({ status: 'imported' });
54
- expect(readFileSync(join(agentDir, 'extensions/pomodoro/web.js'), 'utf8')).toBe('export default function () {}\n');
55
- expect(readdirSync(join(agentDir, 'extensions'))).toEqual(['pomodoro']);
56
- });
57
-
58
- it('does not export what comes with Ta, nor what is not there', async () => {
59
- await expect(service.exportPackage('@celljs/ta-channels')).rejects.toThrow('comes with Ta');
60
- await expect(service.exportPackage('nope')).rejects.toThrow('No package has the id nope');
61
- });
62
-
63
- it('refuses what is not an archive of a package', async () => {
64
- await expect(service.importPackage(Buffer.from('hello').toString('base64'))).rejects.toThrow('not a .tgz');
65
- expect(existsSync(join(agentDir, 'extensions/hello'))).toBe(false);
66
- });
67
-
68
- it('names the directory after the package, without its scope', () => {
69
- expect(PackageFiles.directoryName('@you/Pomodoro Timer')).toBe('pomodoro-timer');
70
- expect(PackageFiles.directoryName('..')).toBe('extension');
71
- });
72
- });
package/web-src/host.ts DELETED
@@ -1,115 +0,0 @@
1
- import { randomBytes } from 'node:crypto';
2
- import { chmodSync, existsSync, mkdirSync, renameSync, rmSync, writeFileSync } from 'node:fs';
3
- import { basename, dirname, join } from 'node:path';
4
- import type { TaExtensionHost, TaPackageService } from '@celljs/ta-protocol';
5
- import { ExtensionArchive } from './archive';
6
- import { NpmMarket } from './market';
7
- import type { MarketDetail, MarketPage } from './market-util';
8
-
9
- /** A package in one file, as the page downloads it: the bytes in base64, which JSON carries. */
10
- export interface ExportedPackage {
11
- fileName: string;
12
- data: string;
13
- }
14
-
15
- /** `exists`: a package of that directory is there, and nothing changed; import again with `overwrite`. */
16
- export interface ImportedPackage {
17
- status: 'imported' | 'exists';
18
- name: string;
19
- /** In `extensions/` of the agent directory. */
20
- directory: string;
21
- }
22
-
23
- export namespace PackageFiles {
24
- /** The directory of a package in `extensions/`: its name without scope, in the letters a directory takes everywhere. */
25
- export function directoryName(name: string): string {
26
- const plain = name
27
- .slice(name.lastIndexOf('/') + 1)
28
- .toLowerCase()
29
- .replace(/[^a-z0-9._-]+/g, '-')
30
- .replace(/^[-.]+|-+$/g, '');
31
- return plain || 'extension';
32
- }
33
- }
34
-
35
- /**
36
- * The server side of ta-extensions: a package of the user in one file to hand on, and such a file put
37
- * into `extensions/` of the agent directory, where pi finds it with no setting; and the market, the
38
- * pi packages of npm, found here because here they install.
39
- */
40
- export class ExtensionsService implements TaPackageService {
41
- constructor(
42
- protected readonly host: TaExtensionHost,
43
- protected readonly market = new NpmMarket(),
44
- ) {}
45
-
46
- /** Nothing to stop: each call stands alone. */
47
- dispose(): void {}
48
-
49
- searchMarket(query: string, from?: number): Promise<MarketPage> {
50
- return this.market.search(query, from);
51
- }
52
-
53
- marketPackage(name: string): Promise<MarketDetail> {
54
- return this.market.detail(name);
55
- }
56
-
57
- async exportPackage(id: string, cwd?: string): Promise<ExportedPackage> {
58
- const pkg = (await this.host.listPackages(cwd)).find(candidate => candidate.id === id);
59
- if (!pkg) {
60
- throw new Error(`No package has the id ${id}; it may have moved or gone.`);
61
- }
62
- if (pkg.origin === 'builtin') {
63
- throw new Error(`${pkg.name} comes with Ta: everyone has it already.`);
64
- }
65
- const top = basename(pkg.root);
66
- const archive = ExtensionArchive.pack(top, ExtensionArchive.collect(pkg.root));
67
- return { fileName: `${top}${pkg.version ? `-${pkg.version}` : ''}.tgz`, data: Buffer.from(archive).toString('base64') };
68
- }
69
-
70
- async importPackage(data: string, overwrite = false): Promise<ImportedPackage> {
71
- if (typeof data !== 'string' || data === '') {
72
- throw new Error('Pass the bytes of the file in base64.');
73
- }
74
- const { top, files } = ExtensionArchive.unpack(Buffer.from(data, 'base64'));
75
- const name = this.nameOf(files) ?? top;
76
- const directory = PackageFiles.directoryName(name);
77
- const extensions = join(this.host.agentDir, 'extensions');
78
- const target = join(extensions, directory);
79
- if (existsSync(target) && !overwrite) {
80
- return { status: 'exists', name, directory };
81
- }
82
- // Written beside it under a name pi skips, then put in its place: a session never loads half of it.
83
- const staging = join(extensions, `.${directory}.${randomBytes(4).toString('hex')}`);
84
- try {
85
- for (const file of files) {
86
- const path = join(staging, ...file.path.split('/'));
87
- mkdirSync(dirname(path), { recursive: true });
88
- writeFileSync(path, file.data);
89
- if (file.executable) {
90
- chmodSync(path, 0o755);
91
- }
92
- }
93
- rmSync(target, { recursive: true, force: true });
94
- renameSync(staging, target);
95
- } finally {
96
- rmSync(staging, { recursive: true, force: true });
97
- }
98
- return { status: 'imported', name, directory };
99
- }
100
-
101
- protected nameOf(files: { path: string; data: Uint8Array }[]): string | undefined {
102
- const manifest = files.find(file => file.path === 'package.json');
103
- try {
104
- const name = JSON.parse(Buffer.from(manifest?.data ?? []).toString('utf8'))?.name;
105
- return typeof name === 'string' && name.trim() ? name.trim() : undefined;
106
- } catch {
107
- return undefined;
108
- }
109
- }
110
- }
111
-
112
- /** `pi.host` of the package: ta serve runs it once. */
113
- export default function activate(host: TaExtensionHost): TaPackageService {
114
- return new ExtensionsService(host);
115
- }
package/web-src/i18n.ts DELETED
@@ -1,240 +0,0 @@
1
- import type { TaPackageResource } from '@celljs/ta-protocol';
2
- import type { MarketKind } from './market-util';
3
- import type { KindName } from './pictures';
4
-
5
- /** A search the market suggests before the user types one. */
6
- export interface Topic {
7
- label: string;
8
- query: string;
9
- }
10
-
11
- /** A kind of extension, and the one Ta makes of it when picked. */
12
- export interface Example {
13
- kind: KindName;
14
- label: string;
15
- example: string;
16
- text: string;
17
- }
18
-
19
- const EN = {
20
- title: 'Extensions',
21
- heroTitle: 'Make an extension in a sentence',
22
- heroText: 'It works as soon as the reply ends, with no restart.',
23
- placeholder: 'Describe the extension, for example: a pomodoro timer beside the conversation',
24
- makePrompt: 'Make an extension: {text}',
25
- changePrompt: 'Change the extension {name} (in {root}): {text}',
26
- changeTitle: 'Change {name}',
27
- changePlaceholder: 'What should it do differently?',
28
- mine: 'Yours',
29
- mineEmpty: 'None yet: say what you want above, or find one in the marketplace.',
30
- tabMine: 'Mine',
31
- tabMarket: 'Marketplace',
32
- browseMarket: 'Browse the marketplace',
33
- marketSearch: 'Search extensions, for example web search, mcp',
34
- marketClear: 'Clear',
35
- marketPopular: 'Most used',
36
- marketResults: 'Results',
37
- marketCount: '{count} in all',
38
- marketNote: 'Pi packages from npm. An extension runs code on this computer: read what it does before installing it.',
39
- marketEmpty: 'Nothing matches “{query}”. Try other words.',
40
- marketError: 'The marketplace cannot be reached',
41
- retry: 'Try again',
42
- installing: 'Installing…',
43
- installedTag: 'Installed',
44
- builtinTag: 'Built in',
45
- perMonth: '{count}/mo',
46
- by: 'by {name}',
47
- back: 'Back',
48
- source: 'Source',
49
- homepage: 'Homepage',
50
- noReadme: 'It says nothing more about itself.',
51
- readmeTitle: 'Details',
52
- loadingMore: 'Loading more…',
53
- allShown: 'That is all of them.',
54
- topics: [
55
- { label: 'Web search', query: 'web search' },
56
- { label: 'MCP', query: 'mcp' },
57
- { label: 'Subagents', query: 'subagent' },
58
- { label: 'Memory', query: 'memory' },
59
- { label: 'Browser', query: 'browser' },
60
- { label: 'Themes', query: 'theme' },
61
- ] as Topic[],
62
- marketKinds: {
63
- extensions: 'Extension',
64
- skills: 'Skill',
65
- prompts: 'Prompts',
66
- themes: 'Theme',
67
- } as Record<MarketKind, string>,
68
- installed: 'Installed',
69
- import: 'Import',
70
- export: 'Export',
71
- change: 'Change',
72
- remove: 'Remove',
73
- copySource: 'Copy the source',
74
- copied: 'Copied {source}',
75
- removeTitle: 'Remove {name}?',
76
- removeDetail: 'Its pages, cards and commands go with it.',
77
- removed: 'Removed {name}',
78
- exported: 'Exported {file}',
79
- imported: 'Imported {name}; it works now',
80
- installedOk: 'Installed {name}; it works now',
81
- existsTitle: '{name} is there already. Replace it?',
82
- existsDetail: 'Its files give way to those of the file imported.',
83
- replace: 'Replace',
84
- project: 'This project',
85
- turnOn: 'Turn {name} on',
86
- turnedOn: '{name} is on',
87
- turnedOff: '{name} is off',
88
- shareTitle: 'Hand them on',
89
- shareSteps: ['Export', 'Send the .tgz', 'They import it'],
90
- shareMore: 'npm and Git sources import too, or just tell Ta.',
91
- importTitle: 'Import an extension',
92
- dropHere: 'Drop a .tgz file here, or',
93
- chooseFile: 'choose a file',
94
- orSource: 'Or install it from npm or Git',
95
- sourcePlaceholder: 'npm:@scope/name or https://github.com/you/repo',
96
- install: 'Install',
97
- working: 'Working…',
98
- trust: 'An extension runs code on this computer: import only those of people you trust.',
99
- dropToImport: 'Drop to import',
100
- notArchive: 'Only a .tgz file of an extension imports.',
101
- loading: 'Loading…',
102
- kinds: {
103
- extensions: 'Commands',
104
- web: 'On the page',
105
- skills: 'Skills',
106
- prompts: 'Prompts',
107
- themes: 'Themes',
108
- } as Record<TaPackageResource, string>,
109
- examples: [
110
- {
111
- kind: 'card',
112
- label: 'Card',
113
- example: 'Pomodoro',
114
- text: 'a pomodoro timer as a card beside the conversation: 25 minutes of work, 5 of rest, and a notice when each ends',
115
- },
116
- {
117
- kind: 'page',
118
- label: 'Page',
119
- example: 'Commits by day',
120
- text: 'a page that shows, by day, the commits and the lines changed of this repository over the last 30 days',
121
- },
122
- {
123
- kind: 'command',
124
- label: 'Command',
125
- example: '/standup',
126
- text: 'a /standup command that sums up what I committed and changed today in this repository, as words for the stand-up',
127
- },
128
- { kind: 'skill', label: 'Skill', example: 'Into English', text: 'a skill: when I say "in English", Ta puts its last reply into natural English' },
129
- ] as Example[],
130
- };
131
-
132
- export type Words = typeof EN;
133
-
134
- const ZH: Words = {
135
- title: '扩展',
136
- heroTitle: '用一句话做一个扩展',
137
- heroText: '回答结束就生效,不用重启。',
138
- placeholder: '描述你想要的扩展,例如:在对话旁放一个番茄钟',
139
- makePrompt: '做一个扩展:{text}',
140
- changePrompt: '修改扩展 {name}(在 {root}):{text}',
141
- changeTitle: '修改 {name}',
142
- changePlaceholder: '想让它有什么不同?',
143
- mine: '我的扩展',
144
- mineEmpty: '还没有。在上面说一句就能做一个,也可以去市场找找。',
145
- tabMine: '我的',
146
- tabMarket: '市场',
147
- browseMarket: '去市场看看',
148
- marketSearch: '用英文搜索扩展,例如 web search、mcp',
149
- marketClear: '清除',
150
- marketPopular: '最常用',
151
- marketResults: '搜索结果',
152
- marketCount: '共 {count} 个',
153
- marketNote: '来自 npm 上的 pi 包。扩展会在这台电脑上运行代码,安装前可以先看看介绍。',
154
- marketEmpty: '没有找到“{query}”相关的扩展,换个词试试。',
155
- marketError: '暂时连不上扩展市场',
156
- retry: '重试',
157
- installing: '安装中…',
158
- installedTag: '已安装',
159
- builtinTag: '内置',
160
- perMonth: '{count}/月',
161
- by: '{name}',
162
- back: '返回',
163
- source: '源代码',
164
- homepage: '主页',
165
- noReadme: '作者没有写更多介绍。',
166
- readmeTitle: '介绍',
167
- loadingMore: '正在加载更多…',
168
- allShown: '已经到底了',
169
- topics: [
170
- { label: '网页搜索', query: 'web search' },
171
- { label: 'MCP', query: 'mcp' },
172
- { label: '子 Agent', query: 'subagent' },
173
- { label: '记忆', query: 'memory' },
174
- { label: '浏览器', query: 'browser' },
175
- { label: '主题', query: 'theme' },
176
- ],
177
- marketKinds: {
178
- extensions: '扩展',
179
- skills: '技能',
180
- prompts: '提示模板',
181
- themes: '主题',
182
- },
183
- installed: '安装的扩展',
184
- import: '导入',
185
- export: '导出',
186
- change: '修改',
187
- remove: '移除',
188
- copySource: '复制来源',
189
- copied: '已复制 {source}',
190
- removeTitle: '移除扩展 {name}?',
191
- removeDetail: '它的页面、卡片和命令也会一起移除。',
192
- removed: '已移除 {name}',
193
- exported: '已导出 {file}',
194
- imported: '已导入 {name},已经生效',
195
- installedOk: '已安装 {name},已经生效',
196
- existsTitle: '已有扩展 {name},要替换吗?',
197
- existsDetail: '现有的文件会换成导入的版本。',
198
- replace: '替换',
199
- project: '本项目',
200
- turnOn: '启用 {name}',
201
- turnedOn: '已启用 {name}',
202
- turnedOff: '已停用 {name}',
203
- shareTitle: '分享给别人',
204
- shareSteps: ['导出', '发送 .tgz 文件', '对方导入'],
205
- shareMore: '也支持 npm、Git 来源,或者直接对 Ta 说。',
206
- importTitle: '导入扩展',
207
- dropHere: '把 .tgz 文件拖到这里,或',
208
- chooseFile: '选择文件',
209
- orSource: '或者从 npm、Git 安装',
210
- sourcePlaceholder: 'npm:@scope/name 或 https://github.com/you/repo',
211
- install: '安装',
212
- working: '正在处理…',
213
- trust: '扩展会在这台电脑上运行代码:只导入你信任的人给的扩展。',
214
- dropToImport: '松开即可导入',
215
- notArchive: '只能导入扩展的 .tgz 文件。',
216
- loading: '正在加载…',
217
- kinds: {
218
- extensions: '命令',
219
- web: '界面',
220
- skills: '技能',
221
- prompts: '提示模板',
222
- themes: '主题',
223
- },
224
- examples: [
225
- { kind: 'card', label: '卡片', example: '番茄钟', text: '在对话旁放一个番茄钟卡片:专注 25 分钟、休息 5 分钟,每段结束时提醒我' },
226
- { kind: 'page', label: '页面', example: '提交统计', text: '加一个页面,按天显示这个仓库最近 30 天的提交数和改动行数' },
227
- { kind: 'command', label: '命令', example: '/standup', text: '加一个 /standup 命令:总结我今天在这个仓库里的提交和改动,写成站会发言' },
228
- { kind: 'skill', label: '技能', example: '翻成英文', text: '加一个技能,我说“翻成英文”时,把上一条回复翻成地道的英文' },
229
- ],
230
- };
231
-
232
- export namespace ExtensionWords {
233
- export function of(language: string): Words {
234
- return language === 'zh-CN' ? ZH : EN;
235
- }
236
-
237
- export function fill(template: string, values: Record<string, string>): string {
238
- return template.replace(/\{(\w+)\}/g, (whole, key: string) => values[key] ?? whole);
239
- }
240
- }
@@ -1,89 +0,0 @@
1
- import type { WebExtensionAPI } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
2
- import type { ExtensionActions } from './actions';
3
- import { React } from './react';
4
-
5
- export interface ImportDialogProps {
6
- pi: WebExtensionAPI;
7
- actions: ExtensionActions;
8
- onClose(): void;
9
- }
10
-
11
- /** A .tgz file, dropped or chosen, or a source of npm or Git. */
12
- export function ImportDialog({ pi, actions, onClose }: ImportDialogProps): React.ReactElement {
13
- const words = actions.words;
14
- const { Dialog, icons } = pi.ui;
15
- const Upload = icons.Upload ?? icons.Download;
16
- const input = React.useRef<HTMLInputElement>(null);
17
- const [over, setOver] = React.useState(false);
18
- const [busy, setBusy] = React.useState(false);
19
- const [source, setSource] = React.useState('');
20
- const run = async (action: () => Promise<boolean>) => {
21
- setBusy(true);
22
- try {
23
- if (await action()) {
24
- onClose();
25
- }
26
- } finally {
27
- setBusy(false);
28
- }
29
- };
30
- const take = (file: File | undefined) => file && void run(() => actions.importFile(file));
31
- return (
32
- <Dialog title={words.importTitle} onClose={onClose}>
33
- <div className="tax-dialog">
34
- <section
35
- aria-label={words.importTitle}
36
- className={`tax-drop${over ? ' tax-over' : ''}`}
37
- onDragOver={event => {
38
- event.preventDefault();
39
- setOver(true);
40
- }}
41
- onDragLeave={() => setOver(false)}
42
- onDrop={event => {
43
- event.preventDefault();
44
- setOver(false);
45
- take(event.dataTransfer.files[0]);
46
- }}
47
- >
48
- {Upload && <Upload size={22} />}
49
- <div>
50
- {busy ? (
51
- words.working
52
- ) : (
53
- <>
54
- {words.dropHere}{' '}
55
- <button type="button" className="tax-link" onClick={() => input.current?.click()}>
56
- {words.chooseFile}
57
- </button>
58
- </>
59
- )}
60
- </div>
61
- <input
62
- ref={input}
63
- type="file"
64
- accept=".tgz,.gz,application/gzip"
65
- hidden
66
- onChange={event => {
67
- take(event.target.files?.[0]);
68
- event.target.value = '';
69
- }}
70
- />
71
- </section>
72
- <div className="tax-or">{words.orSource}</div>
73
- <form
74
- className="tax-source"
75
- onSubmit={event => {
76
- event.preventDefault();
77
- void run(() => actions.install(source));
78
- }}
79
- >
80
- <input value={source} placeholder={words.sourcePlaceholder} spellCheck={false} onChange={event => setSource(event.target.value)} />
81
- <button type="submit" className="tax-button" disabled={busy || !source.trim()}>
82
- {busy ? words.working : words.install}
83
- </button>
84
- </form>
85
- <div className="tax-note">{words.trust}</div>
86
- </div>
87
- </Dialog>
88
- );
89
- }
package/web-src/index.tsx DELETED
@@ -1,50 +0,0 @@
1
- import type { WebExtensionAPI } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
2
- import { ExtensionActions, PackagesStore } from './actions';
3
- import type { ExtensionsContext, ExtensionsTab } from './context';
4
- import { ExtensionWords } from './i18n';
5
- import { MarketStore } from './market-store';
6
- import { ExtensionsPage } from './page';
7
- // biome-ignore lint/correctness/noUnusedImports: the JSX below compiles to React.createElement (jsxFactory)
8
- import { bind, React } from './react';
9
- import { Signal } from './signal';
10
- import { injectStyle } from './style';
11
-
12
- /**
13
- * The page of extensions, in the navigation: where the user learns that Ta makes extensions from what
14
- * they say, hands them on or takes them in, and finds more in the market. Files and npm go through the
15
- * host of the package (host.ts).
16
- */
17
- export default function activate(pi: WebExtensionAPI): () => void {
18
- bind(pi.React);
19
- const removeStyle = injectStyle();
20
- const store = new PackagesStore(pi);
21
- const market = new MarketStore(pi);
22
- const context: ExtensionsContext = {
23
- pi,
24
- store,
25
- market,
26
- actions: new ExtensionActions(pi, store, market),
27
- tab: new Signal<ExtensionsTab>('mine'),
28
- selected: new Signal<string | undefined>(undefined),
29
- importing: new Signal(false),
30
- };
31
- const icons = pi.ui.icons;
32
- pi.registerView('extensions', {
33
- title: () => ExtensionWords.of(pi.ui.language).title,
34
- icon: icons.Puzzle ?? icons.Square,
35
- render: () => <ExtensionsPage context={context} />,
36
- menu: () => {
37
- const words = ExtensionWords.of(pi.ui.language);
38
- return [
39
- [
40
- { key: 'market', label: words.tabMarket, icon: icons.Store ?? icons.PackageOpen, run: () => context.tab.set('market') },
41
- { key: 'import', label: words.import, icon: icons.Upload, run: () => context.importing.set(true) },
42
- ],
43
- ];
44
- },
45
- order: 90,
46
- });
47
- // A reply of Ta may have made, changed or removed one.
48
- pi.on('agent_end', () => void store.load());
49
- return removeStyle;
50
- }