Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
haouarihk committed Jun 24, 2024
1 parent ec7b1ea commit 1d3b963
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 46 deletions.
6 changes: 3 additions & 3 deletions src/ui/settings/sections/advanced.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ export default function AdvancedSetting(props: { register: Register }) {
/>
</SettingItem>

{!!global.plugin.settings.experiment && <SettingItem
name="include Attachments In Request"
<SettingItem
name="include Attachments"
description="EXPERIMENTAL: adds the images that are referenced in the request, IT MIGHT CONSUME ALOT OF TOKENS"
register={props.register}
sectionId={sectionId}
Expand All @@ -152,7 +152,7 @@ export default function AdvancedSetting(props: { register: Register }) {
global.triggerReload();
}}
/>
</SettingItem>}
</SettingItem>


<SettingItem
Expand Down
86 changes: 43 additions & 43 deletions src/ui/settings/sections/considered-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,51 +142,51 @@ export default function ConsideredContextSetting(props: {
</SettingItem>
{global.plugin.settings.advancedOptions
?.generateTitleInstructEnabled && (
<>
<SettingItem
name=""
description=""
register={props.register}
sectionId={sectionId}
textArea
>
<textarea
placeholder="Textarea will autosize to fit the content"
className="plug-tg-input plug-tg-h-fit plug-tg-w-full plug-tg-resize-y plug-tg-bg-[var(--background-modifier-form-field)] plug-tg-outline-none"
value={
global.plugin.settings.advancedOptions
?.generateTitleInstruct ||
global.plugin.defaultSettings.advancedOptions
?.generateTitleInstruct
}
onChange={async (e) => {
if (!global.plugin.settings.advancedOptions)
global.plugin.settings.advancedOptions = {
generateTitleInstructEnabled: true,
generateTitleInstruct: e.target.value,
};
<>
<SettingItem
name=""
description=""
register={props.register}
sectionId={sectionId}
textArea
>
<textarea
placeholder="Textarea will autosize to fit the content"
className="plug-tg-input plug-tg-h-fit plug-tg-w-full plug-tg-resize-y plug-tg-bg-[var(--background-modifier-form-field)] plug-tg-outline-none"
value={
global.plugin.settings.advancedOptions
?.generateTitleInstruct ||
global.plugin.defaultSettings.advancedOptions
?.generateTitleInstruct
}
onChange={async (e) => {
if (!global.plugin.settings.advancedOptions)
global.plugin.settings.advancedOptions = {
generateTitleInstructEnabled: true,
generateTitleInstruct: e.target.value,
};

global.plugin.settings.advancedOptions.generateTitleInstruct =
e.target.value;
global.plugin.settings.advancedOptions.generateTitleInstruct =
e.target.value;

global.triggerReload();
await global.plugin.saveSettings();
global.triggerReload();
await global.plugin.saveSettings();
}}
spellCheck={false}
rows={10}
/>
</SettingItem>
<AvailableVars
vars={{
...contextVariablesObj,
query: {
example: "{{content255}}",
hint: "first 255 letters of trimmed content of the note",
},
}}
spellCheck={false}
rows={10}
/>
</SettingItem>
<AvailableVars
vars={{
...contextVariablesObj,
query: {
example: "{{content255}}",
hint: "first 255 letters of trimmed content of the note",
},
}}
/>
</>
)}
</>
)}

<SettingItem
name="TG Selection Limiter(regex)"
Expand Down Expand Up @@ -238,7 +238,7 @@ export default function ConsideredContextSetting(props: {

{(["includeClipboard"] as (keyof Context)[])
// .filter((d) => !contextNotForTemplate.contains(d as any))
.map((key) => {
.map((key: any) => {
const moreData = extendedInfo[key];
return (
<SettingItem
Expand All @@ -256,7 +256,7 @@ export default function ConsideredContextSetting(props: {
value={
"" +
global.plugin.settings.context[
key as keyof typeof global.plugin.settings.context
key as keyof typeof global.plugin.settings.context
]
}
setValue={async (val) => {
Expand Down

0 comments on commit 1d3b963

Please sign in to comment.