Skip to content

Commit

Permalink
Merge pull request #136 from aws-samples/fix-kendra
Browse files Browse the repository at this point in the history
ragEnabled=false でも Kendra が表示される件を修正
  • Loading branch information
wadabee authored Oct 27, 2023
2 parents 1186b0d + 641b442 commit 4886a85
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 22 deletions.
14 changes: 8 additions & 6 deletions packages/web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ const items: ItemProps[] = [
icon: <PiImages />,
usecase: true,
},
{
label: 'Kendra 検索',
to: '/kendra',
icon: <PiMagnifyingGlass />,
usecase: false,
},
ragEnabled
? {
label: 'Kendra 検索',
to: '/kendra',
icon: <PiMagnifyingGlass />,
usecase: false,
}
: null,
].flatMap((i) => (i !== null ? [i] : []));

// /chat/:chatId の形式から :chatId を返す
Expand Down
34 changes: 19 additions & 15 deletions packages/web/src/components/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,25 @@ const Drawer: React.FC<Props> = (props) => {
))}
</div>
<div className="border-b" />
<div className="text-aws-smile mx-3 my-2 text-xs">
ツール <span className="text-gray-400">(非生成系AI)</span>
</div>
<div className="mb-1 ml-2 mr-1">
{tools.map((item, idx) => (
<Item
key={idx}
label={item.label}
icon={item.icon}
to={item.to}
usecase={item.usecase}
/>
))}
</div>
<div className="border-b" />
{tools.length > 0 && (
<>
<div className="text-aws-smile mx-3 my-2 text-xs">
ツール <span className="text-gray-400">(非生成系AI)</span>
</div>
<div className="mb-1 ml-2 mr-1">
{tools.map((item, idx) => (
<Item
key={idx}
label={item.label}
icon={item.icon}
to={item.to}
usecase={item.usecase}
/>
))}
</div>
<div className="border-b" />
</>
)}
<div className="text-aws-smile mx-3 my-2 text-xs">会話履歴</div>
<div className="scrollbar-thin scrollbar-thumb-white ml-2 mr-1 h-full overflow-y-auto">
<ChatList className="mr-1" />
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/pages/GenerateImagePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ const GenerateImagePage: React.FC = () => {
/>
</div>

<Card className="flex mt-8">
<Card className="mt-8 flex">
<div className="w-full">
<Textarea
label="プロンプト"
Expand Down

0 comments on commit 4886a85

Please sign in to comment.