Skip to content

Commit d45fb55

Browse files
committed
docs: fix mid-identifier wrap in tables, drop hardcoded deps in AI Adapters
custom.css adds word-break:keep-all + overflow-wrap:normal + white-space:nowrap on inline code inside tables so identifiers like skillFile, description, responseAs, journalFormat, Class<?> stop splitting mid-character under narrow columns. Verified in a browser against /docs/agents/coordinator/ and /docs/tutorial/11-ai-adapters/. Tutorial 11 removes the Built-in properties+dependency block and four per-runtime Dependency subsections — the Runtimes table at the top already carries the Maven coords, and the duplicated snippets held a wrong Embabel version (4.0.38) that would have resolved to nothing.
1 parent 9c308a8 commit d45fb55

2 files changed

Lines changed: 37 additions & 58 deletions

File tree

docs/src/content/docs/tutorial/11-ai-adapters.md

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,7 @@ Atmosphere's AI layer follows the same adapter pattern as its transport layer. J
99

1010
## Built-in LLM Client (zero extra dependencies)
1111

12-
Before reaching for an adapter module, know that `atmosphere-ai` itself includes a built-in `OpenAiCompatibleClient`. This client works with **OpenAI**, **Google Gemini**, **Ollama**, **Azure OpenAI**, and any OpenAI-compatible endpoint -- with zero additional dependencies beyond `atmosphere-ai`.
13-
14-
```xml
15-
<properties>
16-
<atmosphere.version>4.0.38</atmosphere.version>
17-
</properties>
18-
19-
<dependency>
20-
<groupId>org.atmosphere</groupId>
21-
<artifactId>atmosphere-ai</artifactId>
22-
<version>${atmosphere.version}</version>
23-
</dependency>
24-
```
12+
Before reaching for an adapter module, know that `atmosphere-ai` itself includes a built-in `OpenAiCompatibleClient`. This client works with **OpenAI**, **Google Gemini**, **Ollama**, **Azure OpenAI**, and any OpenAI-compatible endpoint — with zero additional dependencies beyond `atmosphere-ai`. The Maven coordinates for every module in this chapter are listed in the [Runtimes table](#runtimes) below and in the [Spring Boot integration guide](/docs/tutorial/14-spring-boot/).
2513

2614
Use it directly via `AiConfig`:
2715

@@ -133,16 +121,6 @@ When multiple `AgentRuntime` implementations are on the classpath, the one with
133121
| `SpringAiToolBridge` | Converts Atmosphere `ToolDefinition` to Spring AI `ToolCallback`. Spring AI handles the tool call loop automatically. |
134122
| `AtmosphereSpringAiAutoConfiguration` | Spring Boot `@AutoConfiguration`. Activates when `ChatClient` is on the classpath. |
135123

136-
### Dependency
137-
138-
```xml
139-
<dependency>
140-
<groupId>org.atmosphere</groupId>
141-
<artifactId>atmosphere-spring-ai</artifactId>
142-
<version>${atmosphere.version}</version>
143-
</dependency>
144-
```
145-
146124
### Auto-configuration
147125

148126
The auto-configuration creates a `SpringAiStreamingAdapter` bean and, if a `ChatClient` bean exists, wires it into `SpringAiAgentRuntime`:
@@ -210,16 +188,6 @@ When an `@AiEndpoint` receives a message, `SpringAiAgentRuntime.execute()` runs
210188
| `LangChain4jToolBridge` | Converts `ToolDefinition` to `ToolSpecification` and handles tool execution. |
211189
| `AtmosphereLangChain4jAutoConfiguration` | Activates when `StreamingChatLanguageModel` is on the classpath. |
212190

213-
### Dependency
214-
215-
```xml
216-
<dependency>
217-
<groupId>org.atmosphere</groupId>
218-
<artifactId>atmosphere-langchain4j</artifactId>
219-
<version>${atmosphere.version}</version>
220-
</dependency>
221-
```
222-
223191
### Configuration example
224192

225193
A typical LangChain4j wiring (the same pattern used internally by `atmosphere-ai` when the LangChain4j adapter is on the classpath):
@@ -289,16 +257,6 @@ Unlike Spring AI, LangChain4j does not execute tool callbacks automatically. Whe
289257
| `AdkEventAdapter` | Subscribes to a `Flowable<Event>` and forwards partial streaming texts, turn completions, and errors to a `StreamingSession`. |
290258
| `AtmosphereAdkAutoConfiguration` | Activates when `com.google.adk.runner.Runner` is on the classpath. |
291259

292-
### Dependency
293-
294-
```xml
295-
<dependency>
296-
<groupId>org.atmosphere</groupId>
297-
<artifactId>atmosphere-adk</artifactId>
298-
<version>${atmosphere.version}</version>
299-
</dependency>
300-
```
301-
302260
### ADK-specific details
303261

304262
ADK requires tools to be registered at agent construction time. You cannot add tools dynamically per-request. Use `AdkAgentRuntime.configureWithTools()`:
@@ -352,21 +310,6 @@ The adapter handles three event types:
352310

353311
Embabel is a Kotlin-based agent framework with built-in planning, tool calling, and orchestration. The `atmosphere-embabel` adapter bridges Embabel's `OutputChannel` pattern to `StreamingSession`, streaming agent events (thinking, tool calls, results) to the browser.
354312

355-
### Dependency
356-
357-
```xml
358-
<dependency>
359-
<groupId>org.atmosphere</groupId>
360-
<artifactId>atmosphere-embabel</artifactId>
361-
<version>${atmosphere.version}</version>
362-
</dependency>
363-
<dependency>
364-
<groupId>com.embabel.agent</groupId>
365-
<artifactId>embabel-agent-platform-autoconfigure</artifactId>
366-
<version>4.0.38</version>
367-
</dependency>
368-
```
369-
370313
### Usage
371314

372315
Define an Embabel agent:

docs/src/styles/custom.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,39 @@
1010
--sl-color-accent: #4338ca;
1111
--sl-color-accent-high: #1e1b4b;
1212
}
13+
14+
/* --------------------------------------------------------------------
15+
* Tables with inline `code` identifiers.
16+
*
17+
* Starlight's default `code` styling inherits `overflow-wrap:
18+
* break-word` from the container, which causes identifiers like
19+
* `skillFile`, `description`, `responseAs`, `journalFormat`,
20+
* `Class<?>` to split mid-character (e.g. `skillFil` / `e`) when a
21+
* narrow table column is too tight for the full token. That is
22+
* unreadable. Keep identifiers intact — a narrow cell would rather
23+
* widen or let the token sit on its own line than break it in half.
24+
* ------------------------------------------------------------------ */
25+
.sl-markdown-content table code,
26+
.sl-markdown-content table :not(pre) > code {
27+
word-break: keep-all;
28+
overflow-wrap: normal;
29+
white-space: nowrap;
30+
}
31+
32+
/* Allow the first column (typically `Attribute` / `Type`) to grow as
33+
* needed so the identifier fits. Starlight's default table CSS uses
34+
* `table-layout: auto`, which already respects this — the explicit
35+
* `white-space: nowrap` above + this `min-width: 0` ensures the
36+
* browser doesn't artificially constrain the column. */
37+
.sl-markdown-content table th,
38+
.sl-markdown-content table td {
39+
min-width: 0;
40+
}
41+
42+
/* On very narrow viewports the table may need horizontal scroll
43+
* rather than broken identifiers. Starlight already wraps tables in
44+
* an overflow-x container; make sure it still works with nowrap. */
45+
.sl-markdown-content .expressive-code + table,
46+
.sl-markdown-content table {
47+
max-width: 100%;
48+
}

0 commit comments

Comments
 (0)