[PR #16898] [CLOSED] FEAT: Add Setting for Code Editor Indentation, tab/spaces #47321

Closed
opened 2026-04-29 22:31:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/16898
Author: @rgaricano
Created: 8/25/2025
Status: Closed

Base: devHead: dev-FEAT_switch_tab_spaces_indet_in_code_block


📝 Commits (9)

  • 407dc9a Merge pull request #16507 from open-webui/dev
  • 2777bab Merge pull request #16810 from open-webui/dev
  • 1db8dec Merge pull request #16821 from open-webui/dev
  • ab1f635 FEAT_switch_tab_spaces_indet_in_code_block - add config var
  • b69762b FEAT_switch_tab_spaces_indet_in_code_block-UserSettings
  • eabc13d FEAT_switch_tab_spaces_indet_in_code_block-
  • f4fbdb6 Fix Format
  • b41c373 Fix Format
  • 3eb78bc Merge branch 'open-webui:main' into dev-FEAT_switch_tab_spaces_indet_in_code_block

📊 Changes

3 files changed (+38 additions, -2 deletions)

View changed files

📝 backend/open_webui/config.py (+6 -0)
📝 src/lib/components/chat/Settings/Interface.svelte (+30 -0)
📝 src/lib/components/common/CodeEditor.svelte (+2 -2)

📄 Description

FEAT: Add Setting for Code Editor Indentation, tab/spaces

Implementation of setting for Code Editor Indentation as required in https://github.com/open-webui/open-webui/discussions/16892

Add:

  • config var CODE_EDITOR_USE_TABS
  • User Setting var codeEditorUseTabs
  • swith of CodeMirror indentUnit to fit with that setting.
  • i18n Strings: Code Editor Use Tabs, Use tabs & Use spaces

Note: If necessary refresh the page with code blocks if the change of the User Setting Interface is done with the same page opened.


Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/16898 **Author:** [@rgaricano](https://github.com/rgaricano) **Created:** 8/25/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `dev-FEAT_switch_tab_spaces_indet_in_code_block` --- ### 📝 Commits (9) - [`407dc9a`](https://github.com/open-webui/open-webui/commit/407dc9a401fc2382df06d776dbd8ba95dffda38a) Merge pull request #16507 from open-webui/dev - [`2777bab`](https://github.com/open-webui/open-webui/commit/2777bab1485aad097aa41c44a76f49be141eb061) Merge pull request #16810 from open-webui/dev - [`1db8dec`](https://github.com/open-webui/open-webui/commit/1db8dec4f52fc0fa8f8f7bfbb8ea5bde41fee17d) Merge pull request #16821 from open-webui/dev - [`ab1f635`](https://github.com/open-webui/open-webui/commit/ab1f63569785a2106f89f3a1557b3f228bc588e0) FEAT_switch_tab_spaces_indet_in_code_block - add config var - [`b69762b`](https://github.com/open-webui/open-webui/commit/b69762bfc1410c95dc1dc7758b1794cc4f9c434b) FEAT_switch_tab_spaces_indet_in_code_block-UserSettings - [`eabc13d`](https://github.com/open-webui/open-webui/commit/eabc13d84e6f7b745a59fc3dcf3a4270898f0729) FEAT_switch_tab_spaces_indet_in_code_block- - [`f4fbdb6`](https://github.com/open-webui/open-webui/commit/f4fbdb609045886a8868e85643856ca6f646a836) Fix Format - [`b41c373`](https://github.com/open-webui/open-webui/commit/b41c373663757322929c7137d6f6c2af16651f32) Fix Format - [`3eb78bc`](https://github.com/open-webui/open-webui/commit/3eb78bcc040c27a6312f1c837025ac2d30c38e92) Merge branch 'open-webui:main' into dev-FEAT_switch_tab_spaces_indet_in_code_block ### 📊 Changes **3 files changed** (+38 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+6 -0) 📝 `src/lib/components/chat/Settings/Interface.svelte` (+30 -0) 📝 `src/lib/components/common/CodeEditor.svelte` (+2 -2) </details> ### 📄 Description ### FEAT: Add Setting for Code Editor Indentation, tab/spaces Implementation of setting for Code Editor Indentation as required in https://github.com/open-webui/open-webui/discussions/16892 Add: - config var `CODE_EDITOR_USE_TABS` - User Setting var `codeEditorUseTabs` - swith of CodeMirror indentUnit to fit with that setting. - i18n Strings: _Code Editor Use Tabs_, _Use tabs_ & _Use spaces_ Note: If necessary refresh the page with code blocks if the change of the User Setting Interface is done with the same page opened. ____ ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-29 22:31:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#47321