feat: improve assistant panel context
This commit is contained in:
1 parent
48abdb52af
commit
384dc46f26
8 files changed
+167
-70
No files matched your search
@@ -113,7 +113,7 @@
|
||||
border-radius: var(--mantine-radius-lg);
|
||||
color: var(--mantine-color-text);
|
||||
background: var(--mantine-color-body);
|
||||
box-shadow: none;
|
||||
box-shadow: var(--mantine-shadow-xl);
|
||||
animation: assistant-panel-in 180ms cubic-bezier(0.22, 1, 0.36, 1);
|
||||
}
|
||||
|
||||
@@ -157,18 +157,10 @@
|
||||
border-bottom: 1px solid var(--mantine-color-default-border);
|
||||
}
|
||||
|
||||
.panelIdentity,
|
||||
.panelIdentityText {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.panelIdentity {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.panelActions {
|
||||
min-width: 0;
|
||||
flex: 0 0 auto;
|
||||
margin-inline-start: auto;
|
||||
}
|
||||
|
||||
.windowControls {
|
||||
@@ -199,7 +191,6 @@
|
||||
padding: 0.45rem 0.5rem 0.45rem 0.65rem;
|
||||
}
|
||||
|
||||
.panelIdentityText > :last-child,
|
||||
.composerHints {
|
||||
display: none;
|
||||
}
|
||||
@@ -256,14 +247,6 @@
|
||||
}
|
||||
|
||||
@container assistant-widget (max-width: 22rem) {
|
||||
.panelIdentityText {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.panelActions {
|
||||
margin-inline-start: auto;
|
||||
}
|
||||
|
||||
.panelAction,
|
||||
.historyButton {
|
||||
width: 2.25rem;
|
||||
@@ -1722,14 +1705,6 @@
|
||||
}
|
||||
|
||||
@media (max-width: 30em) {
|
||||
.panelIdentity > :first-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.panelIdentityText {
|
||||
max-width: 7rem;
|
||||
}
|
||||
|
||||
.historyButton {
|
||||
width: 2.625rem;
|
||||
max-width: 2.625rem;
|
||||
|
||||
@@ -3030,16 +3030,6 @@ export const AssistantConversationSurface = ({
|
||||
</Tooltip>
|
||||
</Group>
|
||||
)}
|
||||
<Group className={classes.panelIdentity} gap="xs" wrap="nowrap">
|
||||
<ThemeIcon variant="light" color="red" radius="xl">
|
||||
<IconRobot size={18} />
|
||||
</ThemeIcon>
|
||||
<div className={classes.panelIdentityText}>
|
||||
<Text fw={700} lh={1.1} lineClamp={1}>
|
||||
{t("title")}
|
||||
</Text>
|
||||
</div>
|
||||
</Group>
|
||||
<Group className={classes.panelActions} gap={2} wrap="nowrap">
|
||||
<ConversationHistory />
|
||||
<ViewRefreshAction isRefreshing={isRefreshing} onRefresh={onRefresh} />
|
||||
|
||||
@@ -170,6 +170,14 @@ const AssistantPreferencesProvider = ({ children }: PropsWithChildren) => {
|
||||
return {
|
||||
...(current.modelId ? { modelId: current.modelId } : {}),
|
||||
reasoning: current.reasoning,
|
||||
...(typeof window === "undefined"
|
||||
? {}
|
||||
: {
|
||||
clientContext: {
|
||||
pathname: window.location.pathname,
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
},
|
||||
}),
|
||||
};
|
||||
}, []);
|
||||
const getRequestHeaders = useCallback((): Record<string, string> => {
|
||||
|
||||
Reference in new issue
Block a user