# Codebot issue and UIDocumentPickerViewController

**URL:** https://talk.remobjects.com/t/codebot-issue-and-uidocumentpickerviewcontroller/31518
**Category:** Fire
**Created:** [March 26, 2025, 4:50pm UTC](https://talk.remobjects.com/t/codebot-issue-and-uidocumentpickerviewcontroller/31518 "2025-03-26T16:50:45Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![JeremyK](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/j/ee7513/32.png) [@JeremyK](https://talk.remobjects.com/u/JeremyK)
#### Post date: [March 26, 2025, 4:50pm UTC](https://talk.remobjects.com/t/codebot-issue-and-uidocumentpickerviewcontroller/31518/1 "2025-03-26T16:50:45Z")

</div>

I just tried to use the codebot to see if it can suggest a change due to something showing as obsolete (it didn’t really help though it did know what the code in the file did). Anyway, I don’t see how to ask an additional question as there’s no edit box/ send button as shown on your blog about it.

Also, I am using dark mode and noticed that there does seem to be an editable area at the bottom of the bot (with a splitter) but the text is black (on a black background) though even when I switched it to white, there seems no way to actually send the question (assuming that’s the place to type it).

I was actually wanting to know how to change this (picker mode is obsolete)

```auto
someDocumentPicker := new UIDocumentPickerViewController withDocumentTypes(['public.item']) inMode(UIDocumentPickerMode.Import); 

```

It suggested this which doesn’t work (though it correctly said I’d need to add UniformTypeIdentifiers to the uses)

```auto
someDocumentPicker := new UIDocumentPickerViewController withContentTypes([UTType.Content as instancetype]) forOpeningContentTypes([UTType.Item]); 

```

I only see these

 ![image](https://talk.remobjects.com/uploads/default/original/3X/5/3/5344fbb132d4983f131f3fdd459aa80bb34d657c.png)

though it looks like there should maybe be something as there is an init for it (assuming that’s where it gets it from):

 ![image](https://talk.remobjects.com/uploads/default/original/3X/f/9/f9af9d1c7f05efa56fb691c91ce92076b06b8454.png)

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [March 26, 2025, 5:37pm UTC](https://talk.remobjects.com/t/codebot-issue-and-uidocumentpickerviewcontroller/31518/2 "2025-03-26T17:37:38Z")

</div>

> [@JeremyK](#):
>
> I just tried to use the codebot to see if it can suggest a change due to something showing as obsolete (it didn’t really help though it did know what the code in the file did). Anyway, I don’t see how to ask an additional question as there’s no edit box/ send button as shown on your blog about it.

Can I see a full screenshot of what you see?

> [@JeremyK](#):
>
> Also, I am using dark mode and noticed that there does seem to be an editable area at the bottom of the bot (with a splitter) but the text is black (on a black background) though even when I switched it to white, there seems no way to actually send the question (assuming that’s the place to type it).

Ah, that probably is the issue. I’ll check; it’s a plain TextView, so I’d expect to to handle proper coloring for mDarkMode on its own… I’ll see what I can do. But probably thats what you’re missing, for the first Q. ;).

> [@JeremyK](#):
>
> It suggested this which doesn’t work (though it correctly said I’d need to add UniformTypeIdentifiers to the uses)
> 
> ```auto
> someDocumentPicker := new UIDocumentPickerViewController withContentTypes([UTType.Content as instancetype]) forOpeningContentTypes([UTType.Item]); 
> 
> ```
> 
> I only see these

Unfortunately we have no control over the accrual info it provides, as this comes form the model. It’s often spot on, sometimes misses on there syntax (eg Objective-C vs Oxygene vs Swkift-style naming of the APIs), but sometimes it just purely makes up APIs or gets confused, as well. Usually asking sorting like “that method doesn’t exist”, etc helps it to get back on track.

What provider and model are you using?

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [March 26, 2025, 7:28pm UTC](https://talk.remobjects.com/t/codebot-issue-and-uidocumentpickerviewcontroller/31518/3 "2025-03-26T19:28:56Z")

</div>

> [@mh](#):
>
> Ah, that probably is the issue. I’ll check; it’s a plain TextView, so I’d expect to to handle proper coloring for mDarkMode on its own… I’ll see what I can do. But probably thats what you’re missing, for the first Q. ;).

Fixed for vNext, and on the firehose.

---

<div class="post-metadata">

### Author: ![JeremyK](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/j/ee7513/32.png) [@JeremyK](https://talk.remobjects.com/u/JeremyK)
#### Post date: [March 27, 2025, 9:43am UTC](https://talk.remobjects.com/t/codebot-issue-and-uidocumentpickerviewcontroller/31518/4 "2025-03-27T09:43:31Z")

</div>

> [@mh](#):
>
> Can I see a full screenshot of what you see?

 ![image](https://talk.remobjects.com/uploads/default/original/3X/4/1/41147ca83590b9fb14209e27f9d3a4a23d654adc.png)

> [@mh](#):
>
> What provider and model are you using?

I just left it as default. I went to look at the settings, and saw the ‘Send chat when enter’ option which wasn’t ticked, is that instead of the send button that I thought is missing? Also, the Model combo was disabled so I couldn’t see it, but it appeared after I ticked the send chat tick box, and showed gpt-4-turbo.

Pressing enter didn’t do anything except add a line break as before, but the Option-Enter sent the message!

I’ve used OpenAI a few times to ask it stuff and have been impressed with some of its suggestions, so I’ll try and use it in here from now, to see how it helps as it’ll save me telling I’m using your stuff. That said, I just asked it how I should use UIDocumentPickerViewController and it wrote the same thing I’m using that is apparently now obsolete. I’ll come back to that one!

> [@mh](#):
>
> Fixed for vNext, and on the firehose.

Got it, confirmed looks right, and the codebot bits as well. Thanks.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [March 27, 2025, 12:18pm UTC](https://talk.remobjects.com/t/codebot-issue-and-uidocumentpickerviewcontroller/31518/5 "2025-03-27T12:18:16Z")

</div>

> [@JeremyK](#):
>
> > [@mh](#):
> >
> > Can I see a full screenshot of what you see?
> 
> ![image](https://talk.remobjects.com/uploads/default/original/3X/4/1/41147ca83590b9fb14209e27f9d3a4a23d654adc.png)

Yep, that black area is the message field; the text color should be fixed for vNext; as is the theme for the Codebot view itself to match the dark look.

> [@JeremyK](#):
>
> I just left it as default.

Okay, so probably OpenAI, and gpt-4o.

> [@JeremyK](#):
>
> and saw the ‘Send chat when enter’ option which wasn’t ticked, is that instead of the send button that I thought is missing?

with “Sent chat on enter”, your next message gets sent when you press Enter (Return), and you can press Option-Enter to ad linebreaks. If its turned off, pressing Enter adds a line break, and Option-Enter will send the message off…

Maybe I need to explain this better, I thought thats a fairly common usage pattern for chat-type apps.

> [@JeremyK](#):
>
> Also, the Model combo was disabled so I couldn’t see it, but it appeared after I ticked the send chat tick box, and showed gpt-4-turbo.

Weird, those two should not be selected. But the Models list _will_ refresh each time you change/touch the Provider option, to reload the available models. Maybe for some reason it failed to download it right away, or just took a bit longer…

> [@JeremyK](#):
>
> Got it, confirmed looks right, and the codebot bits as well. Thanks.

🙏

---

<div class="post-metadata">

### Author: ![JeremyK](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/j/ee7513/32.png) [@JeremyK](https://talk.remobjects.com/u/JeremyK)
#### Post date: [March 27, 2025, 3:05pm UTC](https://talk.remobjects.com/t/codebot-issue-and-uidocumentpickerviewcontroller/31518/6 "2025-03-27T15:05:26Z")

</div>

> [@mh](#):
>
> OpenAI, and gpt-4o.

got-4-turbo

It’s possible I’ve looked at it when you first added it, so I may have done something. It looks like there’s an API key in there, and I do have one (I’ve added some AI stuff into our product).

> [@mh](#):
>
> Maybe I need to explain this better, I thought thats a fairly common usage pattern for chat-type apps.

Got it now!

> [@mh](#):
>
> Maybe for some reason it failed to download it right away, or just took a bit longer…

Yep, just played around with it, and I think it just took a while to populate.

---

<div class="post-metadata">

### Author: ![JeremyK](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/j/ee7513/32.png) [@JeremyK](https://talk.remobjects.com/u/JeremyK)
#### Post date: [March 28, 2025, 2:47pm UTC](https://talk.remobjects.com/t/codebot-issue-and-uidocumentpickerviewcontroller/31518/7 "2025-03-28T14:47:30Z")

</div>

> [@JeremyK](#):
>
> Got it, confirmed looks right, and the codebot bits as well. Thanks.

I just noticed something went wrong with the watches panel with the firehose one (.2984) in dark mode:

 ![image](https://talk.remobjects.com/uploads/default/original/3X/9/3/93f2d552406556bcb3376f5d65d4e1b725d73eab.png)
