@aiwayds/dsh-tui-pi 0.1.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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +324 -0
  3. package/bin/dsh-tui-pi +5 -0
  4. package/cordis.patch.yml +9 -0
  5. package/lib/append-system.d.ts +66 -0
  6. package/lib/append-system.js +161 -0
  7. package/lib/append-system.js.map +1 -0
  8. package/lib/commands.d.ts +53 -0
  9. package/lib/commands.js +167 -0
  10. package/lib/commands.js.map +1 -0
  11. package/lib/dsh-events.d.ts +106 -0
  12. package/lib/dsh-events.js +30 -0
  13. package/lib/dsh-events.js.map +1 -0
  14. package/lib/editor.d.ts +28 -0
  15. package/lib/editor.js +70 -0
  16. package/lib/editor.js.map +1 -0
  17. package/lib/footer.d.ts +36 -0
  18. package/lib/footer.js +112 -0
  19. package/lib/footer.js.map +1 -0
  20. package/lib/frame.d.ts +35 -0
  21. package/lib/frame.js +75 -0
  22. package/lib/frame.js.map +1 -0
  23. package/lib/git.d.ts +17 -0
  24. package/lib/git.js +51 -0
  25. package/lib/git.js.map +1 -0
  26. package/lib/index.d.ts +15 -0
  27. package/lib/index.js +781 -0
  28. package/lib/index.js.map +1 -0
  29. package/lib/instructions.d.ts +29 -0
  30. package/lib/instructions.js +67 -0
  31. package/lib/instructions.js.map +1 -0
  32. package/lib/live-widgets.d.ts +85 -0
  33. package/lib/live-widgets.js +218 -0
  34. package/lib/live-widgets.js.map +1 -0
  35. package/lib/messages.d.ts +277 -0
  36. package/lib/messages.js +734 -0
  37. package/lib/messages.js.map +1 -0
  38. package/lib/permission.d.ts +27 -0
  39. package/lib/permission.js +48 -0
  40. package/lib/permission.js.map +1 -0
  41. package/lib/provider-catalog.d.ts +114 -0
  42. package/lib/provider-catalog.js +124 -0
  43. package/lib/provider-catalog.js.map +1 -0
  44. package/lib/quotes.d.ts +28 -0
  45. package/lib/quotes.js +144 -0
  46. package/lib/quotes.js.map +1 -0
  47. package/lib/reload.d.ts +23 -0
  48. package/lib/reload.js +171 -0
  49. package/lib/reload.js.map +1 -0
  50. package/lib/selectors.d.ts +48 -0
  51. package/lib/selectors.js +261 -0
  52. package/lib/selectors.js.map +1 -0
  53. package/lib/session.d.ts +157 -0
  54. package/lib/session.js +555 -0
  55. package/lib/session.js.map +1 -0
  56. package/lib/sessions.d.ts +73 -0
  57. package/lib/sessions.js +253 -0
  58. package/lib/sessions.js.map +1 -0
  59. package/lib/settings.d.ts +180 -0
  60. package/lib/settings.js +1328 -0
  61. package/lib/settings.js.map +1 -0
  62. package/lib/text.d.ts +22 -0
  63. package/lib/text.js +45 -0
  64. package/lib/text.js.map +1 -0
  65. package/lib/theme/index.d.ts +79 -0
  66. package/lib/theme/index.js +121 -0
  67. package/lib/theme/index.js.map +1 -0
  68. package/lib/theme/palette.d.ts +56 -0
  69. package/lib/theme/palette.js +154 -0
  70. package/lib/theme/palette.js.map +1 -0
  71. package/lib/theme-settings.d.ts +68 -0
  72. package/lib/theme-settings.js +223 -0
  73. package/lib/theme-settings.js.map +1 -0
  74. package/lib/tui.d.ts +70 -0
  75. package/lib/tui.js +206 -0
  76. package/lib/tui.js.map +1 -0
  77. package/lib/welcome.d.ts +91 -0
  78. package/lib/welcome.js +281 -0
  79. package/lib/welcome.js.map +1 -0
  80. package/package.json +50 -0
  81. package/patches/@earendil-works__pi-tui.patch +72 -0
  82. package/pnpm-workspace.yaml +2 -0
  83. package/templates/APPEND_SYSTEM.md +34 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAI1E,OAAO,EAAE,MAAM,EAAE,KAAK,EAAiB,MAAM,kBAAkB,C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;YACxC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,8BAA8B,GAAG,KAAK,CAAC,CAAA;QAChG,CAAC;IACH,CAAC;IAED,6EAA6E;IAErE,UAAU,CAAC,IAAY;QAC7B,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QACvC,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;CACF"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Permission-preset presentation and picker option assembly — the terminal
