Skip to content

Commit 454f9f2

Browse files
suryaiyer95claude
andcommitted
docs: add JSDoc to parseAltimateKey describing the two accepted formats
Addresses Coderabbit pre-merge docstring-coverage check by documenting the 2-part (default URL) vs 3+ part (custom URL) behavior of parseAltimateKey. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 12b1a30 commit 454f9f2

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

packages/opencode/src/altimate/api/client.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ export namespace AltimateApi {
8484
}
8585
}
8686

87+
/**
88+
* Parse a user-entered Altimate credential string into its component fields.
89+
*
90+
* Accepts two `::`-delimited forms:
91+
* - 2 parts: `instance-name::api-key` — URL defaults to {@link DEFAULT_ALTIMATE_URL}.
92+
* - 3+ parts: `api-url::instance-name::api-key` — first segment is the API base URL
93+
* and must be http(s)://. Extra `::` segments are joined back into the API key.
94+
*
95+
* Returns `null` if the input is malformed (fewer than 2 parts, empty fields,
96+
* or a non-http(s) URL in the 3-part form).
97+
*/
8798
export function parseAltimateKey(value: string): {
8899
altimateUrl: string
89100
altimateInstanceName: string

0 commit comments

Comments
 (0)