Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ versions follow [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [0.8.0] - 2026-12-02

Details and migration steps: [docs/en/changelogs/0.8.0.md](docs/en/changelogs/0.8.0.md)

- **Change:** both views take `Polhem.Markdown.Avalonia` and `Polhem.Markdown.Blazor` 0.9.0, and with them `Polhem.Markdown` 0.9.0. Both viewers pin `Polhem.Markdown` to exactly 0.9.0, so an application that references it itself uses 0.9.0, and one that references a viewer package itself uses 0.9.0 or later.
- **Change:** Mermaid diagrams in replies are drawn by [Mermaider](https://github.com/nullean/mermaider), a new dependency of `Polhem.Markdown`: more diagram types are drawn, and a diagram with a statement Mermaider does not read shows as code. In the Blazor view the `.pmd-d-*` classes are gone and `--pmd-diagram-bg` sets the diagram background.
- Text copied from a reply in the Blazor view is the text the Avalonia view copies: an image is its alternative text and an inline formula its LaTeX.

## [0.7.0] - 2026-12-02

Details and migration steps: [docs/en/changelogs/0.7.0.md](docs/en/changelogs/0.7.0.md)
Expand Down Expand Up @@ -105,7 +113,8 @@ Details: [docs/en/changelogs/0.1.0.md](docs/en/changelogs/0.1.0.md)
- The prompt box sends on Enter and ignores the Enter that confirms an input method's composition.
- English and Traditional Chinese texts, and a theme for Fluent and Semi, light and dark.

[Unreleased]: https://github.com/polhem-dev/polhem-chat/compare/v0.7.0...HEAD
[Unreleased]: https://github.com/polhem-dev/polhem-chat/compare/v0.8.0...HEAD
[0.8.0]: https://github.com/polhem-dev/polhem-chat/compare/v0.7.0...v0.8.0
[0.7.0]: https://github.com/polhem-dev/polhem-chat/compare/v0.6.0...v0.7.0
[0.6.0]: https://github.com/polhem-dev/polhem-chat/compare/v0.5.0...v0.6.0
[0.5.0]: https://github.com/polhem-dev/polhem-chat/compare/v0.4.0...v0.5.0
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ Polhem.Chat 各套件的重要變更,每個版本只列幾項重點。每個

## [Unreleased]

## [0.8.0] - 2026-12-02

詳細內容與遷移步驟:[docs/zh-TW/changelogs/0.8.0.md](docs/zh-TW/changelogs/0.8.0.md)

- **變更:** 兩個 view 改用 `Polhem.Markdown.Avalonia` 與 `Polhem.Markdown.Blazor` 0.9.0,連帶使用 `Polhem.Markdown` 0.9.0。兩個 viewer 都把 `Polhem.Markdown` 鎖定在 0.9.0,所以自行引用 `Polhem.Markdown` 的應用程式要用 0.9.0,自行引用 viewer 套件的要用 0.9.0 以上。
- **變更:** 回覆中的 Mermaid 圖改由 [Mermaider](https://github.com/nullean/mermaider) 繪製,`Polhem.Markdown` 新增相依於它:能畫出更多圖表類型,含 Mermaider 不支援之敘述的圖則以程式碼顯示。Blazor view 的 `.pmd-d-*` 類別已移除,改以 `--pmd-diagram-bg` 設定圖表底色。
- 從 Blazor view 的回覆複製出的文字與 Avalonia view 相同:圖片是替代文字,行內公式是 LaTeX。

## [0.7.0] - 2026-12-02

詳細內容與遷移步驟:[docs/zh-TW/changelogs/0.7.0.md](docs/zh-TW/changelogs/0.7.0.md)
Expand Down Expand Up @@ -104,7 +112,8 @@ Polhem.Chat 各套件的重要變更,每個版本只列幾項重點。每個
- 輸入框按 Enter 送出,輸入法確認組字的 Enter 不會送出。
- 內建英文與繁體中文字串,主題支援 Fluent 與 Semi 的淺色、深色。

[Unreleased]: https://github.com/polhem-dev/polhem-chat/compare/v0.7.0...HEAD
[Unreleased]: https://github.com/polhem-dev/polhem-chat/compare/v0.8.0...HEAD
[0.8.0]: https://github.com/polhem-dev/polhem-chat/compare/v0.7.0...v0.8.0
[0.7.0]: https://github.com/polhem-dev/polhem-chat/compare/v0.6.0...v0.7.0
[0.6.0]: https://github.com/polhem-dev/polhem-chat/compare/v0.5.0...v0.6.0
[0.5.0]: https://github.com/polhem-dev/polhem-chat/compare/v0.4.0...v0.5.0
Expand Down
50 changes: 50 additions & 0 deletions docs/en/changelogs/0.8.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Polhem.Chat 0.8.0 — Release Notes

[繁體中文](../../zh-TW/changelogs/0.8.0.md)

This file holds the details behind the `[0.8.0]` entry in [CHANGELOG.md](../../../CHANGELOG.md).

This release moves both views to Polhem.Markdown 0.9.0, whose viewers draw Mermaid diagrams with Mermaider
([#72](https://github.com/polhem-dev/polhem-chat/issues/72)). No public member of Polhem.Chat is added, removed or
changed.

What each kind of application has to act on:

- **Applications that reference a Polhem.Markdown package themselves**:
[The Markdown viewers move to 0.9.0](#the-markdown-viewers-move-to-090).
- **Applications whose replies contain Mermaid diagrams, and Blazor applications that style them**:
[Mermaid diagrams are drawn by Mermaider](#mermaid-diagrams-are-drawn-by-mermaider).

## Changes in behaviour

### The Markdown viewers move to 0.9.0

The Avalonia control takes `Polhem.Markdown.Avalonia` 0.9.0 and the Blazor component `Polhem.Markdown.Blazor` 0.9.0,
both 0.8.0 before. Both pin `Polhem.Markdown` to exactly 0.9.0. Polhem.Markdown 0.9.0 removes no public member, and
its viewer has no new label, so `ChatStrings` is unchanged.

Besides the diagrams below, text copied from a reply in the Blazor view is now the text the Avalonia view copies: an
image is its alternative text and an inline formula its LaTeX between dollar signs, where the browser copied nothing and
loose symbols. See
[Polhem.Markdown's 0.9.0 release notes](https://github.com/polhem-dev/polhem-markdown/blob/main/docs/en/changelogs/0.9.0.md#text-copied-from-the-blazor-viewer).

**What to do**: an application that references `Polhem.Markdown` itself uses 0.9.0, and one that references
`Polhem.Markdown.Avalonia` or `Polhem.Markdown.Blazor` itself uses 0.9.0 or later; otherwise NuGet reports a version
conflict.

### Mermaid diagrams are drawn by Mermaider

The viewers draw a reply's Mermaid diagrams with [Mermaider](https://github.com/nullean/mermaider), which
`Polhem.Markdown` now depends on:

- Every diagram type Mermaider reads is drawn, such as class, state, ER, Gantt and pie diagrams, not only flowcharts and
sequence diagrams.
- A diagram with a statement Mermaider does not read, such as `click`, shows as code, in both views alike.
- In the Blazor view, a diagram is an `<svg>` inside `.pmd-diagram`: the `.pmd-d-*` classes are gone, and
`--pmd-diagram-bg` sets the background diagrams are drawn against.

See
[Polhem.Markdown's 0.9.0 release notes](https://github.com/polhem-dev/polhem-markdown/blob/main/docs/en/changelogs/0.9.0.md#mermaid-diagrams-are-drawn-by-mermaider).

**What to do**: nothing, unless the application's stylesheet styles diagrams through the `.pmd-d-*` classes; drop
those rules, and set `--pmd-diagram-bg` where the page's background does not match the replies'.
43 changes: 43 additions & 0 deletions docs/zh-TW/changelogs/0.8.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Polhem.Chat 0.8.0 — 發佈說明

[English](../../en/changelogs/0.8.0.md)

本檔是 [CHANGELOG.zh-TW.md](../../../CHANGELOG.zh-TW.md) 中 `[0.8.0]` 條目的詳細內容。

這一版把兩個 view 改用 Polhem.Markdown 0.9.0,它的 viewer 改由 Mermaider 繪製 Mermaid 圖
([#72](https://github.com/polhem-dev/polhem-chat/issues/72))。Polhem.Chat 沒有新增、移除或變更任何公開成員。

各類應用程式要處理的事項:

- **自行引用 Polhem.Markdown 套件的應用程式**:[Markdown 檢視器升到 0.9.0](#markdown-檢視器升到-090)。
- **回覆中會出現 Mermaid 圖的應用程式,以及替圖表自訂樣式的 Blazor 應用程式**:
[Mermaid 圖改由 Mermaider 繪製](#mermaid-圖改由-mermaider-繪製)。

## 行為變更

### Markdown 檢視器升到 0.9.0

Avalonia 控制項改用 `Polhem.Markdown.Avalonia` 0.9.0,Blazor 元件改用 `Polhem.Markdown.Blazor` 0.9.0,原本都是 0.8.0。
兩者都把 `Polhem.Markdown` 鎖定在 0.9.0。Polhem.Markdown 0.9.0 沒有移除任何公開成員,viewer 也沒有新的標籤,所以
`ChatStrings` 不變。

除了下述的圖表,從 Blazor view 的回覆複製出的文字,現在與 Avalonia view 複製的相同:圖片是它的替代文字,行內公式是以錢字號
包住的 LaTeX;原本瀏覽器對圖片什麼都不複製,公式則複製成零散的符號。詳見
[Polhem.Markdown 0.9.0 的發佈說明](https://github.com/polhem-dev/polhem-markdown/blob/main/docs/zh-TW/changelogs/0.9.0.md)。

**處理方式**:自行引用 `Polhem.Markdown` 的應用程式要用 0.9.0,自行引用 `Polhem.Markdown.Avalonia` 或
`Polhem.Markdown.Blazor` 的要用 0.9.0 以上,否則 NuGet 會回報版本衝突。

### Mermaid 圖改由 Mermaider 繪製

viewer 改用 [Mermaider](https://github.com/nullean/mermaider) 繪製回覆中的 Mermaid 圖,`Polhem.Markdown` 也因此新增相依於它:

- Mermaider 能讀的圖表類型都會畫出,例如類別圖、狀態圖、ER 圖、甘特圖與圓餅圖,不再只有流程圖與循序圖。
- 含 Mermaider 不支援之敘述(例如 `click`)的圖會以程式碼顯示,兩個 view 一致。
- Blazor view 裡的圖是 `.pmd-diagram` 中的 `<svg>`:`.pmd-d-*` 類別已移除,`--pmd-diagram-bg` 設定圖表的底色。

詳見
[Polhem.Markdown 0.9.0 的發佈說明](https://github.com/polhem-dev/polhem-markdown/blob/main/docs/zh-TW/changelogs/0.9.0.md#mermaid-圖改由-mermaider-繪製)。

**處理方式**:不必處理,除非應用程式的樣式表透過 `.pmd-d-*` 類別設定圖表樣式;請移除這些規則,並在頁面底色與回覆底色不同時設定
`--pmd-diagram-bg`。
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<!-- The single source of the package version. Only the projects under src/ are packed, and the packages are
always released together under this one version. -->
<Version>0.7.0</Version>
<Version>0.8.0</Version>

<!-- Package metadata -->
<Authors>Polhem contributors</Authors>
Expand Down
2 changes: 1 addition & 1 deletion src/Polhem.Chat.Avalonia/Polhem.Chat.Avalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ItemGroup>
<!-- The lowest versions the control supports, not the newest: they become the minimum for every consumer. -->
<PackageReference Include="Avalonia" Version="12.0.0" />
<PackageReference Include="Polhem.Markdown.Avalonia" Version="0.8.0" />
<PackageReference Include="Polhem.Markdown.Avalonia" Version="0.9.0" />
</ItemGroup>

<!-- The default animation of the activity line (ChatView.ActivityIcon). -->
Expand Down
6 changes: 3 additions & 3 deletions src/Polhem.Chat.Blazor/Polhem.Chat.Blazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

<ItemGroup>
<!-- The lowest versions the component supports, not the newest: they become the minimum for every consumer.
Polhem.Markdown.Blazor 0.8.0 takes the same Polhem.Markdown as Polhem.Markdown.Avalonia 0.8.0, which the Avalonia
control uses: Polhem.Markdown is pinned to an exact version, so the two front ends must agree on it. -->
Polhem.Markdown.Blazor takes the version of Polhem.Markdown.Avalonia that the Avalonia control uses: both pin
Polhem.Markdown to an exact version, so the two front ends must agree on it. -->
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="10.0.1" />
<PackageReference Include="Polhem.Markdown.Blazor" Version="0.8.0" />
<PackageReference Include="Polhem.Markdown.Blazor" Version="0.9.0" />
</ItemGroup>

<ItemGroup>
Expand Down