NapCatQQ/packages/napcat-core/packet/clientSession.ts
手瓜一十雪 4360775eff
refactor: 整体重构 (#1381)
* feat: pnpm new

* Refactor build and release workflows, update dependencies

Switch build scripts and workflows from npm to pnpm, update build and artifact paths, and simplify release workflow by removing version detection and changelog steps. Add new dependencies (silk-wasm, express, ws, node-pty-prebuilt-multiarch), update exports in package.json files, and add vite config for napcat-framework. Also, rename manifest.json for framework package and fix static asset copying in shell build config.
2025-11-13 15:39:42 +08:00

32 lines
735 B
TypeScript

import { PacketContext } from '@/napcat-core/packet/context/packetContext';
import { NapCatCore } from '@/napcat-core/index';
export class PacketClientSession {
private readonly context: PacketContext;
constructor (core: NapCatCore) {
this.context = new PacketContext(core);
}
init (pid: number, recv: string, send: string): Promise<void> {
return this.context.client.init(pid, recv, send);
}
get clientLogStack () {
return this.context.client.clientLogStack;
}
get available () {
return this.context.client.available;
}
get operation () {
return this.context.operation;
}
// TODO: global message element adapter (?
get msgConverter () {
return this.context.msgConverter;
}
}