Merge remote-tracking branch 'gitea/master'
# Conflicts: # lib/bridge.js # src/bridge.ts
This commit is contained in:
@@ -177,7 +177,7 @@ dsh plugin --profile web add D:\path\to\dsh-telegram-channel
|
||||
| `allowAllUsers` | `true` 仅调试 |
|
||||
| `maxMessageLength` | 默认 4096 |
|
||||
| `pollingTimeoutSec` | 默认 30 |
|
||||
| `rendering` | `rich`(默认,原生 Rich Message)或 `html`(旧 Markdown→HTML 兼容) |
|
||||
| `rendering` | `html`(默认,兼容所有客户端)或 `rich`(原生 Rich Message) |
|
||||
|
||||
若本机用了 HTTP(S)_PROXY 访问 Telegram,插件会自动走代理(无需再设 `NODE_USE_ENV_PROXY`)。
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
import type { Context } from '@deepseek-ai/cordis';
|
||||
import Schema from '@deepseek-ai/schemastery';
|
||||
export declare const name = "dsh-telegram-channel";
|
||||
/** agents: followup; apiProxy: workspace/session catalog + /model; userQuestions: TG answer hook (Cordis requires inject). */
|
||||
/** agents: followup; apiProxy and userQuestions are optional runtime services. */
|
||||
export declare const inject: string[];
|
||||
export interface TelegramChannelConfig {
|
||||
token?: string;
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
import Schema from '@deepseek-ai/schemastery';
|
||||
import { TelegramBridge } from './bridge.js';
|
||||
export const name = 'dsh-telegram-channel';
|
||||
/** agents: followup; apiProxy: workspace/session catalog + /model; userQuestions: TG answer hook (Cordis requires inject). */
|
||||
export const inject = ['agents', 'apiProxy', 'userQuestions'];
|
||||
/** agents: followup; apiProxy and userQuestions are optional runtime services. */
|
||||
export const inject = ['agents'];
|
||||
export const Config = Schema.object({
|
||||
token: Schema.string().default(''),
|
||||
allowedUserIds: Schema.array(Schema.number()).default([]),
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@ import Schema from '@deepseek-ai/schemastery'
|
||||
import { TelegramBridge } from './bridge.js'
|
||||
|
||||
export const name = 'dsh-telegram-channel'
|
||||
/** agents: followup; apiProxy: workspace/session catalog + /model; userQuestions: TG answer hook (Cordis requires inject). */
|
||||
export const inject = ['agents', 'apiProxy', 'userQuestions']
|
||||
/** agents: followup; apiProxy and userQuestions are optional runtime services. */
|
||||
export const inject = ['agents']
|
||||
|
||||
export interface TelegramChannelConfig {
|
||||
token?: string
|
||||
|
||||
+5
-1
@@ -1,6 +1,10 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import test from 'node:test'
|
||||
import { apply } from '../src/index.ts'
|
||||
import { apply, inject } from '../src/index.ts'
|
||||
|
||||
test('optional host services are not hard Cordis dependencies', () => {
|
||||
assert.deepEqual(inject, ['agents'])
|
||||
})
|
||||
|
||||
test('apply without token does not throw and does not start effect', () => {
|
||||
const effects: string[] = []
|
||||
|
||||
Reference in New Issue
Block a user