3
+ * mirror of the web client's display conventions
4
+ * (dsh-client-ui-permission-presets presentation), kept pure for unit tests.
5
+ */
6
+ import type { SelectItem } from '@earendil-works/pi-tui';
7
+ import { type PermissionPresetService } from '@deepseek-ai/dsh-permission-presets';
8
+ /**
9
+ * Convert conventional kebab-case preset names into user-facing title case.
10
+ * Mirrors the web client's `displayPresetName`: a non-kebab label (a host
11
+ * configured name) passes through unchanged.
12
+ */
13
+ export declare function displayPresetName(name: string): string;
14
+ /**
15
+ * Render a permission preset under its product label. Mirrors the web
16
+ * client's `displayPermissionPreset`: `danger-full-access` gets the product
17
+ * label "Full access", everything else its conventional display name.
18
+ */
19
+ export declare function displayPermissionPreset(value: string, name: string): string;
20
+ /**
21
+ * Assemble the picker rows for the permission preset table: every advertised
22
+ * preset in declaration order, plus the derived `custom` option exactly while
23
+ * it is current (custom is display state — a matching knob bundle — not a
24
+ * switch target). The description falls back to the resolved sandbox/approval
25
+ * bundle when the preset has no configured description.
26
+ */
27
+ export declare function permissionItems(presets: PermissionPresetService, current: string | undefined): SelectItem[];
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Permission-preset presentation and picker option assembly — the terminal
3
+ * mirror of the web client's display conventions
4
+ * (dsh-client-ui-permission-presets presentation), kept pure for unit tests.
5
+ */
6
+ import { CUSTOM_PRESET } from '@deepseek-ai/dsh-permission-presets';
7
+ /**
8
+ * Convert conventional kebab-case preset names into user-facing title case.
9
+ * Mirrors the web client's `displayPresetName`: a non-kebab label (a host
10
+ * configured name) passes through unchanged.
11
+ */
12
+ export function displayPresetName(name) {
13
+ if (!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(name))
14
+ return name;
15
+ return name.split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
16
+ }
17
+ /**
18
+ * Render a permission preset under its product label. Mirrors the web
19
+ * client's `displayPermissionPreset`: `danger-full-access` gets the product
20
+ * label "Full access", everything else its conventional display name.
21
+ */
22
+ export function displayPermissionPreset(value, name) {
23
+ return value === 'danger-full-access' ? 'Full access' : displayPresetName(name);
24
+ }
25
+ /**
26
+ * Assemble the picker rows for the permission preset table: every advertised
27
+ * preset in declaration order, plus the derived `custom` option exactly while
28
+ * it is current (custom is display state — a matching knob bundle — not a
29
+ * switch target). The description falls back to the resolved sandbox/approval
30
+ * bundle when the preset has no configured description.
31
+ */
32
+ export function permissionItems(presets, current) {
33
+ const names = current === CUSTOM_PRESET ? [...presets.names, CUSTOM_PRESET] : [...presets.names];
34
+ return names.map(name => {
35
+ const option = presets.optionOf(name);
36
+ const label = displayPermissionPreset(option.value, option.name);
37
+ if (name === CUSTOM_PRESET) {
38
+ return { value: option.value, label, description: option.description };
39
+ }
40
+ const spec = presets.resolve(name);
41
+ return {
42
+ value: option.value,
43
+ label,
44
+ description: option.description ?? `sandbox: ${spec.sandbox} · approval: ${spec.approval}`,
45
+ };
46
+ });
47
+ }
48
+ //# sourceMappingURL=permission.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permission.js","sourceRoot":"","sources":["../src/permission.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,aAAa,EAAgC,MAAM,qCAAqC,CAAA;AAEjG;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,IAAI,CAAC,0BAA0B,CAAC,IAAI,CA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AAW,IAAI,YAAY,IAAI,CAAC,OAAO,gBAAgB,IAAI,CAAC,QAAQ,EAAE;SAC3F,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Built-in provider directory for the Models category's add-provider flow —
3
+ * pure data plus pure functions, no TTY and no services touched.
4
+ *
5
+ * The shape mirrors the web Models page and pi-agent's /login flow: the user
6
+ * picks a provider from a curated built-in directory (never free-form JSON),
7
+ * enters exactly one secret, and the flow finishes. The directory entry
8
+ * carries everything the write needs so the TUI never asks for a field the
9
+ * user should not have to see:
10
+ *
11
+ * - friendly display name (row label; the pi-ai route key stays internal),
12
+ * - one-line auth hint (the oauth-selector `[API key]` idea),
13
+ * - whether pi-ai ships the route (a catalog route needs only the credential;
14
+ * a hand-declared route must also carry `api`/`baseURL`/`models`),
15
+ * - the credential reference, derived by convention from the route key
16
+ * (`deriveKeyRef` — the user never types an env-var name).
17
+ *
18
+ * Every entry is a catalog route today: `opencode-go` is one of them (pi-ai
19
+ * ships its endpoint and model catalog — the user's own settings.yaml stores
20
+ * nothing but `apiKeyEnv: OPENCODE_GO_API_KEY` for it), and the hand-declared
21
+ * write shape is kept exercised by unit tests only. A future gateway entry
22
+ * that pi-ai does not ship just sets `catalogRoute: false` plus its
23
+ * `api`/`baseURL`/`models` — no TUI change needed.
24
+ */
25
+ /** One model line of a hand-declared route's default catalog. */
26
+ export interface CatalogModel {
27
+ /** Wire model id, as the provider would echo it back. */
28
+ id: string;
29
+ /** Optional human name; omitted lines show the id everywhere. */
30
+ name?: string;
31
+ }
32
+ /** One entry of the built-in provider directory. */
33
+ export interface ProviderCatalogEntry {
34
+ /** llm-pi-ai providers dict key — also the stem of the derived key ref. */
35
+ id: string;
36
+ /** Friendly display name for rows and pickers. */
37
+ name: string;
38
+ /** One-line hint for the picker row (auth style / route kind). */
39
+ hint: string;
40
+ /** Whether pi-ai ships this route: a catalog route stores only the key. */
41
+ catalogRoute: boolean;
42
+ /** Wire protocol for a hand-declared route (`catalogRoute: false` only). */
43
+ api?: string;
44
+ /** Endpoint for a hand-declared route (`catalogRoute: false` only). */
45
+ baseURL?: string;
46
+ /** Default models for a hand-declared route (`catalogRoute: false` only). */
47
+ models?: readonly CatalogModel[];
48
+ }
49
+ /**
50
+ * The built-in provider directory the Add-provider picker offers. Sorted by
51
+ * display name; every route key names a pi-ai catalog provider that takes an
52
+ * api key, so each entry stores nothing but the credential.
53
+ */
54
+ export declare const PROVIDER_CATALOG: readonly ProviderCatalogEntry[];
55
+ /** One directory entry by route key, or `undefined` for an unknown route. */
56
+ export declare function catalogEntry(id: string): ProviderCatalogEntry | undefined;
57
+ /**
58
+ * Derive the conventional credential reference for a provider route — the
59
+ * same convention the web Models page uses: the route key uppercased with
60
+ * every non-alphanumeric run collapsed to `_`, suffixed `_API_KEY`. The
61
+ * user never supplies a ref; profile and credential share this one name.
62
+ * @param provider - provider route id (e.g. `anthropic`, `opencode-go`).
63
+ * @returns the derived reference (e.g. `ANTHROPIC_API_KEY`, `OPENCODE_GO_API_KEY`).
64
+ */
65
+ export declare function deriveKeyRef(provider: string): string;
66
+ /**
67
+ * The llm-pi-ai providers.<id> value an entry writes as: a catalog route
68
+ * stores only the derived credential reference (endpoint, protocol, and
69
+ * models come from the installed pi-ai catalog); a hand-declared route
70
+ * carries its `api`, `baseURL`, and default models alongside the reference.
71
+ */
72
+ export declare function providerProfileFor(entry: ProviderCatalogEntry): {
73
+ apiKeyEnv: string;
74
+ api?: string;
75
+ baseURL?: string;
76
+ models?: Array<{
77
+ id: string;
78
+ name?: string;
79
+ }>;
80
+ };
81
+ /** Directory entries the user has not configured yet (in directory order). */
82
+ export declare function unconfiguredCatalogEntries(configured: ReadonlySet<string>): ProviderCatalogEntry[];
83
+ /** One llm-pi-ai provider profile as stored in settings — the subset we read. */
84
+ export interface ProviderProfile {
85
+ displayName?: string;
86
+ apiKeyEnv?: string;
87
+ models?: ReadonlyArray<{
88
+ id?: string;
89
+ }>;
90
+ }
91
+ /** Display facts for one provider row of the Models category. */
92
+ export interface ProviderRowView {
93
+ /** Route key (also the row id stem). */
94
+ id: string;
95
+ /** Row label: profile displayName, else catalog name, else the route key. */
96
+ label: string;
97
+ /** Row value column: first listed model, a count, or `catalog`. */
98
+ summary: string;
99
+ /** Row description: one-line API-key state. */
100
+ status: string;
101
+ }
102
+ /**
103
+ * Build the display facts for one provider row. Pure — the caller supplies
104
+ * the environment lookup (`process.env`) and the (possibly undefined) profile
105
+ * read out of the llm-pi-ai descriptor, so nothing here touches services.
106
+ *
107
+ * The summary rule: a profile with models shows the first model id (or a
108
+ * count when the id is missing); a catalog route with no models serves the
109
+ * installed catalog, so `catalog` is more honest than `0 models`; anything
110
+ * else has no models at all. The status rule: no `apiKeyEnv` means the route
111
+ * has no key address at all; otherwise the reference's presence in the
112
+ * supplied environment decides `API key set` vs `API key missing`.
113
+ */
114
+ export declare function providerRowView(id: string, entry: ProviderCatalogEntry | undefined, profile: unknown, env: Readonly<Record<string, string | undefined>>): ProviderRowView;
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Built-in provider directory for the Models category's add-provider flow —
3
+ * pure data plus pure functions, no TTY and no services touched.
4
+ *
5
+ * The shape mirrors the web Models page and pi-agent's /login flow: the user
6
+ * picks a provider from a curated built-in directory (never free-form JSON),
7
+ * enters exactly one secret, and the flow finishes. The directory entry
8
+ * carries everything the write needs so the TUI never asks for a field the
9
+ * user should not have to see:
10
+ *
11
+ * - friendly display name (row label; the pi-ai route key stays internal),
12
+ * - one-line auth hint (the oauth-selector `[API key]` idea),
13
+ * - whether pi-ai ships the route (a catalog route needs only the credential;
14
+ * a hand-declared route must also carry `api`/`baseURL`/`models`),
15
+ * - the credential reference, derived by convention from the route key
16
+ * (`deriveKeyRef` — the user never types an env-var name).
17
+ *
18
+ * Every entry is a catalog route today: `opencode-go` is one of them (pi-ai
19
+ * ships its endpoint and model catalog — the user's own settings.yaml stores
20
+ * nothing but `apiKeyEnv: OPENCODE_GO_API_KEY` for it), and the hand-declared
21
+ * write shape is kept exercised by unit tests only. A future gateway entry
22
+ * that pi-ai does not ship just sets `catalogRoute: false` plus its
23
+ * `api`/`baseURL`/`models` — no TUI change needed.
24
+ */
25
+ /**
26
+ * The built-in provider directory the Add-provider picker offers. Sorted by
27
+ * display name; every route key names a pi-ai catalog provider that takes an
28
+ * api key, so each entry stores nothing but the credential.
29
+ */
30
+ export const PROVIDER_CATALOG = [
31
+ { id: 'anthropic', name: 'Anthropic', hint: 'API key', catalogRoute: true },
32
+ { id: 'deepseek', name: 'DeepSeek', hint: 'API key', catalogRoute: true },
33
+ { id: 'google', name: 'Google Gemini', hint: 'API key', catalogRoute: true },
34
+ { id: 'groq', name: 'Groq', hint: 'API key', catalogRoute: true },
35
+ { id: 'mistral', name: 'Mistral', hint: 'API key', catalogRoute: true },
36
+ { id: 'openai', name: 'OpenAI', hint: 'API key', catalogRoute: true },
37
+ { id: 'opencode-go', name: 'OpenCode Go', hint: 'API key · OpenAI-compatible gateway', catalogRoute: true },
38
+ { id: 'openrouter', name: 'OpenRouter', hint: 'API key', catalogRoute: true },
39
+ { id: 'together', name: 'Together AI', hint: 'API key', catalogRoute: true },
40
+ { id: 'xai', name: 'xAI', hint: 'API key', catalogRoute: true },
41
+ ];
42
+ /** One directory entry by route key, or `undefined` for an unknown route. */
43
+ export function catalogEntry(id) {
44
+ return PROVIDER_CATALOG.find(entry => entry.id === id);
45
+ }
46
+ /**
47
+ * Derive the conventional credential reference for a provider route — the
48
+ * same convention the web Models page uses: the route key uppercased with
49
+ * every non-alphanumeric run collapsed to `_`, suffixed `_API_KEY`. The
50
+ * user never supplies a ref; profile and credential share this one name.
51
+ * @param provider - provider route id (e.g. `anthropic`, `opencode-go`).
52
+ * @returns the derived reference (e.g. `ANTHROPIC_API_KEY`, `OPENCODE_GO_API_KEY`).
53
+ */
54
+ export function deriveKeyRef(provider) {
55
+ return `${provider.toUpperCase().replace(/[^A-Z0-9]+/g, '_')}_API_KEY`;
56
+ }
57
+ /**
58
+ * The llm-pi-ai providers.<id> value an entry writes as: a catalog route
59
+ * stores only the derived credential reference (endpoint, protocol, and
60
+ * models come from the installed pi-ai catalog); a hand-declared route
61
+ * carries its `api`, `baseURL`, and default models alongside the reference.
62
+ */
63
+ export function providerProfileFor(entry) {
64
+ const ref = deriveKeyRef(entry.id);
65
+ if (entry.catalogRoute)
66
+ return { apiKeyEnv: ref };
67
+ const models = (entry.models ?? []).map(model => (model.name === undefined ? { id: model.id } : { id: model.id, name: model.name }));
68
+ return {
69
+ apiKeyEnv: ref,
70
+ ...(entry.api !== undefined ? { api: entry.api } : {}),
71
+ ...(entry.baseURL !== undefined ? { baseURL: entry.baseURL } : {}),
72
+ ...(models.length > 0 ? { models } : {}),
73
+ };
74
+ }
75
+ /** Directory entries the user has not configured yet (in directory order). */
76
+ export function unconfiguredCatalogEntries(configured) {
77
+ return PROVIDER_CATALOG.filter(entry => !configured.has(entry.id));
78
+ }
79
+ /**
80
+ * Build the display facts for one provider row. Pure — the caller supplies
81
+ * the environment lookup (`process.env`) and the (possibly undefined) profile
82
+ * read out of the llm-pi-ai descriptor, so nothing here touches services.
83
+ *
84
+ * The summary rule: a profile with models shows the first model id (or a
85
+ * count when the id is missing); a catalog route with no models serves the
86
+ * installed catalog, so `catalog` is more honest than `0 models`; anything
87
+ * else has no models at all. The status rule: no `apiKeyEnv` means the route
88
+ * has no key address at all; otherwise the reference's presence in the
89
+ * supplied environment decides `API key set` vs `API key missing`.
90
+ */
91
+ export function providerRowView(id, entry, profile, env) {
92
+ const p = (typeof profile === 'object' && profile !== null ? profile : undefined);
93
+ const displayName = p?.displayName;
94
+ const label = displayName !== undefined && displayName !== '' ? displayName : entry?.name ?? id;
95
+ const models = p?.models;
96
+ let summary;
97
+ if (models !== undefined && models.length > 0) {
98
+ const first = models[0]?.id;
99
+ const count = `${models.length} model${models.length === 1 ? '' : 's'}`;
100
+ summary = typeof first === 'string' && first !== '' ? first : count;
101
+ }
102
+ else if (entry?.catalogRoute === true) {
103
+ // No models listed — including the implicit `models: []` that schema
104
+ // defaults put into every resolved profile: a catalog route serves the
105
+ // installed pi-ai catalog, so `catalog` beats a misleading `0 models`.
106
+ summary = 'catalog';
107
+ }
108
+ else {
109
+ // Hand-declared route (or unknown route key): nothing to serve without
110
+ // an explicit model list — `0 models` is the honest read here.
111
+ summary = '0 models';
112
+ }
113
+ const ref = p?.apiKeyEnv;
114
+ // Truthy presence: an empty-string env value means the key is not usable
115
+ // (the add flow merges 'stored', never ''). An unset/empty env var is
116
+ // 'missing', an undefined ref is 'not configured'.
117
+ const status = ref === undefined || ref === ''
118
+ ? 'API key not configured'
119
+ : env[ref]
120
+ ? 'API key set'
121
+ : 'API key missing';
122
+ return { id, label, summary, status };
123
+ }
124
+ //# sourceMappingURL=provider-catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-catalog.js","sourceRoot":"","sources":["../src/provider-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA4BH;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAoC;IAC/D,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE;IAC3E,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE;IACzE,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE;IAC5E,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE;IACjE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE;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IAAI,IAAI,EAAE,CAAA;IAE/F,MAAM,MAAM,GAAG,CAAC,EAAE,MAAM,CAAA;IACxB,IAAI,OAAe,CAAA;IACnB,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;QAC3B,MAAM,KAAK,GAAG,GAAG,MAAM,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAA;QACvE,OAAO,GAAG,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;IACrE,CAAC;SAAM,IAAI,KAAK,EAAE,YAAY,KAAK,IAAI,EAAE,CAAC;QACxC,qEAAqE;QACrE,uEAAuE;QACvE,uEAAuE;QACvE,OAAO,GAAG,SAAS,CAAA;IACrB,CAAC;SAAM,CAAC;QACN,uEAAuE;QACvE,+DAA+D;QAC/D,OAAO,GAAG,UAAU,CAAA;IACtB,CAAC;IAED,MAAM,GAAG,GAAG,CAAC,EAAE,SAAS,CAAA;IACxB,yEAAyE;IACzE,sEAAsE;IACtE,mDAAmD;IACnD,MAAM,MAAM,GAAG,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,EAAE;QAC5C,CAAC,CAAC,wBAAwB;QAC1B,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;YACR,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,iBAAiB,CAAA;IAEvB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,CAAA;AACvC,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The daily quote — one cheerful Chinese one-liner under the welcome banner
3
+ * (see messages.ts renderWelcome). A pool of 100 hand-written lines, one
4
+ * random pick per TUI session: the pick is made once at renderer
5
+ * construction, so relayout and theme switches re-render the same line and
6
+ * only a fresh session (or /reload) rolls a new one.
7
+ *
8
+ * Every quote is plain CJK text — no emoji, no ANSI — at most 20 full-width
9
+ * characters (40 terminal columns), so the formatted line ("「" + quote +
10
+ * "」", +4 columns) always fits under the 94-column banner and can only need
11
+ * clipping on genuinely narrow terminals (renderWelcome clips with
12
+ * clipToWidth before styling — the repo rule, ANSI never goes through the
13
+ * clipper). Chinese punctuation is full-width (,、:! are 2 columns like the
14
+ * characters — visibleWidth accounts for it).
15
+ */
16
+ /** The quote pool — 100 unique lines, one is shown per session. */
17
+ export declare const DAILY_QUOTES: readonly string[];
18
+ /**
19
+ * Roll the session's quote. `rand` is injectable for tests (defaults to
20
+ * Math.random); a uniform pick from DAILY_QUOTES.
21
+ */
22
+ export declare function pickDailyQuote(rand?: () => number): string;
23
+ /**
24
+ * Format one quote for display: CJK corner brackets, no trailing spaces —
25
+ * `「今天也要开开心心呀」`. The brackets are full-width (2 columns each),
26
+ * +4 columns over the quote's own width.
27
+ */
28
+ export declare function formatDailyQuote(quote: string): string;
package/lib/quotes.js ADDED
@@ -0,0 +1,144 @@
1
+ /**
2
+ * The daily quote — one cheerful Chinese one-liner under the welcome banner
3
+ * (see messages.ts renderWelcome). A pool of 100 hand-written lines, one
4
+ * random pick per TUI session: the pick is made once at renderer
5
+ * construction, so relayout and theme switches re-render the same line and
6
+ * only a fresh session (or /reload) rolls a new one.
7
+ *
8
+ * Every quote is plain CJK text — no emoji, no ANSI — at most 20 full-width
9
+ * characters (40 terminal columns), so the formatted line ("「" + quote +
10
+ * "」", +4 columns) always fits under the 94-column banner and can only need
11
+ * clipping on genuinely narrow terminals (renderWelcome clips with
12
+ * clipToWidth before styling — the repo rule, ANSI never goes through the
13
+ * clipper). Chinese punctuation is full-width (,、:! are 2 columns like the
14
+ * characters — visibleWidth accounts for it).
15
+ */
16
+ /** The quote pool — 100 unique lines, one is shown per session. */
17
+ export const DAILY_QUOTES = [
18
+ // 开工元气
19
+ '今天也要开开心心呀',
20
+ '好事正在路上,慢慢来',
21
+ '你比昨天又厉害了一点点',
22
+ '元气满满,出发!',
23
+ '微笑是今天最好的开场白',
24
+ '深呼吸,一切都会好的',
25
+ '今天的风也站在你这边',
26
+ '今天的任务是:开心',
27
+ '简单点,开心点',
28
+ '把今天过成喜欢的样子',
29
+ // 程序员幽默
30
+ '摸鱼也是生产力的一部分',
31
+ '代码能跑,就先别动它',
32
+ 'bug 是明天的,开心是今天的',
33
+ '心情好,代码都少几个 bug',
34
+ '万事开头难,然后就很爽',
35
+ '先完成,再完美',
36
+ '高手的秘诀:多练,多睡,多笑',
37
+ '把烦恼丢进回收站,记得清空',
38
+ '打不倒你的,都在给你攒经验值',
39
+ '偶尔宕机,是为了更好地重启',
40
+ // 小确幸
41
+ '喝口热水,烦恼减半',
42
+ '好好吃饭,是最朴素的浪漫',
43
+ '一杯茶,一段好时光',
44
+ '今天的你,值得一块小蛋糕',
45
+ '难过的话,就先吃点甜的',
46
+ '无论如何,先吃顿好的',
47
+ '早餐吃好,一天都好',
48
+ '泡面的三分钟,也值得期待',
49
+ '微波炉叮的一声,是世界在说你好',
50
+ '冬天的被窝,夏天的西瓜,都值得',
51
+ // 鼓励打气
52
+ '你已经在变好的路上了',
53
+ '小小进度也是进度',
54
+ '一步一步来,比较快',
55
+ '别慌,月亮也在海上漂着呢',
56
+ '会好的,而且会很好',
57
+ '累了就休息,不是放弃',
58
+ '你比你想象的更能扛',
59
+ '别怕,大不了重新开始',
60
+ '你努力的样子真的很酷',
61
+ '今天的烦恼,明天看都是小事',
62
+ // 自然治愈
63
+ '出太阳了,晒晒心情',
64
+ '云是天空的小绵羊',
65
+ '落日是白天的温柔谢幕',
66
+ '面朝大海,春暖花开',
67
+ '星星不会因为天黑就不亮',
68
+ '春天在口袋里偷偷发芽',
69
+ '晚风会把白天的疲惫吹走',
70
+ '今天的花,今天开',
71
+ '眼里有光,哪里都是舞台',
72
+ '阳光免费,心情也免费',
73
+ // 自我关怀
74
+ '允许自己摆烂五分钟',
75
+ '偶尔发呆,是大脑在充电',
76
+ '睡个好觉,明早又是新的',
77
+ '别和自己较劲,和自己击个掌',
78
+ '乖,摸摸头,没事的',
79
+ '冷水洗脸,清醒又快乐',
80
+ '遇到困难先睡一觉,明天再战',
81
+ '唱歌跑调也要大声唱',
82
+ '笑一笑,十年少,先笑为敬',
83
+ '今天也记得夸夸自己',
84
+ // 你很棒
85
+ '你很重要,真的',
86
+ '你的存在就是一件好事',
87
+ '世界因你多了一点可爱',
88
+ '你是自己的锦鲤',
89
+ '你是限量版,全球仅此一件',
90
+ '今天的你也很棒,辛苦啦',
91
+ '你被这个世界温柔以待着',
92
+ '世界很大,你的开心更大',
93
+ '今天也是被宇宙爱着的一天',
94
+ '好运正在派件,请保持好心情',
95
+ // 生活趣味
96
+ '周五的下午,空气都是甜的',
97
+ '咸鱼翻身,还是咸鱼,但很快乐',
98
+ '猫一天要睡十六个小时,学着点',
99
+ '今天适合听一首喜欢的歌',
100
+ '今天适合提前十分钟下班',
101
+ '计划表上写:今天要快乐',
102
+ '心中有海,哪里都是马尔代夫',
103
+ '偶尔迷路,才能遇到新风景',
104
+ '跑起来,风就来了',
105
+ '好天气是自己给的',
106
+ // 鲸鱼与海(呼应开场的那只)
107
+ '鲸鱼都要浮上来换气,你也歇会儿',
108
+ '鲸鱼今天也在海里开心地游',
109
+ '大海不急,鲸鱼也不急',
110
+ '浪花拍岸,是海在鼓掌',
111
+ '潜得深,是为了跳得高',
112
+ '鲸鱼唱歌的频率,刚好治愈人心',
113
+ '海的那边,还是海,还是很好玩',
114
+ '潮水退了还会再来,好运也是',
115
+ '风浪越大,鱼越贵,你越强',
116
+ '今天的海是蓝色的,心情是彩色的',
117
+ // 收尾祝福
118
+ '保持热爱,奔赴山海',
119
+ '生活明朗,万物可爱',
120
+ '明天的你,会感谢今天没放弃的自己',
121
+ '你种下的努力,正在发芽',
122
+ '今天的运气藏在微笑里',
123
+ '今日宜:喝茶,吹风,想点好事',
124
+ '世界很大,幸福很小,但刚刚好',
125
+ '快乐是可以自己生产的',
126
+ '会有人因为遇见你而开心',
127
+ '今天,也要记得喜欢自己呀',
128
+ ];
129
+ /**
130
+ * Roll the session's quote. `rand` is injectable for tests (defaults to
131
+ * Math.random); a uniform pick from DAILY_QUOTES.
132
+ */
133
+ export function pickDailyQuote(rand = Math.random) {
134
+ return DAILY_QUOTES[Math.min(DAILY_QUOTES.length - 1, Math.floor(rand() * DAILY_QUOTES.length))];
135
+ }
136
+ /**
137
+ * Format one quote for display: CJK corner brackets, no trailing spaces —
138
+ * `「今天也要开开心心呀」`. The brackets are full-width (2 columns each),
139
+ * +4 columns over the quote's own width.
140
+ */
141
+ export function formatDailyQuote(quote) {
142
+ return `「${quote}」`;
143
+ }
144
+ //# sourceMappingURL=quotes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quotes.js","sourceRoot":"","sources":["../src/quotes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAsB;IAC7C,OAAO;IACP,WAAW;IACX,YAAY;IACZ,aAAa;IACb,UAAU;IACV,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,iBAAiB;IACjB,gBAAgB;IAChB,aAAa;IACb,SAAS;IACT,gBAAgB;IAChB,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,MAAM;IACN,WAAW;IACX,cAAc;IACd,WAAW;IACX,cAAc;IACd,aAAa;IACb,YAAY;IACZ,WAAW;IACX,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,OAAO;IACP,YAAY;IACZ,UAAU;IACV,WAAW;IACX,cAAc;IACd,WAAW;IACX,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,OAAO;IACP,WAAW;IACX,UAAU;IACV,YAAY;IACZ,WAAW;IACX,aAAa;IACb,YAAY;IACZ,aAAa;IACb,UAAU;IACV,aAAa;IACb,YAAY;IACZ,OAAO;IACP,WAAW;IACX,aAAa;IACb,aAAa;IACb,eAAe;IACf,WAAW;IACX,YAAY;IACZ,eAAe;IACf,WAAW;IACX,cAAc;IACd,WAAW;IACX,MAAM;IACN,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,cAAc;IACd,aAAa;IACb,aAAa;IACb,aAAa;IACb,cAAc;IACd,eAAe;IACf,OAAO;IACP,cAAc;IACd,gBAAgB;IAChB,gBAAgB;IAChB,aAAa;IACb,aAAa;IACb,aAAa;IACb,eAAe;IACf,cAAc;IACd,UAAU;IACV,UAAU;IACV,gBAAgB;IAChB,iBAAiB;IACjB,cAAc;IACd,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,eAAe;IACf,cAAc;IACd,iBAAiB;IACjB,OAAO;IACP,WAAW;IACX,WAAW;IACX,kBAAkB;IAClB,aAAa;IACb,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,YAAY;IACZ,aAAa;IACb,cAAc;CACf,CAAA;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,OAAqB,IAAI,CAAC,MAAM;IAC7D,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAClG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,OAAO,IAAI,KAAK,GAAG,CAAA;AACrB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Manual hot-reload for the dsh-tui-pi plugin.
3
+ *
4
+ * Mirrors @deepseek-ai/cordis-plugin-hmr's partial reload: evict the plugin
5
+ * entry and its user-code dependency closure from the module caches, re-import
6
+ * the entry fresh, then swap the plugin runtime in the registry so a new fiber
7
+ * re-runs `apply` with the new code. A `/reload` after editing `src/` and
8
+ * running `pnpm build` picks the change up without restarting dsh.
9
+ *
10
+ * The swap disposes the old fiber — the TUI, its timers, and the live agent
11
+ * bridge are torn down (the session log persists and can be rejoined with
12
+ * /resume). Failures before the swap leave the old TUI untouched; failures
13
+ * during the swap roll the caches back and restart the previous code.
14
+ */
15
+ import type { Context } from '@deepseek-ai/cordis';
16
+ /**
17
+ * Reload the dsh-tui-pi plugin from the current source.
18
+ *
19
+ * @param ctx — the plugin context (the fiber being reloaded).
20
+ * @param entryUrl — `import.meta.url` of the plugin entry module.
21
+ * @returns a human-readable outcome; the plugin fiber is swapped on success.
22
+ */
23
+ export declare function reloadPlugin(ctx: Context, entryUrl: string): Promise<string>;