@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 21 lines 577 Bytes
Raw
1 /**
2 * Shared internal helpers for the AppIntegrations service.
3 * NOT exported from the service barrel.
4 */
5
6 /**
7 * The AppIntegrations wire TagMap is `{ [key: string]: string | undefined }`.
8 * Collapse it to a plain `Record<string, string>` so it can be diffed with
9 * `diffTags`.
10 */
11 export const definedTags = (tags?: {
12 [key: string]: string | undefined;
13 }): Record<string, string> => {
14 const out: Record<string, string> = {};
15 for (const [key, value] of Object.entries(tags ?? {})) {
16 if (value !== undefined) {
17 out[key] = value;
18 }
19 }
20 return out;
21 };