Skip to content

Commit 8d6c517

Browse files
committed
Merge branch 'main' into DOC-5891
2 parents dca7650 + 4e2e0bf commit 8d6c517

File tree

727 files changed

+35889
-1186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

727 files changed

+35889
-1186
lines changed

assets/css/index.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ section.prose {
8888
@apply bg-slate-900 rounded-lg;
8989
}
9090

91+
.prose pre.mermaid {
92+
background-color: white !important;
93+
border-radius: 0.5rem;
94+
padding: 1rem;
95+
}
96+
9197
.prose pre > code {
9298
@apply bg-none font-monogeist;
9399
}
@@ -1068,7 +1074,7 @@ a[href*="#no-click"], img[src*="#no-click"] {
10681074
background-color: #ddd;
10691075
}
10701076

1071-
/* Redis AI Agent Builder Styles */
1077+
/* AI Agent Builder Styles */
10721078

10731079
.agent-builder-container {
10741080
@apply max-w-4xl mx-auto p-6 bg-white rounded-lg border border-redis-pen-800 shadow-lg;

build/components/example.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
'java-async': '//',
2929
'java-reactive': '//',
3030
'go': '//',
31+
'c': '//',
3132
'c#': '//',
3233
'c#-sync': '//',
3334
'c#-async': '//',

build/components/syntax.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ class ArgumentType(Enum):
2020
BLOCK = 'block'
2121
PURE_TOKEN = 'pure-token'
2222
COMMAND = 'command'
23+
FUNCTION = 'function'
24+
INDEX = 'index'
25+
KEYNUM = 'keynum'
26+
KEYWORD = 'keyword'
27+
RANGE = 'range'
28+
UNKNOWN = 'unknown'
2329

2430

2531
class Argument:
@@ -28,8 +34,8 @@ def __init__(self, data: dict = {}, level: int = 0, max_width: int = 640) -> Non
2834
self._stack = []
2935
self._level: int = level
3036
self._max_width: int = max_width
31-
self._name: str = data['name']
32-
self._type = ArgumentType(data['type'])
37+
self._name: str = data.get('name', data.get('token', 'unnamed'))
38+
self._type = ArgumentType(data.get('type', 'string'))
3339
self._optional: bool = data.get('optional', False)
3440
self._multiple: bool = data.get('multiple', False)
3541
self._multiple_token: bool = data.get('multiple_token', False)
@@ -49,6 +55,11 @@ def syntax(self, **kwargs) -> str:
4955
args += ' '.join([arg.syntax() for arg in self._arguments])
5056
elif self._type == ArgumentType.ONEOF:
5157
args += f' | '.join([arg.syntax() for arg in self._arguments])
58+
elif self._type == ArgumentType.FUNCTION:
59+
# Functions should display their token/name, not expand nested arguments
60+
args += self._display
61+
if show_types:
62+
args += f':{self._type.value}'
5263
elif self._type != ArgumentType.PURE_TOKEN:
5364
args += self._display
5465
if show_types:

build/local_examples.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
'.py': 'python',
2424
'.js': 'node.js',
2525
'.go': 'go',
26+
'.c': 'c',
27+
'.h': 'c',
2628
'.cs': 'c#',
2729
'.java': 'java',
2830
'.php': 'php',
@@ -34,6 +36,7 @@
3436
'python': 'Python',
3537
'node.js': 'Node.js',
3638
'go': 'Go',
39+
'c': 'C',
3740
'c#': 'C#-Sync',
3841
'java': 'Java-Sync', # Default to sync, could be overridden
3942
'php': 'PHP',
@@ -57,12 +60,15 @@ def get_client_name_from_language_and_path(language: str, path: str) -> str:
5760
"""Get client name from language with path-based overrides.
5861
5962
For Java (.java) files, override based on path substrings:
63+
- If 'lettuce-sync' in path -> Lettuce-Sync
6064
- If 'lettuce-async' in path -> Java-Async
6165
- If 'lettuce-reactive' in path -> Java-Reactive
6266
6367
Substring checks are case-sensitive and can appear anywhere in the path.
6468
"""
6569
if language == 'java':
70+
if 'lettuce-sync' in path:
71+
return 'Lettuce-Sync'
6672
if 'lettuce-async' in path:
6773
return 'Java-Async'
6874
if 'lettuce-reactive' in path:

0 commit comments

Comments
 (0)