()
| 119 | return {}; |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | static getPromptMap(): Record<string, string> { |
| 124 | const raw = this.get( |
| 125 | CONFIG_KEYS.PROMPT_MAP, |
| 126 | DEFAULT_CONFIG[CONFIG_KEYS.PROMPT_MAP], |
| 127 | ); |
| 128 | try { |
| 129 | const parsed = JSON.parse(raw); |
| 130 | if (!parsed || typeof parsed !== "object") return {}; |
| 131 | const result: Record<string, string> = {}; |
| 132 | for (const [key, value] of Object.entries(parsed)) { |
| 133 | if (typeof key === "string" && typeof value === "string") { |
| 134 | result[key] = value; |
| 135 | } |
| 136 | } |
| 137 | return result; |
| 138 | } catch (error) { |
| 139 | console.error("aitc plugin failed to parse prompt map", error); |
| 140 | return {}; |
| 141 | } |
| 142 | } |
| 143 |
no test coverage detected