docs(claude): restructure documentation management and add feedback system
- Restructure §8 from "文档沉淀规则" to "文档管理规则" with 4 subsections - Add docs/ structure with features/ and knowledge-base/ directories - Add feature documentation template with 7 sections (概述/设计初衷/技术设计/预期作用/实际效果/演化路线/头脑风暴) - Add feature update trigger matrix (新增/修改/完成/问题/反馈) - Add documentation quality checklist - Add §16
This commit is contained in:
@@ -327,3 +327,26 @@ export class VikingError extends Error {
|
||||
this.name = 'VikingError';
|
||||
}
|
||||
}
|
||||
|
||||
// === Singleton ===
|
||||
|
||||
let _instance: VikingHttpClient | null = null;
|
||||
|
||||
/**
|
||||
* Get the singleton VikingHttpClient instance.
|
||||
* Uses default configuration (localhost:1933).
|
||||
*/
|
||||
export function getVikingClient(baseUrl?: string): VikingHttpClient {
|
||||
if (!_instance) {
|
||||
_instance = new VikingHttpClient(baseUrl);
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the singleton instance.
|
||||
* Useful for testing or reconfiguration.
|
||||
*/
|
||||
export function resetVikingClient(): void {
|
||||
_instance = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user