Skip to content

Commit ef4bd6d

Browse files
authored
chore(docs): Retain fn casing in 'Functions' section on /weave/reference/typescript-sdk (#2665)
## Description * At the moment, function names are rendered all lowercase on https://docs.wandb.ai/weave/reference/typescript-sdk <img width="825" height="540" alt="Screenshot 2026-05-26 at 6 08 52 PM" src="https://github.com/user-attachments/assets/0b94f942-6d8c-46c9-bbd1-bed8c8771fcb" /> * This change preserves casing when generating links to these fns. Updated the generated file manually as well: <img width="1726" height="1024" alt="Screenshot 2026-05-26 at 6 11 09 PM" src="https://github.com/user-attachments/assets/c5c24d78-eb37-41b3-bad9-97115f3de5a3" />
1 parent 8b37277 commit ef4bd6d

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

scripts/reference-generation/weave/generate_typescript_sdk_docs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,18 +361,18 @@ def extract_members_to_separate_files(docs_path):
361361
func_filename = func_name.lower()
362362
func_file = functions_dir / f"{func_filename}.mdx"
363363
func_file.write_text(func_file_content)
364-
functions_found.append(func_filename)
364+
functions_found.append((func_name, func_filename))
365365
print(f" ✓ Extracted {func_filename}.mdx")
366-
366+
367367
if functions_found:
368368
# Remove the detailed function documentation from index
369369
content = function_pattern.sub('', content)
370-
370+
371371
# Update the Functions section with links (functions_found already has lowercase names)
372372
# The landing page is at typescript-sdk.mdx, so links need ./typescript-sdk/ prefix
373373
functions_section = "\n### Functions\n\n"
374-
for func in functions_found:
375-
functions_section += f"- [{func}](./typescript-sdk/functions/{func})\n"
374+
for func_label, func_filename in functions_found:
375+
functions_section += f"- [{func_label}](./typescript-sdk/functions/{func_filename})\n"
376376

377377
# Replace existing Functions section with links
378378
content = re.sub(

weave/reference/typescript-sdk.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ weave
3636

3737
### Functions
3838

39-
- [createopenaiagentstracingprocessor](./typescript-sdk/functions/createopenaiagentstracingprocessor)
39+
- [createOpenAIAgentsTracingProcessor](./typescript-sdk/functions/createopenaiagentstracingprocessor)
4040
- [init](./typescript-sdk/functions/init)
41-
- [instrumentopenaiagents](./typescript-sdk/functions/instrumentopenaiagents)
41+
- [instrumentOpenAIAgents](./typescript-sdk/functions/instrumentopenaiagents)
4242
- [login](./typescript-sdk/functions/login)
4343
- [op](./typescript-sdk/functions/op)
44-
- [patchrealtimesession](./typescript-sdk/functions/patchrealtimesession)
45-
- [requirecurrentcallstackentry](./typescript-sdk/functions/requirecurrentcallstackentry)
46-
- [requirecurrentchildsummary](./typescript-sdk/functions/requirecurrentchildsummary)
47-
- [weaveaudio](./typescript-sdk/functions/weaveaudio)
48-
- [weaveimage](./typescript-sdk/functions/weaveimage)
49-
- [withattributes](./typescript-sdk/functions/withattributes)
50-
- [wrapgooglegenai](./typescript-sdk/functions/wrapgooglegenai)
51-
- [wrapopenai](./typescript-sdk/functions/wrapopenai)
44+
- [patchRealtimeSession](./typescript-sdk/functions/patchrealtimesession)
45+
- [requireCurrentCallStackEntry](./typescript-sdk/functions/requirecurrentcallstackentry)
46+
- [requireCurrentChildSummary](./typescript-sdk/functions/requirecurrentchildsummary)
47+
- [weaveAudio](./typescript-sdk/functions/weaveaudio)
48+
- [weaveImage](./typescript-sdk/functions/weaveimage)
49+
- [withAttributes](./typescript-sdk/functions/withattributes)
50+
- [wrapGoogleGenAI](./typescript-sdk/functions/wrapgooglegenai)
51+
- [wrapOpenAI](./typescript-sdk/functions/wrapopenai)
5252

5353
## Type Aliases
5454

0 commit comments

Comments
 (0)