Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Son Of Anton
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Son Of Anton
Commits
59950ea5
Commit
59950ea5
authored
Mar 30, 2026
by
Mahmoud Aglan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixz save settingas
parent
6b5a1e72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
3 deletions
+28
-3
ChatView.jsx
frontend/src/components/ChatView.jsx
+28
-3
No files found.
frontend/src/components/ChatView.jsx
View file @
59950ea5
...
@@ -100,10 +100,35 @@ export default function ChatView({ chatId }) {
...
@@ -100,10 +100,35 @@ export default function ChatView({ chatId }) {
const
saveSettings
=
useCallback
(
async
()
=>
{
const
saveSettings
=
useCallback
(
async
()
=>
{
try
{
try
{
await
updateChat
(
state
.
token
,
chatId
,
{
model
,
max_tokens
:
maxTokens
,
reasoning_budget
:
reasoningBudget
,
knowledge_base_id
:
selectedKbId
||
""
,
linked_repo_id
:
selectedRepoId
||
""
});
await
updateChat
(
state
.
token
,
chatId
,
{
dispatch
({
type
:
"UPDATE_CHAT"
,
chat
:
{
id
:
chatId
,
model
,
max_tokens
:
maxTokens
,
reasoning_budget
:
reasoningBudget
,
knowledge_base_id
:
selectedKbId
,
linked_repo_id
:
selectedRepoId
}
});
model
,
max_tokens
:
maxTokens
,
reasoning_budget
:
reasoningBudget
,
knowledge_base_id
:
selectedKbId
||
""
,
linked_repo_id
:
selectedRepoId
||
""
,
});
// ── THIS IS THE FIX ──
// Build the full linked_repo object from the local repos list
// so the UI immediately sees the repo banner, commit buttons, etc.
const
repoObj
=
selectedRepoId
?
repos
.
find
(
r
=>
r
.
id
===
selectedRepoId
)
||
null
:
null
;
dispatch
({
type
:
"UPDATE_CHAT"
,
chat
:
{
id
:
chatId
,
model
,
max_tokens
:
maxTokens
,
reasoning_budget
:
reasoningBudget
,
knowledge_base_id
:
selectedKbId
,
linked_repo_id
:
selectedRepoId
,
linked_repo
:
repoObj
,
// ← was missing
},
});
}
catch
{
}
}
catch
{
}
},
[
state
.
token
,
chatId
,
model
,
maxTokens
,
reasoningBudget
,
selectedKbId
,
selectedRepoId
,
dispatch
]);
},
[
state
.
token
,
chatId
,
model
,
maxTokens
,
reasoningBudget
,
selectedKbId
,
selectedRepoId
,
repos
,
dispatch
]);
function
toggleSettings
()
{
if
(
showSettings
)
saveSettings
();
setShowSettings
(
!
showSettings
);
}
function
toggleSettings
()
{
if
(
showSettings
)
saveSettings
();
setShowSettings
(
!
showSettings
);
}
function
addFiles
(
files
)
{
setPendingFiles
(
prev
=>
[...
prev
,
...
files
.
map
(
f
=>
({
file
:
f
,
type
:
classifyFile
(
f
),
preview
:
classifyFile
(
f
)
===
"image"
?
URL
.
createObjectURL
(
f
)
:
null
}))]);
}
function
addFiles
(
files
)
{
setPendingFiles
(
prev
=>
[...
prev
,
...
files
.
map
(
f
=>
({
file
:
f
,
type
:
classifyFile
(
f
),
preview
:
classifyFile
(
f
)
===
"image"
?
URL
.
createObjectURL
(
f
)
:
null
}))]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment